blob: f2555a49a1ab0043c219c7eac6645484d5addf41 [file] [log] [blame]
#FN=/opt/xos/configurations/common/cloudlab-nodes.yaml
FN=cloudlab-nodes.yaml
rm -f $FN
cat >> $FN <<EOF
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- custom_types/xos.yaml
description: autogenerated cloudlab nodes file
topology_template:
node_templates:
MyDeployment:
type: tosca.nodes.Deployment
mysite:
type: tosca.nodes.Site
EOF
NODES=$( bash -c "source ./admin-openrc.sh ; nova hypervisor-list" |grep enabled|awk '{print $4}' )
I=0
for NODE in $NODES; do
echo $NODE
cat >> $FN <<EOF
$NODE:
type: tosca.nodes.Node
requirements:
- site:
node: mysite
relationship: tosca.relationships.MemberOfSite
- deployment:
node: MyDeployment
relationship: tosca.relationships.MemberOfDeployment
EOF
done