summaryrefslogtreecommitdiffstats
path: root/docs/developer/design
diff options
context:
space:
mode:
authorshiva-charan <shiva-charan.m-s@hpe.com>2017-03-13 13:33:05 -0400
committerZhipeng (Howard) Huang <huangzhipeng@huawei.com>2017-03-14 14:11:26 +0000
commitebef6bccca8315e5db046d7e726f92b292d0b712 (patch)
treeb4f3e17216de0c40dfe977828eb9a4dd71881b6b /docs/developer/design
parentea9d47bbd0a06d0cca1738f244ab8b30e57ed9c6 (diff)
Design document for policy2tosca patch set-2
Signed-off-by: shiva-charan <shiva-charan.m-s@hpe.com> Change-Id: I9f1d1def0c49dadb03c5bcc1d704465eb60cc80a (cherry picked from commit c836ee07a5cec51b2aef6cde13a12869746c3bef)
Diffstat (limited to 'docs/developer/design')
-rw-r--r--docs/developer/design/policy2tosca.rst40
1 files changed, 40 insertions, 0 deletions
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.