blob: ef84c6865933426b2ae90544877862b2262fb9fa [file] [log] [blame]
Andy Bavier95aa40c2016-01-05 09:55:23 -05001#!/bin/sh
Scott Baker431c1e42015-09-28 16:43:10 -07002
Andy Bavier95aa40c2016-01-05 09:55:23 -05003cat <<EOF
Scott Baker431c1e42015-09-28 16:43:10 -07004tosca_definitions_version: tosca_simple_yaml_1_0
5
6imports:
7 - custom_types/xos.yaml
8
Andy Bavier0566e1d2015-12-23 16:10:12 -05009description: autogenerated nodes file
Scott Baker381d1402015-09-28 21:29:54 -070010
Scott Baker431c1e42015-09-28 16:43:10 -070011topology_template:
12 node_templates:
13 MyDeployment:
Scott Baker381d1402015-09-28 21:29:54 -070014 type: tosca.nodes.Deployment
Scott Baker431c1e42015-09-28 16:43:10 -070015 mysite:
Scott Baker381d1402015-09-28 21:29:54 -070016 type: tosca.nodes.Site
Scott Baker431c1e42015-09-28 16:43:10 -070017EOF
18
Andy Bavier95aa40c2016-01-05 09:55:23 -050019NODES=$( bash -c "source ./setup/admin-openrc.sh ; nova hypervisor-list" |grep enabled|awk '{print $4}' )
Scott Baker431c1e42015-09-28 16:43:10 -070020I=0
21for NODE in $NODES; do
Andy Bavier95aa40c2016-01-05 09:55:23 -050022 # echo $NODE
23 cat <<EOF
Scott Baker431c1e42015-09-28 16:43:10 -070024 $NODE:
25 type: tosca.nodes.Node
26 requirements:
27 - site:
28 node: mysite
29 relationship: tosca.relationships.MemberOfSite
30 - deployment:
31 node: MyDeployment
32 relationship: tosca.relationships.MemberOfDeployment
33EOF
34done