aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-04-16 12:59:21 -0500
committerLovett, Trevor (tl2972) <tl2972@att.com>2019-04-16 12:59:21 -0500
commit067437d00057e77eb16eec08fc0d8458f40b6e5d (patch)
tree89aecd7a084da24c9f358ea7b549e7b64a3504ac /ice_validator
parente5d7862c7c6c02847b8b4f95d2af0c5e9a454828 (diff)
[VVP] Case-insensitive network role comparison
Change-Id: I3a761040770bac59093e105acda6b59e9f955c48 Issue-ID: VVP-194 Signed-off-by: Lovett, Trevor (tl2972) <tl2972@att.com>
Diffstat (limited to 'ice_validator')
-rw-r--r--ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml2
-rw-r--r--ice_validator/tests/test_neutron_port_network_attachment.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml
index 7c6e4df..620c7c6 100644
--- a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml
+++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml
@@ -40,7 +40,7 @@
resources:
- int_intranet_network:
+ int_INTRANET_network:
type: OS::Neutron::Net
properties:
name: network_name
diff --git a/ice_validator/tests/test_neutron_port_network_attachment.py b/ice_validator/tests/test_neutron_port_network_attachment.py
index 001d453..dfbad35 100644
--- a/ice_validator/tests/test_neutron_port_network_attachment.py
+++ b/ice_validator/tests/test_neutron_port_network_attachment.py
@@ -90,7 +90,7 @@ def test_internal_network_parameters(yaml_files):
param_network_role = param_match.groupdict().get("network_role")
rid_network_role = rid_match.groupdict().get("network_role")
- if param_network_role != rid_network_role:
+ if param_network_role.lower() != rid_network_role.lower():
errors.append((
"The network role ({}) extracted from the resource ID ({}) "
"does not match network role ({}) extracted from the "
@@ -103,8 +103,8 @@ def test_internal_network_parameters(yaml_files):
in {"OS::Neutron::Net",
"OS::ContrailV2::VirtualNetwork"}}
matches = (INTERNAL_NETWORK_PATTERN.match(n) for n in networks)
- roles = {m.groupdict()["network_role"] for m in matches if m}
- if param_network_role not in roles:
+ roles = {m.groupdict()["network_role"].lower() for m in matches if m}
+ if param_network_role.lower() not in roles:
errors.append((
"No internal network with a network role of {} was "
"found in the base modules networks: {}"
@@ -149,7 +149,7 @@ def test_external_network_parameter(heat_template):
continue
rid_network_role = rid_match.groupdict()["network_role"]
param_network_role = param_match.groupdict()["network_role"]
- if rid_network_role != param_network_role:
+ if rid_network_role.lower() != param_network_role.lower():
errors.append((
"The network role ({}) extracted from the resource ID ({}) "
"does not match network role ({}) extracted from the "