summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml
diff options
context:
space:
mode:
authorarun chapagain <arun.chapagain@huawei.com>2020-11-10 01:01:36 +0530
committerarun chapagain <arun.chapagain@huawei.com>2020-11-10 11:10:53 +0530
commita7d1aca6ecae49687a4c8ea4b6c5d09e09188a4e (patch)
treea7088c254854162b7c1b7d822fee6db9fc399178 /asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml
parentdb17dd3511b757cb4d5b0a63cfdcda3bb60b51a0 (diff)
adding test case for Csar distribution
Issue-ID: SO-3080 Signed-off-by: arun chapagain <arun.chapagain@huawei.com> Change-Id: I7d734dfffe5b216a4b1fddc9a3bb2a076715b94f
Diffstat (limited to 'asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml')
-rw-r--r--asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml106
1 files changed, 106 insertions, 0 deletions
diff --git a/asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml b/asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml
new file mode 100644
index 0000000000..e89fd6f1b1
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/service-ubuntu16test/base_ubuntu16.yaml
@@ -0,0 +1,106 @@
+heat_template_version: 2013-05-23
+
+description: Heat template to deploy a ubuntu16 VM
+
+parameters:
+ # Metadata required by ONAP
+ vnf_name:
+ type: string
+ label: VM name
+ description: The VM name
+ vnf_id:
+ type: string
+ label: VNF ID
+ description: The VNF ID is provided by ONAP
+ vf_module_id:
+ type: string
+ label: VF module ID
+ description: The VF Module ID is provided by ONAP
+
+# Server parameters, naming required by ONAP
+ ubuntu16_image_name:
+ type: string
+ label: Image name or ID
+ description: Image to be used for compute instance
+ ubuntu16_flavor_name:
+ type: string
+ label: Flavor
+ description: Type of instance (flavor) to be used
+ ubuntu16_key_name:
+ type: string
+ label: openSSH Key name
+ description: openSSH key name
+ ubuntu16_pub_key:
+ type: string
+ label: Public key
+ description: Public key to be installed on the compute instance
+ ubuntu16_name_0:
+ type: string
+ label: VM name
+ description: The VM name
+
+# Network parameters, naming required by ONAP
+ admin_plane_net_name:
+ type: string
+ label: management network
+ description: The external management network
+
+resources:
+ random-str:
+ type: OS::Heat::RandomString
+ properties:
+ length: 4
+
+ ubuntu16_instantiated_key_name:
+ type: OS::Nova::KeyPair
+ properties:
+ name:
+ str_replace:
+ template: base_rand
+ params:
+ base: { get_param: ubuntu16_key_name }
+ rand: { get_resource: random-str }
+ public_key: { get_param: ubuntu16_pub_key }
+ save_private_key: false
+
+ ubuntu16_admin_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: security group
+ name: ubuntu16_admin_security_group
+ rules: [
+ {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22},
+ {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}]
+
+ ubuntu16_0_admin_plane_port_0:
+ type: OS::Neutron::Port
+ properties:
+ name:
+ str_replace:
+ template: base_rand
+ params:
+ base: ubuntu16_0_admin_plane_port
+ rand: { get_resource: random-str }
+ network: { get_param: admin_plane_net_name }
+ security_groups: [{ get_resource: ubuntu16_admin_security_group }]
+
+ ubuntu16_VM_settings:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ config: |
+ #!/bin/bash
+ sudo apt-get update
+
+ ubuntu16_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu16_image_name }
+ flavor: { get_param: ubuntu16_flavor_name }
+ name: { get_param: ubuntu16_name_0 }
+ metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }}
+ key_name: { get_resource: ubuntu16_instantiated_key_name }
+ networks:
+ - port: { get_resource: ubuntu16_0_admin_plane_port_0 }
+ user_data_format: RAW
+ user_data:
+ get_resource: ubuntu16_VM_settings