Andy Bavier | 95aa40c | 2016-01-05 09:55:23 -0500 | [diff] [blame] | 1 | #!/bin/sh |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 2 | |
Andy Bavier | 95aa40c | 2016-01-05 09:55:23 -0500 | [diff] [blame] | 3 | cat <<EOF |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 4 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 5 | |
| 6 | imports: |
| 7 | - custom_types/xos.yaml |
| 8 | |
Andy Bavier | 0566e1d | 2015-12-23 16:10:12 -0500 | [diff] [blame] | 9 | description: autogenerated nodes file |
Scott Baker | 381d140 | 2015-09-28 21:29:54 -0700 | [diff] [blame] | 10 | |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 11 | topology_template: |
| 12 | node_templates: |
| 13 | MyDeployment: |
Scott Baker | 381d140 | 2015-09-28 21:29:54 -0700 | [diff] [blame] | 14 | type: tosca.nodes.Deployment |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 15 | mysite: |
Scott Baker | 381d140 | 2015-09-28 21:29:54 -0700 | [diff] [blame] | 16 | type: tosca.nodes.Site |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 17 | EOF |
| 18 | |
Andy Bavier | 95aa40c | 2016-01-05 09:55:23 -0500 | [diff] [blame] | 19 | NODES=$( bash -c "source ./setup/admin-openrc.sh ; nova hypervisor-list" |grep enabled|awk '{print $4}' ) |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 20 | I=0 |
| 21 | for NODE in $NODES; do |
Andy Bavier | 95aa40c | 2016-01-05 09:55:23 -0500 | [diff] [blame] | 22 | # echo $NODE |
| 23 | cat <<EOF |
Scott Baker | 431c1e4 | 2015-09-28 16:43:10 -0700 | [diff] [blame] | 24 | $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 |
| 33 | EOF |
| 34 | done |