# ============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
#
# ============LICENSE_END============================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
"""
"""
import pytest
-from .structures import ContrailV2InterfaceRouteTable
-from .structures import ContrailV2NetworkIpam
-from .structures import ContrailV2PortTuple
-from .structures import ContrailV2ServiceHealthCheck
-from .structures import ContrailV2ServiceTemplate
+from .structures import ContrailV2InterfaceRouteTableProcessor
+from .structures import ContrailV2NetworkIpamProcessor
+from .structures import ContrailV2PortTupleProcessor
+from .structures import ContrailV2ServiceHealthCheckProcessor
+from .structures import ContrailV2ServiceTemplateProcessor
from .utils.network_roles import get_network_roles
from .utils.vm_types import get_vm_types
from .structures import Heat
from .helpers import validates
-VERSION = "1.0.1"
+VERSION = "2.0.0"
def run_test(heat_template, contrail_class, get_parts, part_name):
@validates("R-81214")
-def test_contrail_interfaceroutetable_resource_id(heat_template):
+def test_contrail_interfaceroutetable_resource_id(yaml_file):
"""
A VNF's Heat Orchestration Template's Resource
``OS::ContrailV2::InterfaceRouteTable``
contain the ``{network-role}``.
"""
run_test(
- heat_template, ContrailV2InterfaceRouteTable, get_network_roles, "network_role"
+ yaml_file,
+ ContrailV2InterfaceRouteTableProcessor,
+ get_network_roles,
+ "network_role",
)
@validates("R-30753")
-def test_contrail_networkipam_resource_id(heat_template):
+def test_contrail_networkipam_resource_id(yaml_file):
"""
A VNF's Heat Orchestration Template's Resource
``OS::ContrailV2::NetworkIpam``
**MUST**
contain the ``{network-role}``.
"""
- run_test(heat_template, ContrailV2NetworkIpam, get_network_roles, "network_role")
+ run_test(
+ yaml_file, ContrailV2NetworkIpamProcessor, get_network_roles, "network_role"
+ )
@validates("R-20065")
-def test_contrail_porttuple_resource_id(heat_template):
+def test_contrail_porttuple_resource_id(yaml_file):
"""
A VNF's Heat Orchestration Template's Resource
``OS::ContrailV2::PortTuple``
**MUST**
contain the ``{vm-type}``.
"""
- run_test(heat_template, ContrailV2PortTuple, get_vm_types, "vm_type")
+ run_test(yaml_file, ContrailV2PortTupleProcessor, get_vm_types, "vm_type")
@validates("R-76014")
-def test_contrail_servicehealthcheck_resource_id(heat_template):
+def test_contrail_servicehealthcheck_resource_id(yaml_file):
"""
A VNF's Heat Orchestration Template's Resource
``OS::ContrailV2::ServiceHealthCheck``
**MUST**
contain the ``{vm-type}``.
"""
- run_test(heat_template, ContrailV2ServiceHealthCheck, get_vm_types, "vm_type")
+ run_test(yaml_file, ContrailV2ServiceHealthCheckProcessor, get_vm_types, "vm_type")
@validates("R-16437")
-def test_contrail_servicetemplate_resource_id(heat_template):
+def test_contrail_servicetemplate_resource_id(yaml_file):
"""
A VNF's Heat Orchestration Template's Resource
``OS::ContrailV2::ServiceTemplate``
**MUST**
contain the ``{vm-type}``.
"""
- run_test(heat_template, ContrailV2ServiceTemplate, get_vm_types, "vm_type")
+ run_test(yaml_file, ContrailV2ServiceTemplateProcessor, get_vm_types, "vm_type")