1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
11 Parser is an open source project and licensed under Apache 2. Parser will help
12 to provide a tooling mechanism, by parsing Telecom operators’ VNF descriptors
13 (YANG templates) into TOSCA templates and then further translate TOSCA
14 templates into certain common templates, which could be used in IaaS orchestration
15 projects like OpenStack Heat.
20 Parser - POLICY2TOSCA requires the following to be installed.
25 Install cliff with the following links.
27 - `install <http://docs.openstack.org/developer/cliff/install.html>`
29 - `demoapp <http://docs.openstack.org/developer/cliff/demoapp.html>`
32 ============================
34 Please follow the below installation steps to install parser - POLICY2TOSCA.
36 Step 1: Clone the parser project.
40 git clone https://gerrit.opnfv.org/gerrit/parser
42 Step 2: Install the policy2tosca module.
46 cd parser/policy2tosca
47 python setup.py install
50 ===========================
52 Step 1: To see a list of commands available.
58 Step 2: To see help for an individual command, include the command name on the command line
62 policy2tosca help <service>
64 Step 3: To inject/remove policy types/policy definitions provide the TOSCA file as input to policy2tosca command line.
68 policy2tosca <service> [arguments]
74 policy2tosca add-definition --policy_name rule2 --policy_type tosca.policies.Placement.Geolocation --description "test description" --properties region:us-north-1,region:us-north-2,min_inst:2 --targets VNF2,VNF4 --metadata "map of strings" --triggers "1,2,3,4" --source example.yaml
77 Step 4: Verify the TOSCA YAMl updated with the injection/removal executed.
81 cat "<source tosca file>"
87 cat example_tosca.yaml