Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osm
devops
Commits
92b4260a
Commit
92b4260a
authored
8 years ago
by
Philip Joseph
Browse files
Options
Downloads
Patches
Plain Diff
Update template with README and comments
Signed-off-by:
Philip Joseph
<
philip.joseph@riftio.com
>
parent
ff2d83fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/generate_descriptor_pkg.sh
+47
-0
47 additions, 0 deletions
src/generate_descriptor_pkg.sh
with
47 additions
and
0 deletions
src/generate_descriptor_pkg.sh
+
47
−
0
View file @
92b4260a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment