Merge "[VVP] adding list support for non-server-name uniqueness"
authorSteven Wright <sw3588@att.com>
Thu, 9 May 2019 17:49:44 +0000 (17:49 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 9 May 2019 17:49:44 +0000 (17:49 +0000)
ice_validator/tests/fixtures/test_contrail_fqdn/pass/pass0.yaml
ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.yaml
ice_validator/tests/fixtures/test_nested_parameters/fail/stark_nested.yaml
ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.yaml
ice_validator/tests/fixtures/test_nested_parameters/pass/stark_nested.yaml
ice_validator/tests/test_contrail_fqdn.py
ice_validator/tests/test_nested_parameters.py

index 81faeb2..5d61de5 100644 (file)
 
 ---
 parameters:
-  bialy_net_fqdn:
+  oam_net_fqdn:
+    type: string
+  huey:
+    type: string
+  dewey:
     type: string
 
 resources:
 
-  vm_typeX_0_bialy_port_2:
+  fw_0_oam_vmi_0:
+    type: OS::ContrailV2::VirtualMachineInterface
+    properties:
+      virtual_network_refs:
+        - get_param: oam_net_fqdn
+
+  fw_0_int_internal_vmi_0:
     type: OS::ContrailV2::VirtualMachineInterface
     properties:
       virtual_network_refs:
-      - get_param: huey
-      - get_param: dewey
-      - get_param: bialy_net_fqdn
+        - get_resource: { int_internal_network }
 
+  int_internal_network:
+    type: OS::Neutron::Net
index dfe53b3..b8991e3 100755 (executable)
@@ -96,6 +96,10 @@ parameters:
     type: string
     description: nlfdsa
 
+  subnet_uid:
+    type: string
+    description: nlfdsa
+
 resources:
 
   int_mummy_network:
@@ -137,3 +141,4 @@ resources:
           oam2_net_fqdn: { get_param: oam2net_fqdn }
           instance_ip_address: { get_param: instanceip_address }
           mycontrailip: { get_param: my_contrailip }
+          subnet_uuid: { get_param: subnet_uid }
index e6b328a..48df735 100755 (executable)
@@ -104,12 +104,17 @@ parameters:
     type: string
     description: njsaf
 
+  subnet_uuid:
+    type: string
+    description: njsaf
+
 resources:
 
   fw_0_oam_protected_vmi_0_IP_0:
     type: OS::ContrailV2::InstanceIp
     properties:
       instance_ip_address: { get_param: instance_ip_address }
+      subnet_uuid: { get_param: subnet_uuid }
 
   fw_0_oam_vmi_0:
     type: OS::ContrailV2::VirtualMachineInterface
index 0f82c0b..3953df3 100755 (executable)
@@ -92,6 +92,11 @@ parameters:
     type: string
     description: nlfdsa
 
+  subnet_uid:
+    type: string
+    description: nlfdsa
+
+
 resources:
 
   int_mummy_network:
@@ -132,3 +137,4 @@ resources:
           oam2_net_fqdn: { get_param: oam2_net_fqdn }
           instance_ip_address: { get_param: instance_ip_address }
           mycontrailip: { get_param: mycontrailip }
+          subnet_uid: { get_param: subnet_uid }
index b2ca936..6263040 100755 (executable)
@@ -100,13 +100,17 @@ parameters:
     type: string
     description: njsaf
 
+  subnet_uid:
+    type: string
+    description: njsaf
+
 resources:
 
   fw_0_oam_protected_vmi_0_IP_0:
     type: OS::ContrailV2::InstanceIp
     properties:
       instance_ip_address: { get_param: instance_ip_address }
-
+      subnet_uuid: { get_param: subnet_uid }
   fw_0_oam_vmi_0:
     type: OS::ContrailV2::VirtualMachineInterface
     properties:
index f90553f..178ce8d 100644 (file)
@@ -108,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":
index 2622044..846a977 100644 (file)
@@ -265,3 +265,10 @@ def test_iip_instance_ip_parameter_name_doesnt_change_in_nested_template(heat_te
     check_nested_parameter_doesnt_change(
         heat_template, "OS::ContrailV2::InstanceIp", "instance_ip_address"
     )
+
+
+@validates("R-708564")
+def test_iip_subnet_uuid_parameter_name_doesnt_change_in_nested_template(heat_template):
+    check_nested_parameter_doesnt_change(
+        heat_template, "OS::ContrailV2::InstanceIp", "subnet_uuid"
+    )