blob: 6fe1e01cb551ef4b60f5dd434cf24f984c35d2da [file] [log] [blame]
Zack Williams682450e2016-11-19 09:04:41 -07001tosca_definitions_version: tosca_simple_yaml_1_0
2
3imports:
4 - custom_types/xos.yaml
5
6description: autogenerated node tags file for VTN configuration
7
8topology_template:
9 node_templates:
10
11 service#ONOS_CORD:
12 type: tosca.nodes.ONOSService
13 requirements:
14 properties:
15 kind: onos
16 view_url: /admin/onos/onosservice/$id$/
17 no_container: true
18 rest_hostname: onos-cord
19 replaces: service_ONOS_CORD
20
21 service#vtn:
22 type: tosca.nodes.VTNService
23 properties:
24 view_url: /admin/vtn/vtnservice/$id$/
25 privateGatewayMac: 00:00:00:00:00:01
26 localManagementIp: {{ management_network_ip }}
27 ovsdbPort: 6641
28 sshUser: root
29 sshKeyFile: /root/node_key
30 sshPort: 22
31 xosEndpoint: http://xos:8888/
32 xosUser: padmin@vicci.org
33 xosPassword: letmein
34 replaces: service_vtn
35 vtnAPIVersion: 2
36
37{% for node in groups["compute"] %}
Zack Williams96ffd662016-11-22 07:12:35 -070038{% if 'ipv4' in hostvars[node]['ansible_fabric'] %}
39
Zack Williams682450e2016-11-19 09:04:41 -070040 {{ hostvars[node]['ansible_hostname'] }}:
41 type: tosca.nodes.Node
42
43 # VTN bridgeId field for node {{ hostvars[node]['ansible_hostname'] }}
44 {{ hostvars[node]['ansible_hostname'] }}_bridgeId_tag:
45 type: tosca.nodes.Tag
46 properties:
47 name: bridgeId
Zack Williams96ffd662016-11-22 07:12:35 -070048 value: of:0000{{ hostvars[node]['ansible_fabric']['macaddress'] | hwaddr('bare') }}
Zack Williams682450e2016-11-19 09:04:41 -070049 requirements:
50 - target:
51 node: {{ hostvars[node]['ansible_hostname'] }}
52 relationship: tosca.relationships.TagsObject
53 - service:
54 node: service#ONOS_CORD
55 relationship: tosca.relationships.MemberOfService
56
57 # VTN dataPlaneIntf field for node {{ hostvars[node]['ansible_hostname'] }}
58 {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIntf_tag:
59 type: tosca.nodes.Tag
60 properties:
61 name: dataPlaneIntf
62 value: fabric
63 requirements:
64 - target:
65 node: {{ hostvars[node]['ansible_hostname'] }}
66 relationship: tosca.relationships.TagsObject
67 - service:
68 node: service#ONOS_CORD
69 relationship: tosca.relationships.MemberOfService
70
71 # VTN dataPlaneIp field for node {{ hostvars[node]['ansible_hostname'] }}
72 {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIp_tag:
73 type: tosca.nodes.Tag
74 properties:
75 name: dataPlaneIp
Zack Williams682450e2016-11-19 09:04:41 -070076 value: {{ ( hostvars[node]['ansible_fabric']['ipv4']['address'] ~ '/' ~ hostvars[node]['ansible_fabric']['ipv4']['netmask'] ) | ipaddr('cidr') }}
Zack Williams682450e2016-11-19 09:04:41 -070077 requirements:
78 - target:
79 node: {{ hostvars[node]['ansible_hostname'] }}
80 relationship: tosca.relationships.TagsObject
81 - service:
82 node: service#ONOS_CORD
83 relationship: tosca.relationships.MemberOfService
84
Zack Williams96ffd662016-11-22 07:12:35 -070085{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -070086{% endfor %}
87
88 VTN_ONOS_app:
89 type: tosca.nodes.ONOSVTNApp
90 requirements:
91 - onos_tenant:
92 node: service#ONOS_CORD
93 relationship: tosca.relationships.TenantOfService
94 - vtn_service:
95 node: service#vtn
96 relationship: tosca.relationships.UsedByService
97 properties:
98 install_dependencies: http://mavenrepo:8080/repository/org/opencord/cord-config/1.1-SNAPSHOT/cord-config-1.1-SNAPSHOT.oar,http://mavenrepo:8080/repository/org/opencord/vtn/1.1-SNAPSHOT/vtn-1.1-SNAPSHOT.oar
99 dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp
100 autogenerate: vtn-network-cfg
101