Wei-Yu Chen | aff3d2b | 2019-04-17 10:50:10 -0700 | [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 | |
| 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 |
| 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 | - custom_types/site.yaml |
| 24 | - custom_types/deployment.yaml |
| 25 | - custom_types/sitedeployment.yaml |
| 26 | - custom_types/node.yaml |
| 27 | - custom_types/vrouterservice.yaml |
| 28 | - custom_types/vrouterserviceinstance.yaml |
| 29 | |
| 30 | description: Configures the ONF SEBA POD with AT&T workflow |
| 31 | |
| 32 | topology_template: |
| 33 | node_templates: |
| 34 | |
| 35 | # Site deployment |
| 36 | mySite: |
| 37 | type: tosca.nodes.Site |
| 38 | properties: |
| 39 | name: mysite |
| 40 | login_base: opencord |
| 41 | abbreviated_name: ms |
| 42 | site_url: http://opencord.org/ |
| 43 | hosts_nodes: true |
| 44 | |
| 45 | myDeployment: |
| 46 | type: tosca.nodes.Deployment |
| 47 | properties: |
| 48 | name: mydeployment |
| 49 | |
| 50 | site_deployment: |
| 51 | type: tosca.nodes.SiteDeployment |
| 52 | requirements: |
| 53 | - site: |
| 54 | node: mySite |
| 55 | relationship: tosca.relationships.BelongsToOne |
| 56 | - deployment: |
| 57 | node: myDeployment |
| 58 | relationship: tosca.relationships.BelongsToOne |
| 59 | |
| 60 | # compute nodes |
| 61 | node#node1: |
| 62 | type: tosca.nodes.Node |
| 63 | properties: |
| 64 | dataPlaneIntf: eth2 |
| 65 | dataPlaneIp: 118.0.0.201 |
| 66 | name: node1 |
| 67 | requirements: |
| 68 | - site_deployment: |
| 69 | node: site_deployment |
| 70 | relationship: tosca.relationships.BelongsToOne |
| 71 | |
| 72 | node#node2: |
| 73 | type: tosca.nodes.Node |
| 74 | properties: |
| 75 | dataPlaneIntf: eth2 |
| 76 | dataPlaneIp: 118.0.0.202 |
| 77 | name: node2 |
| 78 | requirements: |
| 79 | - site_deployment: |
| 80 | node: site_deployment |
| 81 | relationship: tosca.relationships.BelongsToOne |
| 82 | |
| 83 | # static routes |
| 84 | service#vrouter: |
| 85 | type: tosca.nodes.VRouterService |
| 86 | properties: |
| 87 | name: vrouter |
| 88 | must-exist: true |
| 89 | |
| 90 | vroutersi#calico: |
| 91 | type: tosca.nodes.VRouterServiceInstance |
| 92 | properties: |
| 93 | name: calico |
| 94 | requirements: |
| 95 | - owner: |
| 96 | node: service#vrouter |
| 97 | relationship: tosca.relationships.BelongsToOne |
| 98 | |
| 99 | # Fabric configuration |
| 100 | switch#leaf_1: |
| 101 | type: tosca.nodes.Switch |
| 102 | properties: |
| 103 | driver: ofdpa3 |
| 104 | ipv4Loopback: 192.168.0.204 |
| 105 | ipv4NodeSid: 214 |
| 106 | isEdgeRouter: true |
| 107 | name: Agg Switch |
| 108 | ofId: of:0000000000000001 |
| 109 | routerMac: 54:87:de:ad:be:ef |
| 110 | |
| 111 | # Node1 Port |
| 112 | port#node_1_port: |
| 113 | type: tosca.nodes.SwitchPort |
| 114 | properties: |
| 115 | portId: 34 |
| 116 | requirements: |
| 117 | - switch: |
| 118 | node: switch#leaf_1 |
| 119 | relationship: tosca.relationships.BelongsToOne |
| 120 | |
| 121 | interface#port_1_interface: |
| 122 | type: tosca.nodes.PortInterface |
| 123 | properties: |
| 124 | vlanUntagged: 20 |
| 125 | name: node_1 |
| 126 | requirements: |
| 127 | - port: |
| 128 | node: port#node_1_port |
| 129 | relationship: tosca.relationships.BelongsToOne |
| 130 | |
| 131 | ip#port_1_sgi_net: |
| 132 | type: tosca.nodes.FabricIpAddress |
| 133 | properties: |
| 134 | ip: 13.1.1.254/24 |
| 135 | description: node_1_sgi_net |
| 136 | requirements: |
| 137 | - interface: |
| 138 | node: interface#port_1_interface |
| 139 | relationship: tosca.relationships.BelongsToOne |
| 140 | |
| 141 | ip#port_1_s1u_net: |
| 142 | type: tosca.nodes.FabricIpAddress |
| 143 | properties: |
| 144 | ip: 119.0.0.254/24 |
| 145 | description: node_1_s1u_net |
| 146 | requirements: |
| 147 | - interface: |
| 148 | node: interface#port_1_interface |
| 149 | relationship: tosca.relationships.BelongsToOne |
| 150 | |
| 151 | # Node2 Port |
| 152 | port#node_2_port: |
| 153 | type: tosca.nodes.SwitchPort |
| 154 | properties: |
| 155 | portId: 35 |
| 156 | requirements: |
| 157 | - switch: |
| 158 | node: switch#leaf_1 |
| 159 | relationship: tosca.relationships.BelongsToOne |
| 160 | |
| 161 | interface#port_2_interface: |
| 162 | type: tosca.nodes.PortInterface |
| 163 | properties: |
| 164 | vlanUntagged: 20 |
| 165 | name: node_2 |
| 166 | requirements: |
| 167 | - port: |
| 168 | node: port#node_2_port |
| 169 | relationship: tosca.relationships.BelongsToOne |
| 170 | |
| 171 | ip#port_2_sgi_net: |
| 172 | type: tosca.nodes.FabricIpAddress |
| 173 | properties: |
| 174 | ip: 13.1.1.254/24 |
| 175 | description: node_2_sgi_net |
| 176 | requirements: |
| 177 | - interface: |
| 178 | node: interface#port_2_interface |
| 179 | relationship: tosca.relationships.BelongsToOne |
| 180 | |
| 181 | ip#port_2_s1u_net: |
| 182 | type: tosca.nodes.FabricIpAddress |
| 183 | properties: |
| 184 | ip: 119.0.0.254/24 |
| 185 | description: node_2_s1u_net |
| 186 | requirements: |
| 187 | - interface: |
| 188 | node: interface#port_2_interface |
| 189 | relationship: tosca.relationships.BelongsToOne |
| 190 | |
| 191 | # Upstream Router Port |
| 192 | port#node_ext_port: |
| 193 | type: tosca.nodes.SwitchPort |
| 194 | properties: |
| 195 | portId: 40 |
| 196 | requirements: |
| 197 | - switch: |
| 198 | node: switch#leaf_1 |
| 199 | relationship: tosca.relationships.BelongsToOne |
| 200 | |
| 201 | interface#port_ext_interface: |
| 202 | type: tosca.nodes.PortInterface |
| 203 | properties: |
| 204 | vlanUntagged: 20 |
| 205 | name: ext |
| 206 | requirements: |
| 207 | - port: |
| 208 | node: port#node_ext_port |
| 209 | relationship: tosca.relationships.BelongsToOne |
| 210 | |
| 211 | ip#port_ext_upstream: |
| 212 | type: tosca.nodes.FabricIpAddress |
| 213 | properties: |
| 214 | ip: 11.0.0.254/24 |
| 215 | description: node_ext_upstream |
| 216 | requirements: |
| 217 | - interface: |
| 218 | node: interface#port_ext_interface |
| 219 | relationship: tosca.relationships.BelongsToOne |