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 |
| 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"] %} |
| 38 | {{ hostvars[node]['ansible_hostname'] }}: |
| 39 | type: tosca.nodes.Node |
| 40 | |
| 41 | # VTN bridgeId field for node {{ hostvars[node]['ansible_hostname'] }} |
| 42 | {{ hostvars[node]['ansible_hostname'] }}_bridgeId_tag: |
| 43 | type: tosca.nodes.Tag |
| 44 | properties: |
| 45 | name: bridgeId |
| 46 | value: of:{{ "%016d" | format(loop.index) }} |
| 47 | requirements: |
| 48 | - target: |
| 49 | node: {{ hostvars[node]['ansible_hostname'] }} |
| 50 | relationship: tosca.relationships.TagsObject |
| 51 | - service: |
| 52 | node: service#ONOS_CORD |
| 53 | relationship: tosca.relationships.MemberOfService |
| 54 | |
| 55 | # VTN dataPlaneIntf field for node {{ hostvars[node]['ansible_hostname'] }} |
| 56 | {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIntf_tag: |
| 57 | type: tosca.nodes.Tag |
| 58 | properties: |
| 59 | name: dataPlaneIntf |
| 60 | value: fabric |
| 61 | requirements: |
| 62 | - target: |
| 63 | node: {{ hostvars[node]['ansible_hostname'] }} |
| 64 | relationship: tosca.relationships.TagsObject |
| 65 | - service: |
| 66 | node: service#ONOS_CORD |
| 67 | relationship: tosca.relationships.MemberOfService |
| 68 | |
| 69 | # VTN dataPlaneIp field for node {{ hostvars[node]['ansible_hostname'] }} |
| 70 | {{ hostvars[node]['ansible_hostname'] }}_dataPlaneIp_tag: |
| 71 | type: tosca.nodes.Tag |
| 72 | properties: |
| 73 | name: dataPlaneIp |
| 74 | {% if 'ipv4' in hostvars[node]['ansible_fabric'] %} |
| 75 | value: {{ ( hostvars[node]['ansible_fabric']['ipv4']['address'] ~ '/' ~ hostvars[node]['ansible_fabric']['ipv4']['netmask'] ) | ipaddr('cidr') }} |
| 76 | {% else %}{# single node case #} |
| 77 | value: 10.168.0.253/24 |
| 78 | {% endif %} |
| 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 | |
| 87 | {% endfor %} |
| 88 | |
| 89 | VTN_ONOS_app: |
| 90 | type: tosca.nodes.ONOSVTNApp |
| 91 | requirements: |
| 92 | - onos_tenant: |
| 93 | node: service#ONOS_CORD |
| 94 | relationship: tosca.relationships.TenantOfService |
| 95 | - vtn_service: |
| 96 | node: service#vtn |
| 97 | relationship: tosca.relationships.UsedByService |
| 98 | properties: |
| 99 | 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 |
| 100 | dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp |
| 101 | autogenerate: vtn-network-cfg |
| 102 | |