summaryrefslogtreecommitdiffstats
path: root/app/simple_compose.py
blob: 8dc9561ca4453c1575577dab0f13919b4e831d0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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')