aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests
diff options
context:
space:
mode:
authorSteven Wright <sw3588@att.com>2019-10-04 17:11:21 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-04 17:11:21 +0000
commitb3284f2281c5ede1d6f7b4d68a9e8646960fface (patch)
tree8b4cdd867e88a6db2c051322f3c95a9c90ddc217 /ice_validator/tests
parent98d86269d797a390b9e47d41383d0744ea858837 (diff)
parentc66f5bcac351c595e94046cfe70fd982257b2db3 (diff)
Merge "Sonarfix in structures.py"
Diffstat (limited to 'ice_validator/tests')
-rw-r--r--ice_validator/tests/structures.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/ice_validator/tests/structures.py b/ice_validator/tests/structures.py
index 0223bc3..a435246 100644
--- a/ice_validator/tests/structures.py
+++ b/ice_validator/tests/structures.py
@@ -252,15 +252,19 @@ class ContrailV2NetworkFlavorBaseProcessor(HeatProcessor):
network_flavor = cls.network_flavor_internal
else:
p = param.get("get_param")
- if isinstance(p, str):
- if "_int_" in p or p.startswith("int_"):
- network_flavor = cls.network_flavor_internal
- elif "_subint_" in p:
- network_flavor = cls.network_flavor_subint
- else:
- network_flavor = cls.network_flavor_external
+ network_flavor = cls.get_network_format(p)
return network_flavor
+ @classmethod
+ def get_network_format(cls, param):
+ if isinstance(param, str):
+ if "_int_" in param or param.startswith("int_"):
+ return cls.network_flavor_internal
+ elif "_subint_" in param:
+ return cls.network_flavor_subint
+ else:
+ return cls.network_flavor_external
+
class ContrailV2InstanceIpProcessor(ContrailV2NetworkFlavorBaseProcessor):
""" ContrailV2 InstanceIp