Add example multidisk descriptors
authorchamarty <ravi.chamarty@riftio.com>
Thu, 20 Apr 2017 18:43:15 +0000 (18:43 +0000)
committerchamarty <ravi.chamarty@riftio.com>
Thu, 20 Apr 2017 18:43:15 +0000 (18:43 +0000)
Change-Id: Ida74f25d125a98ec2124e65609fe3bb146cfd48c
Signed-off-by: chamarty <ravi.chamarty@riftio.com>
Makefile
src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png [new file with mode: 0644]
src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml [new file with mode: 0644]
src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg [new file with mode: 0644]
src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml [new file with mode: 0644]

index cb56468..039333c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,8 @@ NSDS := \
     sandvine_pts_ns \
     sonussbc_ns \
     ref1_ns \
-    ref2_ns
+    ref2_ns \
+    ubuntu_cirros_multidisk_ns
 
 NSD_SRC_DIR := src/nsd
 NSD_BUILD_DIR := $(BUILD_DIR)/nsd
@@ -64,7 +65,8 @@ VNFDS := \
     ref11_vnf \
     ref21_vnf \
     ref12_vnf \
-    ref22_vnf
+    ref22_vnf \
+    ubuntu_cirros_multidisk_vnf
 
 VNFD_SRC_DIR := src/vnfd
 VNFD_BUILD_DIR := $(BUILD_DIR)/vnfd
diff --git a/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png b/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png
new file mode 100644 (file)
index 0000000..62012d2
Binary files /dev/null and b/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png differ
diff --git a/src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml b/src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml
new file mode 100644 (file)
index 0000000..cbbe6a2
--- /dev/null
@@ -0,0 +1,32 @@
+nsd:nsd-catalog:
+    nsd:
+    -   id: ubuntu_cirros_multidisk_nsd
+        name: ubuntu_cirros_multidisk_nsd
+        short-name: ubuntu_cirros_multidisk_nsd
+        description: Generated by OSM pacakage generator
+        vendor: OSM
+        version: '1.0'
+
+        # Place the logo as png in icons directory and provide the name here
+        logo: osm_2x.png
+
+        # Specify the VNFDs that are part of this NSD
+        constituent-vnfd:
+            # The member-vnf-index needs to be unique, starting from 1
+            # vnfd-id-ref is the id of the VNFD
+            # Multiple constituent VNFDs can be specified
+        -   member-vnf-index: 1
+            vnfd-id-ref: ubuntu_cirros_multidisk_vnfd
+
+        vld:
+        # Networks for the VNFs
+            -   id: ubuntu_cirros_multidisk_nsd_vld1
+                name: management
+                short-name: management
+                type: ELAN
+                vnfd-connection-point-ref:
+                # Specify the constituent VNFs
+                -   member-vnf-index-ref: 1
+                    vnfd-id-ref: ubuntu_cirros_multidisk_vnfd
+                    # NOTE: Validate the entry below
+                    vnfd-connection-point-ref: eth0
diff --git a/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg b/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg
new file mode 100644 (file)
index 0000000..d1c2188
--- /dev/null
@@ -0,0 +1,5 @@
+#cloud-config
+password: ubuntu
+chpasswd: { expire: False }
+ssh_pwauth: True
+
diff --git a/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml b/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml
new file mode 100644 (file)
index 0000000..da037b1
--- /dev/null
@@ -0,0 +1,53 @@
+vnfd:vnfd-catalog:
+    vnfd:
+    -   id: ubuntu_cirros_multidisk_vnfd
+        name: ubuntu_cirros_multidisk_vnfd
+        short-name: ubuntu_cirros_multidisk_vnfd
+        description: Generated by OSM pacakage generator
+        vendor: OSM
+        version: '1.0'
+
+        # Management interface
+        mgmt-interface:
+            vdu-id: ubuntu_cirros_multidisk_vnfd-VM
+
+        # Atleast one VDU need to be specified
+        vdu:
+        -   id: ubuntu_cirros_multidisk_vnfd-VM
+            name: ubuntu_cirros_multidisk_vnfd-VM
+            description: ubuntu_cirros_multidisk_vnfd-VM
+            count: 1
+
+            # Flavour of the VM to be instantiated for the VDU
+            vm-flavor:
+                vcpu-count: 2
+                memory-mb: 4096
+                storage-gb: 10
+
+            # User-data injection
+            cloud-init-file: cloud_init.cfg
+
+            external-interface:
+            # Specify the external interfaces
+            # There can be multiple interfaces defined
+            -   name: eth0
+                virtual-interface:
+                    type: OM-MGMT
+                vnfd-connection-point-ref: eth0
+            # Specify the volume
+            # There can be multiple interfaces defined
+            volumes:
+            -   name: vda
+                device-type: disk
+                image: UbuntuXenial
+                image-checksum: 4a293322f18827af81a9450e3792947c
+                size: 10
+            -   name: vdb
+                device-type: disk
+                image: cirros-0.3.4-x86_64-disk.img
+                image-checksum: ee1eca47dc88f4879d8a229cc70a07c6
+                size: 8
+
+        connection-point:
+            -   name: eth0
+                type: VPORT