Updated generate_descriptor_pkg to work with Rel FOUR 16/6316/5
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 25 Jun 2018 20:59:36 +0000 (22:59 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 18 Jul 2018 12:23:47 +0000 (14:23 +0200)
Change-Id: I8a3f7dc34bdb534671862c192fc4e255a62e6b57
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
descriptor-packages/tools/generate_descriptor_pkg.sh

index 5cf2510..1a30cf1 100755 (executable)
@@ -173,7 +173,7 @@ vnfd:vnfd-catalog:
     -   id: ${name}
         name: ${name}
         short-name: ${name}
-        description: Generated by OSM pacakage generator
+        description: Generated by OSM package generator
         vendor: ${VENDOR}
         version: '1.0'
 
@@ -182,7 +182,7 @@ vnfd:vnfd-catalog:
 
         # Management interface
         mgmt-interface:
-            vdu-id: ${name}-VM
+            cp: vnf-cp0
 
         # Atleast one VDU need to be specified
         vdu:
@@ -231,23 +231,18 @@ EOF
                 type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                    bandwidth: '0'
-                    vpci: '0000:00:0a.0'
-                external-connection-point-ref: eth0
+                external-connection-point-ref: vnf-cp0
 EOF
 
     # Add external interfaces
     for i in `seq 1 ${INTERFACES}`; do
         eth=$(($i))
-        pci=$(get_pci $eth)
         cat >>$desc_file <<EOF
             -   name: eth${eth}
                 type: EXTERNAL
                 virtual-interface:
                     type: ${INTF_TYPE}
-                    bandwidth: '0'
-                    vpci: '0000:00:${pci}.0'
-                external-connection-point-ref: eth${eth}
+                external-connection-point-ref: vnf-cp${eth}
 EOF
     done
 
@@ -260,8 +255,8 @@ EOF
     for i in `seq 0 ${INTERFACES}`; do
         eth=$(($i))
         cat >>$desc_file <<EOF
-            -   name: eth${eth}
-                type: ${CP_TYPE}
+        -   name: vnf-cp${eth}
+            type: ${CP_TYPE}
 EOF
     done
 
@@ -312,7 +307,7 @@ nsd:nsd-catalog:
     -   id: ${name}
         name: ${name}
         short-name: ${name}
-        description: Generated by OSM pacakage generator
+        description: Generated by OSM package generator
         vendor: ${VENDOR}
         version: '1.0'
 
@@ -336,49 +331,49 @@ EOF
 
     # Add management VLD
     cat >>$desc_file <<EOF
-            -   id: ${name}_vld0
-                name: management
-                short-name: management
-                type: ELAN
-                mgmt-network: 'true'
-                # 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: ${vnfd}
-                    # NOTE: Validate the entry below
-                    nsd:vnfd-connection-point-ref: eth0
+        -   id: ${name}_vld0
+            name: management
+            short-name: management
+            type: ELAN
+            mgmt-network: 'true'
+            # 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
+            -   member-vnf-index-ref: 1
+                vnfd-id-ref: ${vnfd}
+                # NOTE: Validate the entry below
+                vnfd-connection-point-ref: vnf-cp0
 EOF
 
     # Add rest of VLDs
     for i in `seq 1 ${INTERFACES}`; do
         eth=$(($i))
         cat >>$desc_file <<EOF
-            -   id: ${name}_vld${i}
-                name: ${name}_vld${i}
-                short-name: ${name}_vld${i}
-                type: ELAN
-                # 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: ${vnfd}
-                    # NOTE: Validate the entry below
-                    nsd:vnfd-connection-point-ref: eth${eth}
+        -   id: ${name}_vld${i}
+            name: ${name}_vld${i}
+            short-name: ${name}_vld${i}
+            type: ELAN
+            # 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
+            -   member-vnf-index-ref: 1
+                vnfd-id-ref: ${vnfd}
+                # NOTE: Validate the entry below
+                vnfd-connection-point-ref: vnf-cp${eth}
 EOF
-        done
+    done
 
     if [ $VERBOSE == true ]; then
         echo "INFO: Created $desc_file"