Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | imports: |
| 4 | - custom_types/xos.yaml |
| 5 | |
| 6 | description: autogenerated node tags file for VTN configuration |
| 7 | |
| 8 | topology_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 |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 19 | rest_port: 8182 |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 20 | replaces: service_ONOS_CORD |
| 21 | |
| 22 | service#vtn: |
| 23 | type: tosca.nodes.VTNService |
| 24 | properties: |
| 25 | view_url: /admin/vtn/vtnservice/$id$/ |
| 26 | privateGatewayMac: 00:00:00:00:00:01 |
| 27 | localManagementIp: {{ management_network_ip }} |
| 28 | ovsdbPort: 6641 |
| 29 | sshUser: root |
| 30 | sshKeyFile: /root/node_key |
| 31 | sshPort: 22 |
| 32 | xosEndpoint: http://xos:8888/ |
| 33 | xosUser: padmin@vicci.org |
| 34 | xosPassword: letmein |
| 35 | replaces: service_vtn |
| 36 | vtnAPIVersion: 2 |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 37 | controllerPort: onos-cord:6654 |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 38 | |
| 39 | {% for node in groups["compute"] %} |
Zack Williams | 96ffd66 | 2016-11-22 07:12:35 -0700 | [diff] [blame] | 40 | {% if 'ipv4' in hostvars[node]['ansible_fabric'] %} |
| 41 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 42 | {{ hostvars[node]['ansible_hostname'] }}: |
| 43 | type: tosca.nodes.Node |
| 44 | |
| 45 | # VTN bridgeId field for node {{ hostvars[node]['ansible_hostname'] }} |
| 46 | {{ hostvars[node]['ansible_hostname'] }}_bridgeId_tag: |
| 47 | type: tosca.nodes.Tag |
| 48 | properties: |
| 49 | name: bridgeId |
Zack Williams | 96ffd66 | 2016-11-22 07:12:35 -0700 | [diff] [blame] | 50 | value: of:0000{{ hostvars[node]['ansible_fabric']['macaddress'] | hwaddr('bare') }} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 51 | requirements: |
| 52 | - target: |
| 53 | node: {{ hostvars[node]['ansible_hostname'] }} |
| 54 | relationship: tosca.relationships.TagsObject |
| 55 | - service: |
| 56 | node: service#ONOS_CORD |
| 57 | relationship: tosca.relationships.MemberOfService |
| 58 | |
| 59 | # VTN dataPlaneIntf field for node {{ hostvars[node]['ansible_hostname'] }} |
| 60 | {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIntf_tag: |
| 61 | type: tosca.nodes.Tag |
| 62 | properties: |
| 63 | name: dataPlaneIntf |
| 64 | value: fabric |
| 65 | requirements: |
| 66 | - target: |
| 67 | node: {{ hostvars[node]['ansible_hostname'] }} |
| 68 | relationship: tosca.relationships.TagsObject |
| 69 | - service: |
| 70 | node: service#ONOS_CORD |
| 71 | relationship: tosca.relationships.MemberOfService |
| 72 | |
| 73 | # VTN dataPlaneIp field for node {{ hostvars[node]['ansible_hostname'] }} |
| 74 | {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIp_tag: |
| 75 | type: tosca.nodes.Tag |
| 76 | properties: |
| 77 | name: dataPlaneIp |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 78 | value: {{ ( hostvars[node]['ansible_fabric']['ipv4']['address'] ~ '/' ~ hostvars[node]['ansible_fabric']['ipv4']['netmask'] ) | ipaddr('cidr') }} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 79 | requirements: |
| 80 | - target: |
| 81 | node: {{ hostvars[node]['ansible_hostname'] }} |
| 82 | relationship: tosca.relationships.TagsObject |
| 83 | - service: |
| 84 | node: service#ONOS_CORD |
| 85 | relationship: tosca.relationships.MemberOfService |
| 86 | |
Zack Williams | 96ffd66 | 2016-11-22 07:12:35 -0700 | [diff] [blame] | 87 | {% endif %} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 88 | {% endfor %} |
| 89 | |
| 90 | VTN_ONOS_app: |
| 91 | type: tosca.nodes.ONOSVTNApp |
| 92 | requirements: |
| 93 | - onos_tenant: |
| 94 | node: service#ONOS_CORD |
| 95 | relationship: tosca.relationships.TenantOfService |
| 96 | - vtn_service: |
| 97 | node: service#vtn |
| 98 | relationship: tosca.relationships.UsedByService |
| 99 | properties: |
| 100 | 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 |
| 101 | dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp |
| 102 | autogenerate: vtn-network-cfg |
| 103 | |