Code Review
/
vvp
/
validation-scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[VVP] add bug fixes and reserve port updates
[vvp/validation-scripts.git]
/
ice_validator
/
tests
/
test_fixed_ips_format.py
diff --git
a/ice_validator/tests/test_fixed_ips_format.py
b/ice_validator/tests/test_fixed_ips_format.py
index
039c619
..
8e159ba
100644
(file)
--- 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
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
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 = []
pytest.skip("No resources specified in the heat template")
invalid_fixed_ips = []
- for
v1 in yml["resources"].value
s():
+ for
k1, v1 in yml["resources"].item
s():
if not isinstance(v1, dict):
continue
if "properties" not in v1:
continue
if v1.get("type") != "OS::Neutron::Port":
continue
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():
network_role = get_network_role_from_port(v1)
for k2, v2 in v1["properties"].items():