Merge ~aluria/charm-openstack-service-checks/+git/charm-openstack-service-checks:bug/1859619 into ~canonical-bootstack/charm-openstack-service-checks:master

Proposed by Alvaro Uria
Status: Merged
Approved by: Alvaro Uria
Approved revision: 5e1982123fb1c3980d10ec795e204939ec7b2e18
Merged at revision: e9f993ef752cbc5b824c12c94be26c04a98aea41
Proposed branch: ~aluria/charm-openstack-service-checks/+git/charm-openstack-service-checks:bug/1859619
Merge into: ~canonical-bootstack/charm-openstack-service-checks:master
Diff against target: 13 lines (+1/-1)
1 file modified
lib/lib_openstack_service_checks.py (+1/-1)
Reviewer Review Type Date Requested Status
Peter Sabaini (community) Approve
Review via email: mp+377571@code.launchpad.net

Commit message

LP#1859619: Expand allowed host aggregate name convention

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Peter Sabaini (peter-sabaini) wrote :

lgtm +1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision e9f993ef752cbc5b824c12c94be26c04a98aea41

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lib_openstack_service_checks.py b/lib/lib_openstack_service_checks.py
2index 3e4adea..9d123fb 100644
3--- a/lib/lib_openstack_service_checks.py
4+++ b/lib/lib_openstack_service_checks.py
5@@ -138,7 +138,7 @@ class OSCHelper():
6 skipped_aggregates = self.charm_config.get('skipped_host_aggregates')
7 # We have to make sure there are no malicious injections in the code
8 # as this gets passed to a python script via bash
9- regex = r'(\w+[,\w+]*)'
10+ regex = r'([\w_-]+(?:,[\w_-]+)*)'
11 sanitized = ",".join(re.findall(regex, skipped_aggregates))
12 sanitized = [s for s in sanitized.split(',') if s != ""]
13 sanitized = ",".join(sanitized)

Subscribers

People subscribed via source and target branches