diff --git a/api-daemon/pvcapid/ova.py b/api-daemon/pvcapid/ova.py index 8664c8a5..e1e30a5d 100755 --- a/api-daemon/pvcapid/ova.py +++ b/api-daemon/pvcapid/ova.py @@ -74,7 +74,7 @@ def list_ova(limit, is_fuzzy=True): limit = '%' + limit else: limit = limit[1:] - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '%' else: limit = limit[:-1] diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 6a80b7ff..df7adbfd 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -110,7 +110,7 @@ def list_template(limit, table, is_fuzzy=True): limit = '%' + limit else: limit = limit[1:] - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '%' else: limit = limit[:-1] @@ -610,7 +610,7 @@ def list_userdata(limit, is_fuzzy=True): limit = '%' + limit else: limit = limit[1:] - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '%' else: limit = limit[:-1] @@ -705,7 +705,7 @@ def list_script(limit, is_fuzzy=True): limit = '%' + limit else: limit = limit[1:] - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '%' else: limit = limit[:-1] @@ -800,7 +800,7 @@ def list_profile(limit, is_fuzzy=True): limit = '%' + limit else: limit = limit[1:] - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '%' else: limit = limit[:-1] diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index b804ebf5..54035dc7 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -324,7 +324,7 @@ def get_list_osd(zk_conn, limit, is_fuzzy=True): # Implicitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' for osd in full_osd_list: @@ -660,7 +660,7 @@ def get_list_volume(zk_conn, pool, limit, is_fuzzy=True): # Implicitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' for volume in full_volume_list: @@ -766,7 +766,7 @@ def get_list_snapshot(zk_conn, pool, volume, limit, is_fuzzy=True): # Implicitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' for snapshot in full_snapshot_list: diff --git a/daemon-common/network.py b/daemon-common/network.py index ea75fa3f..75e19745 100644 --- a/daemon-common/network.py +++ b/daemon-common/network.py @@ -576,7 +576,7 @@ def get_list_dhcp(zk_conn, network, limit, only_static=False, is_fuzzy=True): # Implcitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' except Exception as e: return False, 'Regex Error: {}'.format(e) @@ -622,7 +622,7 @@ def get_list_acl(zk_conn, network, limit, direction, is_fuzzy=True): # Implcitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' except Exception as e: return False, 'Regex Error: {}'.format(e) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index aaecb3c3..1a67d2e2 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -691,7 +691,7 @@ def get_list(zk_conn, node, state, limit, is_fuzzy=True): # Implcitly assume fuzzy limits if not re.match('[^].*', limit): limit = '.*' + limit - if not re.match('.*[$]', limit): + if not re.match('.*\$', limit): limit = limit + '.*' except Exception as e: return False, 'Regex Error: {}'.format(e)