blob: fc059222028e497bc7276bd41c74cd9d4dbdd836 [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001FN=$SETUPDIR/vtn-external.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 node tags file for VTN configuration
12
13topology_template:
14 node_templates:
15
16 service#ONOS_CORD:
17 type: tosca.nodes.ONOSService
18 requirements:
19 properties:
20 kind: onos
21 view_url: /admin/onos/onosservice/\$id$/
22 no_container: true
23 rest_hostname: onos-cord
24 replaces: service_ONOS_CORD
25
26 service#vtn:
27 type: tosca.nodes.VTNService
28 properties:
29 view_url: /admin/vtn/vtnservice/\$id$/
30 privateGatewayMac: 00:00:00:00:00:01
31 localManagementIp: 172.27.0.1/24
32 ovsdbPort: 6641
33 sshUser: root
34 sshKeyFile: /root/node_key
35 sshPort: 22
36 xosEndpoint: http://xos/
37 xosUser: padmin@vicci.org
38 xosPassword: letmein
39 replaces: service_vtn
40
41EOF
42
43NODES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; nova host-list" |grep compute|awk '{print $2}' )
44I=0
45for NODE in $NODES; do
46 echo $NODE
47 cat >> $FN <<EOF
48 $NODE:
49 type: tosca.nodes.Node
50
51 # VTN bridgeId field for node $NODE
52 ${NODE}_bridgeId_tag:
53 type: tosca.nodes.Tag
54 properties:
55 name: bridgeId
56 value: of:0000000000000001
57 requirements:
58 - target:
59 node: $NODE
60 relationship: tosca.relationships.TagsObject
61 - service:
62 node: service#ONOS_CORD
63 relationship: tosca.relationships.MemberOfService
64
65 # VTN dataPlaneIntf field for node $NODE
66 ${NODE}_dataPlaneIntf_tag:
67 type: tosca.nodes.Tag
68 properties:
69 name: dataPlaneIntf
70 value: fabric
71 requirements:
72 - target:
73 node: $NODE
74 relationship: tosca.relationships.TagsObject
75 - service:
76 node: service#ONOS_CORD
77 relationship: tosca.relationships.MemberOfService
78
79 # VTN dataPlaneIp field for node $NODE
80 ${NODE}_dataPlaneIp_tag:
81 type: tosca.nodes.Tag
82 properties:
83 name: dataPlaneIp
84 value: 10.168.0.253/24
85 requirements:
86 - target:
87 node: $NODE
88 relationship: tosca.relationships.TagsObject
89 - service:
90 node: service#ONOS_CORD
91 relationship: tosca.relationships.MemberOfService
92
93EOF
94done
95
96cat >> $FN <<EOF
97 VTN_ONOS_app:
98 type: tosca.nodes.ONOSVTNApp
99 requirements:
100 - onos_tenant:
101 node: service#ONOS_CORD
102 relationship: tosca.relationships.TenantOfService
103 - vtn_service:
104 node: service#vtn
105 relationship: tosca.relationships.UsedByService
106 properties:
Andy Bavier22bf6e32016-07-08 10:45:11 -0400107 install_dependencies: http://mavenrepo:8080/repository/org/opencord/cord-config/1.0-SNAPSHOT/cord-config-1.0-SNAPSHOT.oar,http://mavenrepo:8080/repository/org/opencord/vtn/1.0-SNAPSHOT/vtn-1.0-SNAPSHOT.oar
Scott Baker50421662016-06-27 22:09:48 -0700108 dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp
109 autogenerate: vtn-network-cfg
110EOF