skipped_host_aggregates regexp should allow hyphens

Bug #1859619 reported by Alvaro Uria
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-openstack-service-checks
Fix Released
Wishlist
Alvaro Uria

Bug Description

Current regular expression allows: alphanumeric[,alphanumeric]

>>> import re
>>> s = "AZ-AGGR"
>>> regex = r'(\w+[,\w+]*)'
>>> re.findall(regex, s)
['AZ', 'AGGR']

However, there are host aggregates that may have hyphens or underscores.
>>> regex = r'([\w_-]+[,[\w_-]+]*)'
>>> re.findall(regex, s)
['AZ-AGGR']

Revision history for this message
Alvaro Uria (aluria) wrote :

updated regexp to r'([\w_-]+(?:,[\w_-]+)*)'

Changed in charm-openstack-service-checks:
status: New → Fix Released
importance: Undecided → Wishlist
assignee: nobody → Alvaro Uria (aluria)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.