Skip to content
Snippets Groups Projects
Commit 92b4260a authored by Philip Joseph's avatar Philip Joseph
Browse files

Update template with README and comments


Signed-off-by: default avatarPhilip Joseph <philip.joseph@riftio.com>
parent ff2d83fe
No related branches found
No related tags found
No related merge requests found
......@@ -151,6 +151,18 @@ get_pci() {
printf '%02x' $((10 + $1)) | tr '[:upper:]' '[:lower:]'
}
function write_readme() {
dir=$1
file=${dir}/README
date=$(date)
cat >$file <<EOF
Descriptor created by OSM descriptor package generated
Created on $date
EOF
}
function write_vnfd_tmpl() {
name=$(basename $1)
desc_file="${name}.yaml"
......@@ -174,6 +186,8 @@ vnfd:vnfd-catalog:
# Atleast one VDU need to be specified
vdu:
# Additional VDUs can be created by copying the
# VDU descriptor below
- id: ${name}-VM
name: ${name}-VM
description: ${name}-VM
......@@ -249,6 +263,37 @@ EOF
EOF
done
cat >>$desc_file <<EOF
# Uncomment and update below to enable juju
# charm configuration for the VNF
# vnf-configuration:
# juju:
# charm: <charm name>
# service-primitive:
# - name: config
# parameter:
# - name: <config parameter>
# data-type: [STRING|INTEGER]
# mandatory: [true|false]
# default-value: <value>
# - name: <action name>
# parameter:
# - name: <action parameter>
# data-type: [STRING|INTEGER]
# mandatory: [true|false]
# default-value: <value>
# initial-config-primitive:
# - name: config
# parameter:
# - name: <config name>
# value: <value>
# - name: <action name>
# parameter:
# - name: <action parameter>
# value: <value>
EOF
if [ $VERBOSE == true ]; then
echo "INFO: Created $desc_file"
fi
......@@ -475,6 +520,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment