Skip to content

Creating OSM Packages

RafaelSche edited this page Aug 10, 2019 · 2 revisions

Creating OSM Packages

  1. Create an OSM-project or use the example
  2. Package the project
tng-sdk-package --format eu.etsi.osm -p misc/mixed-ns-project

# output
===============================================================================
P A C K A G I N G   R E P O R T
===============================================================================
Packaged:    misc/mixed-ns-project
Project:     eu.5gtango.mixed-ns-package-example.0.1
Artifacts:   11
Output:      eu.5gtango.mixed-ns-package-example.0.1
Error:       None
Result:      Success.
===============================================================================

As output a folder will be created with the packages within.

Which files are added to a package depends on type and tags set in the project.yml. For each file of type application/vnd.5gtango.nsd a network service package will be created and for each file of type application/vnd.5gtango.vnfd a vnf-package. ns-packages and vnf-packages differ only in the directory tree inside the package.

# ns package tree
├── eu.5gtango.mixed-ns-package-example.0.1_osm_nsd
│   ├── checksums.txt
│   ├── icons
│   ├── ns_config
│   ├── osm_nsd.yaml
│   ├── scripts
│   └── vnf_config
# vnf package tree
├── eu.5gtango.mixed-ns-package-example.0.1_osm_vnfd
│   ├── charms
│   ├── checksums.txt
│   ├── cloud_init
│   ├── icons
│   ├── images
│   ├── osm_vnfd.yaml
│   └── scripts

Files tagged with etsi.osm will be added to all packages into the the root directory, if you do not specify another directory with the tag "osm-target:<path/to/folder>". Other possible tags are etsi.osm.ns (adds a file only to the ns-package), etsi.osm.vnf (adds a file only to all vnf-packages), etsi.osm.vnf.<file_name_of_vnfd> (adds a file only to the vnf-package the according filename of vnf-descriptor).

descriptor_extension: yml
version: '0.5'
package:
  vendor: eu.5gtango
  name: mixed-ns-package-example
  version: '0.1'
  maintainer: Manuel Peuster, Paderborn University
  description: This is an example for a mixed network service project.
files:
- tags: []
  path: Definitions/5gtango_nsd.yaml
  type: application/vnd.5gtango.nsd
- tags: []
  path: Definitions/5gtango_vnfd.yaml
  type: application/vnd.5gtango.vnfd
- tags: []
  path: osm_nsd.yaml
  type: application/vnd.osm.nsd
- tags: []
  path: osm_vnfd.yaml
  type: application/vnd.osm.vnfd
- tags: []
  path: onap_nsd.yaml
  type: application/vnd.onap.nsd
- tags: []
  path: onap_vnfd.yaml
  type: application/vnd.onap.vnfd
- tags:
  - etsi.osm
  path: Icons/upb_logo.png
  type: image/png
- tags:
  - etsi.osm.vnf.osm_vnfd
  - lf.onap
  - osm-target:images
  - onap-target:Artifacts/Deployment/blabla/
  path: Images/mycloudimage.ref
  type: application/vnd.5gtango.ref
- tags: []
  path: Licenses/LICENSE
  type: text/plain
- tags:
  - etsi.osm.vnf.osm_vnfd
  - lf.onap
  path: test
  type: text/plain
- tags:
  - etsi.osm.vnf
  - osm-target:cloud_init
  path: Scripts/cloud.init
  type: text/x-shellscript

The above example of a project.yml would cause two packages, one network service package and one vnf-package. The files Images/mycloudimage.ref, Icons/upb_logo.png, Scripts/cloud.init and test will be included to the packages.

  • Images/mycloudimage.ref would be added to one single package with the vnf-descriptor-filename osm_vnfd.yaml in folder "images".
  • Icons/upb_logo.png would be added to all packages in folder "images", because it is of type image/png.
  • Scripts/cloud.init would be added to all vnf-packages in folder "cloud_init".
  • test would also be added to the package with the vnf-descriptor-filename osm_vnfd.yaml in the first subdirectory.