blob: 6321a9d8da00294ab11063447515328b14d31d8c [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001FN=$SETUPDIR/images.yaml
2
3rm -f $FN
4
5cat >> $FN <<EOF
6tosca_definitions_version: tosca_simple_yaml_1_0
7
8imports:
9 - custom_types/xos.yaml
10
11description: autogenerated nodes file
12
13topology_template:
14 node_templates:
15 mysite:
16 type: tosca.nodes.Site
17
18EOF
19
20IMAGES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; glance image-list" |grep -v ID|grep -v +|awk '{print $4}' )
21I=0
22for IMAGE in $IMAGES; do
23 echo $IMAGE
24 cat >> $FN <<EOF
25 $IMAGE:
26 type: tosca.nodes.Image
27 properties:
28 disk_format: QCOW2
29 container_format: BARE
30
31EOF
32done
33
34cat >> $FN <<EOF
35 MyDeployment:
36 type: tosca.nodes.Deployment
37 properties:
38 flavors: m1.large, m1.medium, m1.small
39 requirements:
40EOF
41
42for IMAGE in $IMAGES; do
43 cat >> $FN <<EOF
44 - image:
45 node: $IMAGE
46 relationship: tosca.relationships.SupportsImage
47EOF
48done