blob: 65e16bbb37a6b67c96f25e121c30c4c00dc9df7f [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001FN=$SETUPDIR/nodes.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 MyDeployment:
16 type: tosca.nodes.Deployment
17 mysite:
18 type: tosca.nodes.Site
19EOF
20
21NODES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; nova host-list" |grep compute|awk '{print $2}' )
22I=0
23for NODE in $NODES; do
24 echo $NODE
25 cat >> $FN <<EOF
26 $NODE:
27 type: tosca.nodes.Node
28 requirements:
29 - site:
30 node: mysite
31 relationship: tosca.relationships.MemberOfSite
32 - deployment:
33 node: MyDeployment
34 relationship: tosca.relationships.MemberOfDeployment
35EOF
36done