summaryrefslogtreecommitdiffstats
path: root/app/simple_compose.py
diff options
context:
space:
mode:
authorStone, Avi (as206k) <as206k@att.com>2018-04-12 16:41:45 +0300
committerStone, Avi (as206k) <as206k@att.com>2018-04-12 16:41:45 +0300
commit879e94b78193798e8b170fca9b924d2c3881f7ba (patch)
tree150de697138a7593869eaae455add025b06a6e04 /app/simple_compose.py
parent7e02c7aaab14828ef8baaef98865f26d98e3b795 (diff)
DCAE-D tosca-lab initial commit
DCAE-D tosca-lab initial commit Change-Id: Ia42934ce7c75abe05fa106585c9334c8b048ee36 Issue-ID: SDC-1218 Signed-off-by: Stone, Avi (as206k) <as206k@att.com>
Diffstat (limited to 'app/simple_compose.py')
-rw-r--r--app/simple_compose.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/simple_compose.py b/app/simple_compose.py
new file mode 100644
index 0000000..8dc9561
--- /dev/null
+++ b/app/simple_compose.py
@@ -0,0 +1,24 @@
+#Author: Shu Shi
+#emaiL: shushi@research.att.com
+
+from toscalib.tosca_workbook import ToscaWorkBook
+
+workbook = ToscaWorkBook()
+
+workbook._import_dir('./data/tosca_model/')
+workbook._import_dir('./data/shared_model/')
+
+workbook._use('foi', 'NO_PREFIX')
+workbook._assign('policy_0', 'policy_id', 'something_filled_by_CLAMP')
+
+workbook._export_yaml('test_template.yaml', 'noexpand,main,rawfunc')
+
+workbook._add_shared_node([{'dcae.capabilities.dockerHost': 'docker_host'}, {'dcae.capabilities.composition.host': 'composition_virtual'}])
+
+workbook._load_translation_db('./data/tosca_model/')
+workbook._load_translation_db('./data/shared_model/')
+
+workbook._export_yaml('./data/blueprint/foi.yaml', 'cloudify,main')
+#workbook._export_yaml('test_template2.yaml', 'noexpand,main,rawfunc')
+
+