Fix heat template for sec_group
[demo.git] / heat / vLB / base_vlb.yaml
index 4e1459b..0d8c575 100644 (file)
@@ -169,6 +169,10 @@ parameters:
     type: string
     label: Cloud environment
     description: Cloud environment (e.g., openstack, rackspace)
+  sec_group:
+    type: string
+    description: ONAP Security Group
+
 
 #############
 #           #
@@ -224,18 +228,25 @@ resources:
     properties:
       network: { get_resource: vlb_private_network }
       fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
+      security_groups:
+      - { get_param: sec_group }
+
 
   vlb_private_1_port:
     type: OS::Neutron::Port
     properties:
       network: { get_param: onap_private_net_id }
       fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
+      security_groups:
+      - { get_param: sec_group }
 
   vlb_private_2_port:
     type: OS::Neutron::Port
     properties:
       network: { get_resource: pktgen_private_network }
       fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vlb_private_ip_2 }}]
+      security_groups:
+      - { get_param: sec_group }
 
   vlb_0:
     type: OS::Nova::Server
@@ -270,6 +281,7 @@ resources:
             __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr }
             __pktgen_mac__: { get_attr: [vpg_private_0_port, mac_address] }
             __cloud_env__: { get_param: cloud_env }
+            __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
           template: |
             #!/bin/bash
 
@@ -291,6 +303,7 @@ resources:
             echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
             echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
+            echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
 
             # Download and run install script
             apt-get -y install unzip
@@ -307,12 +320,17 @@ resources:
     properties:
       network: { get_resource: vlb_private_network }
       fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
+      security_groups:
+      - { get_param: sec_group }
 
   vdns_private_1_port:
     type: OS::Neutron::Port
     properties:
       network: { get_param: onap_private_net_id }
       fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
+      security_groups:
+      - { get_param: sec_group }
+
 
   vdns_0:
     type: OS::Nova::Server
@@ -340,6 +358,7 @@ resources:
             __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr }
             __onap_private_net_cidr__: { get_param: onap_private_net_cidr }
             __cloud_env__: { get_param: cloud_env }
+            __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
           template: |
             #!/bin/bash
 
@@ -355,6 +374,7 @@ resources:
             echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt
             echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
+            echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
 
             # Download and run install script
             apt-get -y install unzip
@@ -371,12 +391,16 @@ resources:
     properties:
       network: { get_resource: pktgen_private_network }
       fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
+      security_groups:
+      - { get_param: sec_group }
 
   vpg_private_1_port:
     type: OS::Neutron::Port
     properties:
       network: { get_param: onap_private_net_id }
       fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
+      security_groups:
+      - { get_param: sec_group }
 
   vpg_0:
     type: OS::Nova::Server
@@ -404,6 +428,7 @@ resources:
             __pg_int__: { get_param: pg_int }
             __vlb_mac__: { get_attr: [vlb_private_2_port, mac_address] }
             __cloud_env__: { get_param: cloud_env }
+            __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
           template: |
             #!/bin/bash
 
@@ -420,6 +445,7 @@ resources:
             echo "__pg_int__" > /opt/config/pg_int.txt
             echo "__vlb_mac__" > /opt/config/vlb_mac.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
+            echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
 
             # Download and run install script
             apt-get -y install unzip
@@ -428,4 +454,4 @@ resources:
             unzip -j /opt/vlb-scripts-__install_script_version__.zip -d /opt v_packetgen_install.sh
             cd /opt
             chmod +x v_packetgen_install.sh
-            ./v_packetgen_install.sh
\ No newline at end of file
+            ./v_packetgen_install.sh