X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fgenerate_descriptor_pkg.sh;h=a09fb6afd6cfe2dcbe0321813d5d9068158dce46;hb=5e780fc8cf2323cf29c251d99a2199009f2d040a;hp=ae0d7e106061473945bcd9d710ce06898ebb309e;hpb=14060ca02ef5d41f41e9a84916a0e06ec31a80bd;p=osm%2Fdevops.git diff --git a/src/generate_descriptor_pkg.sh b/src/generate_descriptor_pkg.sh index ae0d7e10..a09fb6af 100755 --- a/src/generate_descriptor_pkg.sh +++ b/src/generate_descriptor_pkg.sh @@ -65,7 +65,6 @@ INTF_TYPE='VIRTIO' VCPU=2 MEMORY=4096 STORAGE=10 -CLOUD_INIT='#cloud-config ' INTERFACES=1 function usage() { @@ -99,7 +98,7 @@ Usage: --vendor : Vendor name for descriptor. Default OSM - --interface-type : Interface type [VIRTIO|SR-IOV|PCI-PASSTHROUGH|E1000|OM-MGMT] + --interface-type : Interface type [VIRTIO|SR-IOV|PCI-PASSTHROUGH|E1000] Default VIRTIO VM Flavour options: @@ -119,7 +118,7 @@ Usage: --cloud-init : Cloud init script. Will be ignored if cloud-init-file is specified - --interfaces : Number of external interfaces. Default 1. + --interfaces : Number of external interfaces in additon to OM-MGMT. Default 1. End of create descriptor specific options @@ -152,6 +151,18 @@ get_pci() { printf '%02x' $((10 + $1)) | tr '[:upper:]' '[:lower:]' } +function write_readme() { + dir=$1 + file=${dir}/README + date=$(date) + + cat >$file <>$desc_file <>$desc_file <>$desc_file <>$desc_file <>$desc_file < + # service-primitive: + # - name: config + # parameter: + # - name: + # data-type: [STRING|INTEGER] + # mandatory: [true|false] + # default-value: + # - name: + # parameter: + # - name: + # data-type: [STRING|INTEGER] + # mandatory: [true|false] + # default-value: + # initial-config-primitive: + # - name: config + # parameter: + # - name: + # value: + # - name: + # parameter: + # - name: + # value: +EOF + if [ $VERBOSE == true ]; then echo "INFO: Created $desc_file" fi @@ -278,15 +332,39 @@ EOF # Networks for the VNFs EOF + # Add management VLD + cat >>$desc_file < + # provider-network: + # overlay-type: VLAN + # segmentation_id: + 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 +EOF + + # Add rest of VLDs for i in `seq 1 ${INTERFACES}`; do - eth=$(($i - 1)) + eth=$(($i)) cat >>$desc_file < # provider-network: # overlay-type: VLAN - # physical-network: # segmentation_id: vnfd-connection-point-ref: # Specify the constituent VNFs @@ -443,6 +521,8 @@ function generate_package(){ write_nsd_tmpl $dir $vnfd fi + write_readme $dir + if [ $ARCHIVE == true ]; then # Create archive of the package cd $dest_dir