# ============LICENSE_END============================================
#
#
-
-"""
-resources:
-{vm-type}_{vm-type_index}_{network-role}_port_{port-index}:
- type: OS::Neutron::Port
- properties:
- network: { get_param: ...}
- fixed_ips: [ { "ipaddress": { get_param: ... } } ]
- binding:vnic_type: direct #only SR-IOV ports, not OVS ports
- value_specs: {
- vlan_filter: { get_param: ... }, #all NC ports
- public_vlans: { get_param: ... }, #all NC ports
- private_vlans: { get_param: ... },#all NC ports
- guest_vlans: { get_param: ... }, #SR-IOV Trunk Port only
- vlan_mirror: { get_param: ... }, #SRIOV Trunk Port
- # Receiving Mirrored Traffic only
- ATT_FABRIC_CONFIGURATION_REQUIRED: true #all NC ports
- }
- metadata:
- port_type: SR-IOV_Trunk #SR-IOV Trunk Port
- port_type: SR-IOV_Non_Trunk #SR-IOV Non Trunk Port
- port_type: OVS #OVS Port
- port_type: SR-IOV_Mirrored_Trunk #SR-IOV Trunk Port
- # Receiving Mirrored Traffic
-"""
import re
from tests.utils.network_roles import get_network_type_from_port
-from tests.parametrizers import get_nested_files
-from .structures import Heat
-from .helpers import validates, load_yaml, get_base_template_from_yaml_files
-from .utils.ports import check_ip_format
+from tests.structures import Heat
+from tests.helpers import validates, load_yaml, get_base_template_from_yaml_files
+from tests.utils.nested_files import get_nested_files
+from .utils.ports import check_parameter_format
+from tests.structures import NeutronPortProcessor
VERSION = "1.3.0"
RE_EXTERNAL_PARAM_SUBNET = re.compile( # match pattern
- r"(?P<network_role>.+[^(v6)])(_v6)?_subnet_id$"
+ r"(?P<network_role>.+?)(_v6)?_subnet_id$"
)
RE_INTERNAL_PARAM_SUBNET = re.compile( # match pattern
- r"int_(?P<network_role>.+[^(v6)])(_v6)?_subnet_id$"
+ r"int_(?P<network_role>.+?)(_v6)?_subnet_id$"
)
fip_regx_dict = {
@validates("R-38236", "R-84123", "R-76160")
def test_internal_subnet_format(yaml_file):
- check_ip_format(yaml_file, fip_regx_dict, "internal", "fixed_ips", "subnet")
+ check_parameter_format(yaml_file, fip_regx_dict, "internal", NeutronPortProcessor, "fixed_ips", "subnet")
@validates("R-38236", "R-62802", "R-15287")
def test_external_subnet_format(yaml_file):
- check_ip_format(yaml_file, fip_regx_dict, "external", "fixed_ips", "subnet")
+ check_parameter_format(yaml_file, fip_regx_dict, "external", NeutronPortProcessor, "fixed_ips", "subnet")
@validates("R-84123", "R-76160")