aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/test_neutron_port_addresses.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2019-01-28 14:59:01 -0800
committerstark, steven <steven.stark@att.com>2019-01-29 08:03:41 -0800
commit48a07b6942d3956666d30947372653feb702fdae (patch)
tree5a5fc3135f2703ad19543b78e661ea954e98bb33 /ice_validator/tests/test_neutron_port_addresses.py
parent43130f8b173d9053ad4f56f264376851d3fb890c (diff)
[VVP] stand alone tool, script updates
1) Validation script updates: Various bug fixes and script enhancements New tests for: R-18683 R-94669 R-304011 R-01455 R-86476 R-708564 R-85734 R-18683 R-94669 R-304011 R-01455 R-86476 R-86476 R-589037 Removed tests for: R-75202 R-62954 R-22441 R-49177 R-16576 R-86237 R-44491 R-70757 R-01896 R-26124 2) Stand Alone tool introduced 3) Added optional "categories" capability Change-Id: I193cd5c267750791d97b350e91fc36faa72d8d5f Issue-ID: VVP-143 Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'ice_validator/tests/test_neutron_port_addresses.py')
-rw-r--r--ice_validator/tests/test_neutron_port_addresses.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/ice_validator/tests/test_neutron_port_addresses.py b/ice_validator/tests/test_neutron_port_addresses.py
index 0cd6b3b..95b8ddc 100644
--- a/ice_validator/tests/test_neutron_port_addresses.py
+++ b/ice_validator/tests/test_neutron_port_addresses.py
@@ -2,7 +2,7 @@
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
# ===================================================================
#
# Unless otherwise specified, all software contained herein is licensed
@@ -35,7 +35,6 @@
#
# ============LICENSE_END============================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
"""
@@ -93,6 +92,8 @@ def get_port_addresses(filepath):
param = heat.nested_get(aa_pair, field, "get_param")
if param is None:
continue
+ else:
+ param = param[0] if isinstance(param, list) else param
port_addresses[field][param][basename].add(rid)
return port_addresses
@@ -166,6 +167,7 @@ def validate_field(heat, allowed_address_pairs, field, v6=False):
break
else:
# if v6 and testing v6, or inverse
+ param = param[0] if isinstance(param, list) else param
if v6 == is_v6_ip(param):
ports.add(param)
if error is None and len(ports) > 1:
@@ -197,7 +199,7 @@ def validate_external_ipaddress_v6(heat, allowed_address_pairs):
@validates("R-91810")
def test_neutron_port_external_ipaddress(heat_template):
"""
- If a VNF requires ECOMP to assign a Virtual IP (VIP) Address to
+ If a VNF requires ONAP to assign a Virtual IP (VIP) Address to
ports connected an external network, the port
**MUST NOT** have more than one IPv4 VIP address.
"""
@@ -207,7 +209,7 @@ def test_neutron_port_external_ipaddress(heat_template):
@validates("R-41956")
def test_neutron_port_external_ipaddress_v6(heat_template):
"""
- If a VNF requires ECOMP to assign a Virtual IP (VIP) Address to
+ If a VNF requires ONAP to assign a Virtual IP (VIP) Address to
ports connected an external network, the port
**MUST NOT** have more than one IPv6 VIP address.
"""
@@ -219,7 +221,7 @@ def test_neutron_port_floating(yaml_files):
"""
If a VNF has two or more ports that
attach to an external network that require a Virtual IP Address (VIP),
- and the VNF requires ECOMP automation to assign the IP address,
+ and the VNF requires ONAP automation to assign the IP address,
all the Virtual Machines using the VIP address **MUST**
be instantiated in the same Base Module Heat Orchestration Template
or in the same Incremental Module Heat Orchestration Template.
@@ -231,12 +233,12 @@ def test_neutron_port_floating(yaml_files):
for field, params in fields.items():
for param, files in params.items():
if len(files) > 1:
- bad.append(
- '"%s" "%s" in multiple templates: %s'
- % (
- field,
- param,
- ", ".join("%s: %s" % (k, list(v)) for k, v in files.items()),
+ error = ["{} {} assigned in multiple templates: ".format(field, param)]
+ for file_name, r_ids in files.items():
+ error.append(
+ "In {} it's assigned to {}. ".format(
+ file_name, ", ".join(r_ids)
+ )
)
- )
+ bad.append("".join(error))
assert not bad, "; ".join(bad)