Add ubuntu xenial network service
authorPhilip Joseph <philip.joseph@riftio.com>
Tue, 27 Sep 2016 07:04:32 +0000 (12:34 +0530)
committerPhilip Joseph <philip.joseph@riftio.com>
Tue, 27 Sep 2016 07:04:32 +0000 (12:34 +0530)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
Makefile
src/generate_descriptor_pkg.sh
src/nsd/ubuntu_xenial_ns/icons/osm_2x.png [new file with mode: 0644]
src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml [new file with mode: 0644]
src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png [new file with mode: 0644]
src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml [new file with mode: 0644]

index 5ec633e..45dc061 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
 #
 BUILD_DIR = build
 
-NSDS := gw_corpa_ns ims_allin1_corpa mwc16_gen_ns mwc16_pe_ns VyOS_ns cirros_ns cirros_2vnf_ns
+NSDS := gw_corpa_ns ims_allin1_corpa mwc16_gen_ns mwc16_pe_ns VyOS_ns cirros_ns cirros_2vnf_ns ubuntu_xenial_ns
 NSD_SRC_DIR := src/nsd
 NSD_BUILD_DIR := $(BUILD_DIR)/nsd
 
@@ -27,7 +27,7 @@ NSD_BUILD_DIRS := $(addprefix $(NSD_BUILD_DIR)/, $(NSDS))
 NSD_PKGS := $(addsuffix .tar.gz, $(NSDS))
 NSD_BUILD_PKGS := $(addprefix $(NSD_BUILD_DIR)_pkgs/, $(NSD_PKGS))
 
-VNFDS := 6wind_vnf gw_corpa_pe1_vnf gw_corpa_pe2_vnf ims_allin1_2p_vnf tidgen_mwc16_vnf VyOS_vnf cirros_vnf
+VNFDS := 6wind_vnf gw_corpa_pe1_vnf gw_corpa_pe2_vnf ims_allin1_2p_vnf tidgen_mwc16_vnf VyOS_vnf cirros_vnf ubuntu_xenial_vnf
 VNFD_SRC_DIR := src/vnfd
 VNFD_BUILD_DIR := $(BUILD_DIR)/vnfd
 
index ae0d7e1..cefd623 100755 (executable)
@@ -65,7 +65,6 @@ INTF_TYPE='VIRTIO'
 VCPU=2
 MEMORY=4096
 STORAGE=10
-CLOUD_INIT='#cloud-config '
 INTERFACES=1
 
 function usage() {
@@ -198,7 +197,7 @@ EOF
             # Cloud init file
             cloud-init-file: '${cif}'
 EOF
-    else
+    elif [[ -n ${CLOUD_INIT} ]]; then
         cat >>$desc_file <<EOF
             # Cloud init to use
             cloud-init: '${CLOUD_INIT}'
diff --git a/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png b/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png
new file mode 100644 (file)
index 0000000..62012d2
Binary files /dev/null and b/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png differ
diff --git a/src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml b/src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml
new file mode 100644 (file)
index 0000000..0c76998
--- /dev/null
@@ -0,0 +1,58 @@
+nsd:nsd-catalog:
+    nsd:
+    -   id: ubuntu_xenial_nsd
+        name: ubuntu_xenial_nsd
+        short-name: ubuntu_xenial_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_xenial_vnfd
+
+        vld:
+        # Networks for the VNFs
+            -   id: ubuntu_xenial_nsd_vld1
+                name: management
+                short-name: management
+                type: ELAN
+                vim-network-name: net-mgmtOS
+                # vim-network-name: <update>
+                # provider-network:
+                #     overlay-type: VLAN
+                #     segmentation_id: <update>
+                vnfd-connection-point-ref:
+                # Specify the constituent VNFs
+                # member-vnf-index-ref - entry from constituent vnf
+                # vnfd-id-ref - VNFD id
+                # vnfd-connection-point-ref - connection point name in the VNFD
+                -   nsd:member-vnf-index-ref: 1
+                    nsd:vnfd-id-ref: ubuntu_xenial_vnfd
+                    # NOTE: Validate the entry below
+                    nsd:vnfd-connection-point-ref: eth0
+            -   id: ubuntu_xenial_nsd_vld2
+                name: data
+                short-name: data
+                type: ELAN
+                vim-network-name: net-corp
+                # vim-network-name: <update>
+                # provider-network:
+                #     overlay-type: VLAN
+                #     segmentation_id: <update>
+                vnfd-connection-point-ref:
+                # Specify the constituent VNFs
+                # member-vnf-index-ref - entry from constituent vnf
+                # vnfd-id-ref - VNFD id
+                # vnfd-connection-point-ref - connection point name in the VNFD
+                -   nsd:member-vnf-index-ref: 1
+                    nsd:vnfd-id-ref: ubuntu_xenial_vnfd
+                    # NOTE: Validate the entry below
+                    nsd:vnfd-connection-point-ref: eth1
diff --git a/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png b/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png
new file mode 100644 (file)
index 0000000..e966783
Binary files /dev/null and b/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png differ
diff --git a/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml b/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml
new file mode 100644 (file)
index 0000000..5d6ca2c
--- /dev/null
@@ -0,0 +1,53 @@
+vnfd:vnfd-catalog:
+    vnfd:
+    -   id: ubuntu_xenial_vnfd
+        name: ubuntu_xenial_vnfd
+        short-name: ubuntu_xenial_vnfd
+        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: ubuntu-logo14.png
+
+        # Management interface
+        mgmt-interface:
+            vdu-id: ubuntu_xenial_vnfd-VM
+
+        # Atleast one VDU need to be specified
+        vdu:
+        -   id: ubuntu_xenial_vnfd-VM
+            name: ubuntu_xenial_vnfd-VM
+            description: ubuntu_xenial_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
+
+            # Image including the full path
+            image: '/mnt/powervault/virtualization/vnfs/demos/ubuntu/ubuntu-16.06.img'
+
+            external-interface:
+            # Specify the external interfaces
+            # There can be multiple interfaces defined
+            -   name: eth0
+                virtual-interface:
+                    type: OM-MGMT
+                    bandwidth: '0'
+                    vpci: 0000:00:0a.0
+                vnfd-connection-point-ref: eth0
+            -   name: eth1
+                virtual-interface:
+                    type: VIRTIO
+                    bandwidth: '0'
+                    vpci: 0000:00:0b.0
+                vnfd-connection-point-ref: eth1
+
+        connection-point:
+            -   name: eth0
+                type: VPORT
+            -   name: eth1
+                type: VPORT