X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_fixed_ips_format.py;h=8e159ba0d175933a8b99b0ab6d0eef88d690c6ad;hp=039c619ffd008e95161aaca6d317f5650a5ae2a7;hb=655f39713cca2595a812ccd60cc738301aef8b2f;hpb=671ada85afbb8112a7ae854950cea24756be4dd3 diff --git a/ice_validator/tests/test_fixed_ips_format.py b/ice_validator/tests/test_fixed_ips_format.py index 039c619..8e159ba 100644 --- a/ice_validator/tests/test_fixed_ips_format.py +++ b/ice_validator/tests/test_fixed_ips_format.py @@ -40,7 +40,9 @@ import pytest import yaml -from .utils.network_roles import get_network_role_from_port +from .utils.ports import is_reserved_port +from .utils.network_roles import get_network_role_from_port,\ + property_uses_get_resource import re @@ -76,13 +78,17 @@ def test_fixed_ips_format(heat_template): pytest.skip("No resources specified in the heat template") invalid_fixed_ips = [] - for v1 in yml["resources"].values(): + for k1, v1 in yml["resources"].items(): if not isinstance(v1, dict): continue if "properties" not in v1: continue if v1.get("type") != "OS::Neutron::Port": continue + if is_reserved_port(k1): + continue + if property_uses_get_resource(v1, "network"): + continue network_role = get_network_role_from_port(v1) for k2, v2 in v1["properties"].items():