diff options
author | stark, steven <ss820f@att.com> | 2018-04-23 08:49:34 -0700 |
---|---|---|
committer | stark, steven <ss820f@att.com> | 2018-04-23 08:49:34 -0700 |
commit | 655f39713cca2595a812ccd60cc738301aef8b2f (patch) | |
tree | b643a746b17ed00575b980c2bb233ce7cbf2109b /ice_validator/tests/utils/ports.py | |
parent | 671ada85afbb8112a7ae854950cea24756be4dd3 (diff) |
[VVP] add bug fixes and reserve port updates
Adding test script updates and reserve port
Change-Id: I2af5263a48a53117021f166d08395685e89fd122
Issue-ID: VVP-56
Signed-off-by: stark, steven <ss820f@att.com>
Diffstat (limited to 'ice_validator/tests/utils/ports.py')
-rw-r--r-- | ice_validator/tests/utils/ports.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ice_validator/tests/utils/ports.py b/ice_validator/tests/utils/ports.py index 51e920a..4d0b4ca 100644 --- a/ice_validator/tests/utils/ports.py +++ b/ice_validator/tests/utils/ports.py @@ -177,3 +177,21 @@ def get_invalid_ip_addresses(resources, port_property): invalid_ip_addresses.append(ip_address) return invalid_ip_addresses + + +def is_reserved_port(port_id): + ''' + Checks to see if the resource id for a port follows + the reserve port concept + ''' + formats = [ + ["port_id", + re.compile(r'reserve_port_(.+?)_floating_ip_\d+')], + ["port_id", + re.compile(r'reserve_port_(.+?)_floating_v6_ip_\d+')], + ] + for f in formats: + m = f[1].match(port_id.lower()) + if m and m.group(1): + return True + return False |