change if bad to assert not bad, message
[vvp/validation-scripts.git] / ice_validator / tests / test_contrail_fqdn.py
index ec5f58a..178ce8d 100644 (file)
@@ -35,7 +35,6 @@
 #
 # ============LICENSE_END============================================
 #
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
 #
 
 """
@@ -109,6 +108,11 @@ def validate_virtual_network_refs(heat, virtual_network_refs, network_role):
     expect = "%s_net_fqdn" % network_role
     for vn_ref in virtual_network_refs:
         param = heat.nested_get(vn_ref, "get_param")
+
+        # skip if not connecting via get_param
+        if not param:
+            return None
+
         if param == expect:
             param_type = heat.nested_get(heat.parameters, param, "type")
             if param_type != "string":
@@ -125,7 +129,7 @@ def validate_virtual_network_refs(heat, virtual_network_refs, network_role):
 
 
 @validates("R-02164")
-def test_contrail_fqdn(heat_template):
+def test_contrail_fqdn(yaml_file):
     """
     When a VNF's Heat Orchestration Template's Contrail resource
     has a property that
@@ -135,4 +139,4 @@ def test_contrail_fqdn(heat_template):
     * **MUST** follow the format ``{network-role}_net_fqdn``
     * **MUST** be declared as type ``string``
     """
-    run_test(heat_template, validate_virtual_network_refs)
+    run_test(yaml_file, validate_virtual_network_refs)