Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Matteo Scandolo | 5b72803 | 2019-01-30 13:58:48 -0800 | [diff] [blame^] | 15 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @mcord-barcelona-fabric.yaml http://192.168.69.1:30007/run |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 16 | |
| 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | imports: |
| 19 | - custom_types/switch.yaml |
| 20 | - custom_types/switchport.yaml |
| 21 | - custom_types/portinterface.yaml |
| 22 | - custom_types/fabricipaddress.yaml |
| 23 | |
Matteo Scandolo | 5b72803 | 2019-01-30 13:58:48 -0800 | [diff] [blame^] | 24 | description: Configures the MCORD POD Fabric |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 29 | # Fabric configuration |
| 30 | switch#leaf_1: |
| 31 | type: tosca.nodes.Switch |
| 32 | properties: |
| 33 | driver: ofdpa3 |
| 34 | ipv4Loopback: 192.168.0.204 |
| 35 | ipv4NodeSid: 214 |
| 36 | isEdgeRouter: true |
| 37 | name: Agg Switch |
| 38 | ofId: of:0000000000000001 |
| 39 | routerMac: 54:87:de:ad:be:ef |
| 40 | |
| 41 | # Node1 Port |
| 42 | port#node_1_port: |
| 43 | type: tosca.nodes.SwitchPort |
| 44 | properties: |
Matteo Scandolo | 7cb060b | 2019-01-30 11:57:41 -0800 | [diff] [blame] | 45 | portId: 33 |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 46 | requirements: |
| 47 | - switch: |
| 48 | node: switch#leaf_1 |
| 49 | relationship: tosca.relationships.BelongsToOne |
| 50 | |
| 51 | interface#port_1_interface: |
| 52 | type: tosca.nodes.PortInterface |
| 53 | properties: |
| 54 | vlanUntagged: 20 |
| 55 | name: node_1 |
| 56 | requirements: |
| 57 | - port: |
| 58 | node: port#node_1_port |
| 59 | relationship: tosca.relationships.BelongsToOne |
| 60 | |
| 61 | ip#port_1_ip_1: |
| 62 | type: tosca.nodes.FabricIpAddress |
| 63 | properties: |
| 64 | ip: 13.1.1.0/24 |
| 65 | description: node_1_ip_1 |
| 66 | requirements: |
| 67 | - interface: |
| 68 | node: interface#port_1_interface |
| 69 | relationship: tosca.relationships.BelongsToOne |
| 70 | |
| 71 | ip#port_1_ip_2: |
| 72 | type: tosca.nodes.FabricIpAddress |
| 73 | properties: |
| 74 | ip: 119.0.0.254/24 |
| 75 | description: node_1_ip_2 |
| 76 | requirements: |
| 77 | - interface: |
| 78 | node: interface#port_1_interface |
| 79 | relationship: tosca.relationships.BelongsToOne |
| 80 | |
| 81 | # Node2 Port |
| 82 | port#node_2_port: |
| 83 | type: tosca.nodes.SwitchPort |
| 84 | properties: |
Matteo Scandolo | 7cb060b | 2019-01-30 11:57:41 -0800 | [diff] [blame] | 85 | portId: 34 |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 86 | requirements: |
| 87 | - switch: |
| 88 | node: switch#leaf_1 |
| 89 | relationship: tosca.relationships.BelongsToOne |
| 90 | |
| 91 | interface#port_2_interface: |
| 92 | type: tosca.nodes.PortInterface |
| 93 | properties: |
| 94 | vlanUntagged: 20 |
| 95 | name: node_2 |
| 96 | requirements: |
| 97 | - port: |
| 98 | node: port#node_2_port |
| 99 | relationship: tosca.relationships.BelongsToOne |
| 100 | |
| 101 | ip#port_2_ip_1: |
| 102 | type: tosca.nodes.FabricIpAddress |
| 103 | properties: |
| 104 | ip: 13.1.1.0/24 |
| 105 | description: node_2_ip_1 |
| 106 | requirements: |
| 107 | - interface: |
| 108 | node: interface#port_2_interface |
| 109 | relationship: tosca.relationships.BelongsToOne |
| 110 | |
| 111 | ip#port_2_ip_2: |
| 112 | type: tosca.nodes.FabricIpAddress |
| 113 | properties: |
| 114 | ip: 119.0.0.254/24 |
| 115 | description: node_2_ip_2 |
| 116 | requirements: |
| 117 | - interface: |
| 118 | node: interface#port_2_interface |
| 119 | relationship: tosca.relationships.BelongsToOne |
| 120 | |
| 121 | # Node3 Port |
| 122 | port#node_3_port: |
| 123 | type: tosca.nodes.SwitchPort |
| 124 | properties: |
Matteo Scandolo | 7cb060b | 2019-01-30 11:57:41 -0800 | [diff] [blame] | 125 | portId: 35 |
Matteo Scandolo | d246a87 | 2019-01-30 11:43:14 -0800 | [diff] [blame] | 126 | requirements: |
| 127 | - switch: |
| 128 | node: switch#leaf_1 |
| 129 | relationship: tosca.relationships.BelongsToOne |
| 130 | |
| 131 | interface#port_3_interface: |
| 132 | type: tosca.nodes.PortInterface |
| 133 | properties: |
| 134 | vlanUntagged: 20 |
| 135 | name: node_3 |
| 136 | requirements: |
| 137 | - port: |
| 138 | node: port#node_3_port |
| 139 | relationship: tosca.relationships.BelongsToOne |
| 140 | |
| 141 | ip#port_3_ip_1: |
| 142 | type: tosca.nodes.FabricIpAddress |
| 143 | properties: |
| 144 | ip: 13.1.1.0/24 |
| 145 | description: node_3_ip_1 |
| 146 | requirements: |
| 147 | - interface: |
| 148 | node: interface#port_3_interface |
| 149 | relationship: tosca.relationships.BelongsToOne |
| 150 | |
| 151 | ip#port_3_ip_2: |
| 152 | type: tosca.nodes.FabricIpAddress |
| 153 | properties: |
| 154 | ip: 119.0.0.254/24 |
| 155 | description: node_3_ip_2 |
| 156 | requirements: |
| 157 | - interface: |
| 158 | node: interface#port_3_interface |
| 159 | relationship: tosca.relationships.BelongsToOne |