X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_contrail_instance_ip_parameters.py;h=4071f66eedaaac94d0779c57def72d60d281d15d;hb=0c4e64d87728b89aa9cd4d41d738f5bfe64ceee3;hp=312c8e99607174831ef8d30a5f11b1b3e3c8dbae;hpb=0e2e6cdfb6b659c29ad1a59ac37d3a50191577a0;p=vvp%2Fvalidation-scripts.git diff --git a/ice_validator/tests/test_contrail_instance_ip_parameters.py b/ice_validator/tests/test_contrail_instance_ip_parameters.py index 312c8e9..4071f66 100644 --- a/ice_validator/tests/test_contrail_instance_ip_parameters.py +++ b/ice_validator/tests/test_contrail_instance_ip_parameters.py @@ -100,13 +100,13 @@ sid_regx_dict = { "string": { "readable": "{network-role}_subnet_id or {network-role}_v6_subnet_id", "machine": RE_EXTERNAL_PARAM_SID, - }, + } }, "internal": { "string": { "readable": "int_{network-role}_subnet_id or int_{network-role}_v6_subnet_id", "machine": RE_INTERNAL_PARAM_SID, - }, + } }, "parameter_to_resource_comparisons": ["network_role"], } @@ -114,22 +114,46 @@ sid_regx_dict = { @validates("R-100000", "R-100010", "R-100030", "R-100050", "R-100070") def test_contrail_external_instance_ip_address_parameter(yaml_file): - check_parameter_format(yaml_file, iip_regx_dict, "external", ContrailV2InstanceIpProcessor, "instance_ip_address") + check_parameter_format( + yaml_file, + iip_regx_dict, + "external", + ContrailV2InstanceIpProcessor, + "instance_ip_address", + ) @validates("R-100000", "R-100090", "R-100110", "R-100130", "R-100150") def test_contrail_internal_instance_ip_address_parameter(yaml_file): - check_parameter_format(yaml_file, iip_regx_dict, "internal", ContrailV2InstanceIpProcessor, "instance_ip_address") + check_parameter_format( + yaml_file, + iip_regx_dict, + "internal", + ContrailV2InstanceIpProcessor, + "instance_ip_address", + ) @validates("R-100190", "R-100200", "R-100220") def test_contrail_external_instance_subnet_id_parameter(yaml_file): - check_parameter_format(yaml_file, sid_regx_dict, "external", ContrailV2InstanceIpProcessor, "subnet_uuid") + check_parameter_format( + yaml_file, + sid_regx_dict, + "external", + ContrailV2InstanceIpProcessor, + "subnet_uuid", + ) @validates("R-100190", "R-100240", "R-100260") def test_contrail_internal_instance_subnet_id_parameter(yaml_file): - check_parameter_format(yaml_file, sid_regx_dict, "internal", ContrailV2InstanceIpProcessor, "subnet_uuid") + check_parameter_format( + yaml_file, + sid_regx_dict, + "internal", + ContrailV2InstanceIpProcessor, + "subnet_uuid", + ) @validates("R-100240", "R-100260") @@ -150,10 +174,12 @@ def test_contrail_incremental_module_internal_subnet_usage(yaml_files): if not subnet_param: continue if subnet_param not in base_outputs: - errors.append(( - "Resource ({}) is designated as an internal IP, but its " - "subnet_uuid parameter ({}) does not refer to subnet in " - "this template nor is it defined in the output section " - "of the base module ({})" - ).format(r_id, subnet_param, os.path.basename(base_path))) + errors.append( + ( + "Resource ({}) is designated as an internal IP, but its " + "subnet_uuid parameter ({}) does not refer to subnet in " + "this template nor is it defined in the output section " + "of the base module ({})" + ).format(r_id, subnet_param, os.path.basename(base_path)) + ) assert not errors, ". ".join(errors)