From c836ee07a5cec51b2aef6cde13a12869746c3bef Mon Sep 17 00:00:00 2001 From: shiva-charan Date: Mon, 13 Mar 2017 13:33:05 -0400 Subject: [PATCH] Design document for policy2tosca patch set-2 Signed-off-by: shiva-charan Change-Id: I9f1d1def0c49dadb03c5bcc1d704465eb60cc80a --- docs/developer/design/policy2tosca.rst | 40 ++++++++++++++++++++++ .../installation/installation.instruction.rst | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/docs/developer/design/policy2tosca.rst b/docs/developer/design/policy2tosca.rst index 8dcedad..3ef1dca 100644 --- a/docs/developer/design/policy2tosca.rst +++ b/docs/developer/design/policy2tosca.rst @@ -5,4 +5,44 @@ Parser polic2tosca ================== +Problem description +------------------- +In NFV, various templates are utilized to describe the deployment requirements, +the post-instantiation records or other purposes.However in order to make these +templates adaptable and feasible for purpose like deployment orchestration/ +automation,certain tooling mechanism that provides template translation is +necessary.When an end user needs to inject/remove policies from the TOSCA +file generated the policy2tosca module comes in as part of parser project. +Design +------ +The following modules are implemented in policy2tosca module. + +CLIFF +----- +cliff is a framework for building command line programs. It uses plugins to +define sub-commands, output formatters, and other extensions.In policy2tosca +we use cliff to define the commands to inject or remove policies from +TOSCA templates. +Reference for PYANG: https://docs.openstack.org/developer/cliff/ + +policy2tosca +------------ +policy2tosca is a custom module written with the plugins of cliff where we +define adding/removing definitions and/or types of policies. +Following are the sub modules under policy2tosca + * add_definition.py: To inject a policy definition to the TOSCA template. + * add_type.py: To inject a policy type to the TOSCA template. + * del_definition.py: To remove a policy definition from the TOSCA template. + * del_type.py: To remove a policy type from the TOSCA template. + +Input +----- +The user specifies the input in command line arguments for the policy2tosca +custom module with the source TOSCA file to which the policies should be +injected/removed. + +Output +------ +The output TOSCA template will be the input TOSCA file with the +modification of policies. diff --git a/docs/release/installation/installation.instruction.rst b/docs/release/installation/installation.instruction.rst index ae2cbb1..323fd4a 100644 --- a/docs/release/installation/installation.instruction.rst +++ b/docs/release/installation/installation.instruction.rst @@ -162,4 +162,4 @@ Step 2: Install the apigateway submodule. python setup.py install **Notes**: In release D, apigateway submodule is only initial framework code, and more feature will -be provided in the next release. \ No newline at end of file +be provided in the next release. -- 2.16.6