-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This document outlines how to use the SolCon tool to convert TOSCA YAML SOL001 files to JSON SOL006 files to be able to load merge into NCS in Rel3 with the SOL6 VNFD model.
It is important to note that the expectation for this tool is that it will do 80-90% of the work, and the last 10% be manually completed, as there are some things the converter cannot handle. See the Limitations section for more details.
You can install the converter in any of the following ways:
- Install the compiled binary on your system and run the converter
- Install and run the converter from the source code
The following sections provide detailed descriptions. This documentation uses solcon-OSX-0.6 download to provide examples. Be sure to replace -OSX-0.6 in the commands listed in this documentation with your appropriate operating system and version for the converter tool.
-
Download the most recent version of SolCon for your supported operating system from here.
If you are not running OSX, Ubuntu, or CentOS see Installing and Running from Source. -
Make sure you are able to run the executable file to confirm installation.
chmod +x solcon-OSX-0.6
-
Ensure the input and configuration files are present on your machine.
Input files are TOSCA specified YAML files, such as altiostar_vCU.yaml- Configuration files are in TOML format
- TOSCA configuration for ESC VNFDs: config-esc.toml
Note:
config-esc.toml
determines how the YAML VNFD is read, andconfig-sol6.toml
specifies how the JSON SOL6 VNFD is output.These are default files and do not need to be modified.
- Configuration files are in TOML format
-
Run the compiled program from the terminal:
./solcon-OSX-0.6 -f altiostar_vCU.yaml -o output_altiostar.json -c config-esc.toml
The argument
-o output_altiostar.json
determines the location and name of the JSON file.
If the program fails to run, download and run the package from the source code. See Installing and Running from Source for more information. -
Load merge the JSON file into NCS.
Instead of entering NCS, run the following terminal commandncs_load -lm -F o altiostar_vCU.json
- -lm stands for load merge
- -F is the format
- o is the flag for JSON format
If the file to be load merged is not properly formatted, or is missing some required fields, the ncs_load program will display an error. See Troubleshooting and Diagnostics for more information.
You can install and run SolCon from the source code if you are unable to install and run from the compiled binary, or if you wish to make changes on your own.
There are two options for downloading and installing the source code, the automated one is recommended.
- Download download-repo.sh
- To download, extract, and setup the required packages, run
sh download-repo.sh
- Download the source code from the repository. See Source.
- Download and install Python3 based on your OS.
- Once python3 is installed, run the following command to install the PyYAML and toml packages
sh tools/setup-script.sh
- Run the SolCon program
python3 solcon.py -f altiostar_vCU.yaml -o output_altiostar.json -c config-esc.toml
-
Load merge the JSON file into NCS.
Instead of entering NCS, run the following terminal commandncs_load -lm -F o altiostar_vCU.json
- -lm stands for load merge
- -F is the format
- o is the flag for JSON format
If the file to be load merged is not properly formatted, or is missing some required fields, the ncs_load program will display an error. See Troubleshooting and Diagnostics for more information.
SolCon makes liberal use of WARNING log messages, for example:
NFO - Starting Cisco TOSCA -> SOL6 converter.
WARNING - parameters not found in topology_template;node_templates;vnf;interfaces;Vnflcm;insta
WARNING - type not found in topology_template;node_templates;vBBU1_vol;properties;virtual_bloc
These kinds of warnings are semi-expected, and they do not preclude the converter from generating an output file. Specifically they occur when a field is expected in the TOSCA file, but is not found. Unless it is an extremly important field, the program just prints the warning message and continues converting what it can.
The converter will output an ERROR message when something critical has gone wrong. An output file will not be generated when an error occurs.
Run the SolCon converter program with the log-level set to debug.
./solcon-OSX-0.6 (...) --log-level DEBUG
This helps to capture more log information than running the program in the info mode. Use the log
information stored in the logs/ folder to troubleshoot and diagnose any problems that you may encounter
with the tool
Ensure the types in config-esc.toml
match the types in the TOSCA VNFD.
For example, given the following definitions in a TOSCA file:
c1:
type: cisco.nodes.nfv.Vdu.Compute
vnfd1-deployment-control-function-1-cf-boot:
type: cisco.nodes.nfv.Vdu.VirtualBlockStorage
c1_nic0:
type: cisco.nodes.nfv.VduCp
The config-esc.toml configuration file must look like this:
[provider_identifiers.cisco]
vdu = ["type", "cisco.nodes.nfv.Vdu.Compute"]
int_cpd = ["type", "cisco.nodes.nfv.VduCp"]
int_cpd_mgmt = ["type", "cisco.nodes.nfv.VduCp"]
virtual_storage = ["type", "cisco.nodes.nfv.Vdu.VirtualBlockStorage"]
There are more type definitions in the default files. If any of the types are not set correctly in the configuration, they will not be found by the converter and thus will be skipped.
- Any data not present in the TOSCA file will not be able to be generated for the SOL6 model.
- Internal connection points and external connection points must have unique names.
- Type extension and default values are not supported at this time.
Here is the link to the source code for the converter.
If you are installing from the source code, this is where you need to download it. You are free to make
modifications to the source code (check the license for specifics.)