Skip to content

Translating SONATA SDK projects to 5GTAGNO SDK projects

Stefan Schneider edited this page Jul 1, 2018 · 7 revisions

There are a number of small but important differences between old SONATA (v3.1) and new 5GTANGO (v4.0) projects. Old SONATA projects are not compatible with the new workflow and cannot be packaged correctly. Hence, they need to be adjusted as described here. The tng-project tool can do this translation automatically.

Project manifest (project.yml)

Project files

Old SONATA project.yml files are missing a files section which contains a list of files which are involved in the project, e.g., the descriptors. So you have to add something like this:

files:
 - path: sources/nsd/tango-tng-vrouter.yml
   tags:
   - eu.5gtango
   type: application/vnd.5gtango.nsd
 - path: sources/vnf/vrouter/vrouter-vnfd.yml
   tags:
   - eu.5gtango
   type: application/vnd.5gtango.vnfd

to the old project.yml. Which will finally look like:

descriptor_extension: yml
files:
- path: sources/nsd/tango-tng-vrouter.yml
  tags:
  - eu.5gtango
  type: application/vnd.5gtango.nsd
- path: sources/vnf/vrouter/vrouter-vnfd.yml
  tags:
  - eu.5gtango
  type: application/vnd.5gtango.vnfd
package:
  description: Project for the development of vrouter + fsm service
  maintainer: Miguel Mesquita, Alticelabs
  name: tango-vrouter-fsm
  vendor: eu.sonata-nfv
  version: '0.1'
version: '0.5'

Version number

The version number of the project.yml must be (at least) 0.5. Older versions are no longer supported and will lead to an error message. So make sure to also update the version number to 0.5. This only refers to the project.yml version number at the bottom, not version number of the package block (0.1 in the example above).

Folder structure

In old SONATA projects, there had to be a specific folder structure and all artifacts had to be at specific folders. In new 5GTANGO projects, there is no mandatory folder structure and files can be located anywhere, but they have to be listed in the files section of the project.yml.

Descriptor Files

The old SONATA descriptors (NSDs and VNFDs) contained descriptor_version fields. Those need to be replaces by a new descriptor_schema field pointing to the schema file that defines the structure of the given descriptor.

Remove:

descriptor_version: "1.0"

Insert:

# NSDs
descriptor_schema: "https://raw.githubusercontent.com/sonata-nfv/tng-schema/master/service-descriptor/nsd-schema.yml"

# VNFDs
descriptor_schema: "https://raw.githubusercontent.com/sonata-nfv/tng-schema/master/function-descriptor/vnfd-schema.yml"

Automation

To translate an old project into a new one use the following command:

$ tng-project -p path/to/old/project --translate

This does the following:

  • Update VNFD and NSD descriptors (replacing descriptor_version with descriptor_schema)
  • Update add files section to project.yml
  • Update version number in project.yml