Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 1 | {{/* vim: set filetype=mustache: */}} |
| 2 | {{/* |
| 3 | Copyright 2018-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | */}} |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 17 | {{- define "seba-services.onosTosca" -}} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | |
| 20 | imports: |
| 21 | - custom_types/onosapp.yaml |
| 22 | - custom_types/onosservice.yaml |
| 23 | - custom_types/serviceinstanceattribute.yaml |
| 24 | |
| 25 | description: Configures the VOLTHA ONOS service |
| 26 | |
| 27 | topology_template: |
| 28 | node_templates: |
| 29 | |
| 30 | service#onos: |
| 31 | type: tosca.nodes.ONOSService |
| 32 | properties: |
| 33 | name: onos |
| 34 | kind: data |
| 35 | rest_hostname: {{ .onosRestService | quote }} |
| 36 | rest_port: 8181 |
| 37 | |
| 38 | onos_app#openflow-base: |
| 39 | type: tosca.nodes.ONOSApp |
| 40 | properties: |
| 41 | name: openflow-base |
| 42 | app_id: org.onosproject.openflow-base |
| 43 | requirements: |
| 44 | - owner: |
| 45 | node: service#onos |
| 46 | relationship: tosca.relationships.BelongsToOne |
| 47 | |
| 48 | onos_app#hostprovider: |
| 49 | type: tosca.nodes.ONOSApp |
| 50 | properties: |
| 51 | name: hostprovider |
| 52 | app_id: org.onosproject.hostprovider |
| 53 | requirements: |
| 54 | - owner: |
| 55 | node: service#onos |
| 56 | relationship: tosca.relationships.BelongsToOne |
| 57 | |
| 58 | onos_app#olt: |
| 59 | type: tosca.nodes.ONOSApp |
| 60 | properties: |
| 61 | name: olt |
| 62 | app_id: org.opencord.olt |
| 63 | url: {{ .oltAppUrl }} |
Matteo Scandolo | 9f68f90 | 2018-12-17 13:50:33 -0800 | [diff] [blame] | 64 | version: 2.1.0 |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 65 | dependencies: org.opencord.sadis |
| 66 | requirements: |
| 67 | - owner: |
| 68 | node: service#onos |
| 69 | relationship: tosca.relationships.BelongsToOne |
| 70 | |
| 71 | onos_app#sadis: |
| 72 | type: tosca.nodes.ONOSApp |
| 73 | properties: |
| 74 | name: sadis |
| 75 | app_id: org.opencord.sadis |
| 76 | url: {{ .sadisAppUrl }} |
Matteo Scandolo | d3df47d | 2018-12-17 15:47:33 -0800 | [diff] [blame] | 77 | version: 2.2.0 |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 78 | requirements: |
| 79 | - owner: |
| 80 | node: service#onos |
| 81 | relationship: tosca.relationships.BelongsToOne |
| 82 | |
| 83 | onos_app#dhcpl2relay: |
| 84 | type: tosca.nodes.ONOSApp |
| 85 | properties: |
| 86 | name: dhcpl2relay |
| 87 | app_id: org.opencord.dhcpl2relay |
| 88 | url: {{ .dhcpl2relayAppUrl }} |
Matteo Scandolo | 9f68f90 | 2018-12-17 13:50:33 -0800 | [diff] [blame] | 89 | version: 1.5.0 |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 90 | dependencies: org.opencord.sadis |
| 91 | requirements: |
| 92 | - owner: |
| 93 | node: service#onos |
| 94 | relationship: tosca.relationships.BelongsToOne |
| 95 | |
| 96 | onos_app#aaa: |
| 97 | type: tosca.nodes.ONOSApp |
| 98 | properties: |
| 99 | name: aaa |
| 100 | app_id: org.opencord.aaa |
| 101 | url: {{ .aaaAppUrl }} |
Matteo Scandolo | 9f68f90 | 2018-12-17 13:50:33 -0800 | [diff] [blame] | 102 | version: 1.8.0 |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 103 | dependencies: org.opencord.sadis |
| 104 | requirements: |
| 105 | - owner: |
| 106 | node: service#onos |
| 107 | relationship: tosca.relationships.BelongsToOne |
| 108 | |
| 109 | onos_app#kafka: |
| 110 | type: tosca.nodes.ONOSApp |
| 111 | properties: |
| 112 | name: kafka |
| 113 | app_id: org.opencord.kafka |
| 114 | url: {{ .kafkaAppUrl }} |
Matteo Scandolo | 9f68f90 | 2018-12-17 13:50:33 -0800 | [diff] [blame] | 115 | version: 1.0.0 |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 116 | dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay |
| 117 | requirements: |
| 118 | - owner: |
| 119 | node: service#onos |
| 120 | relationship: tosca.relationships.BelongsToOne |
| 121 | |
| 122 | # CORD-Configuration |
| 123 | kafka-config-attr: |
| 124 | type: tosca.nodes.ServiceInstanceAttribute |
| 125 | properties: |
| 126 | name: /onos/v1/network/configuration/apps/org.opencord.kafka |
| 127 | value: > |
| 128 | { |
| 129 | "kafka" : { |
| 130 | "bootstrapServers" : {{ .kafkaService | quote }} |
| 131 | } |
| 132 | } |
| 133 | requirements: |
| 134 | - service_instance: |
Andy Bavier | 1a24ced | 2018-09-15 11:49:14 -0700 | [diff] [blame] | 135 | node: onos_app#kafka |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 136 | relationship: tosca.relationships.BelongsToOne |
| 137 | |
| 138 | olt-config-attr: |
| 139 | type: tosca.nodes.ServiceInstanceAttribute |
| 140 | properties: |
| 141 | name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true |
| 142 | value: > |
| 143 | { |
| 144 | "enableDhcpOnProvisioning" : true |
| 145 | } |
| 146 | requirements: |
| 147 | - service_instance: |
| 148 | node: onos_app#olt |
| 149 | relationship: tosca.relationships.BelongsToOne |
| 150 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 151 | aaa-config-attr: |
| 152 | type: tosca.nodes.ServiceInstanceAttribute |
| 153 | properties: |
| 154 | name: /onos/v1/network/configuration/apps/org.opencord.aaa |
| 155 | value: > |
| 156 | { |
| 157 | "AAA" : { |
| 158 | "radiusConnectionType" : "socket", |
| 159 | "radiusHost" : "freeradius.voltha.svc.cluster.local", |
| 160 | "radiusServerPort" : "1812", |
| 161 | "radiusSecret" : "SECRET" |
| 162 | } |
| 163 | } |
| 164 | requirements: |
| 165 | - service_instance: |
| 166 | node: onos_app#aaa |
| 167 | relationship: tosca.relationships.BelongsToOne |
| 168 | |
| 169 | sadis-config-attr: |
| 170 | type: tosca.nodes.ServiceInstanceAttribute |
| 171 | properties: |
| 172 | name: /onos/v1/network/configuration/apps/org.opencord.sadis |
| 173 | value: > |
| 174 | { |
| 175 | "sadis" : { |
| 176 | "integration" : { |
| 177 | "cache" : { |
Matteo Scandolo | 4c481d1 | 2018-11-19 13:28:17 -0800 | [diff] [blame] | 178 | "maxsize" : 1000, |
| 179 | "ttl": "PT300S" |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 180 | }, |
| 181 | "url" : "http://sadis-service:8000/subscriber/%s" |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | requirements: |
| 186 | - service_instance: |
| 187 | node: onos_app#sadis |
| 188 | relationship: tosca.relationships.BelongsToOne |
| 189 | |
| 190 | onos_app#segmentrouting: |
| 191 | type: tosca.nodes.ONOSApp |
| 192 | properties: |
| 193 | name: org.onosproject.segmentrouting |
| 194 | app_id: org.onosproject.segmentrouting |
| 195 | requirements: |
| 196 | - owner: |
| 197 | node: service#onos |
| 198 | relationship: tosca.relationships.BelongsToOne |
| 199 | |
| 200 | onos_app#netcfghostprovider: |
| 201 | type: tosca.nodes.ONOSApp |
| 202 | properties: |
| 203 | name: org.onosproject.netcfghostprovider |
| 204 | app_id: org.onosproject.netcfghostprovider |
| 205 | requirements: |
| 206 | - owner: |
| 207 | node: service#onos |
| 208 | relationship: tosca.relationships.BelongsToOne |
| 209 | |
| 210 | onos_app#openflow: |
| 211 | type: tosca.nodes.ONOSApp |
| 212 | properties: |
| 213 | name: org.onosproject.openflow |
| 214 | app_id: org.onosproject.openflow |
| 215 | requirements: |
| 216 | - owner: |
| 217 | node: service#onos |
| 218 | relationship: tosca.relationships.BelongsToOne |
| 219 | {{- end -}} |
| 220 | |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 221 | {{- define "seba-services.basicFixturesTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 222 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 223 | description: Some basic fixtures |
| 224 | imports: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 225 | - custom_types/deployment.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 226 | - custom_types/networkparametertype.yaml |
| 227 | - custom_types/networktemplate.yaml |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 228 | - custom_types/siterole.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 229 | topology_template: |
| 230 | node_templates: |
| 231 | |
| 232 | # ----------------------------------------------------------------------------- |
| 233 | # Network Parameter Types |
| 234 | # ----------------------------------------------------------------------------- |
| 235 | s_tag: |
| 236 | type: tosca.nodes.NetworkParameterType |
| 237 | properties: |
| 238 | name: s_tag |
| 239 | c_tag: |
| 240 | type: tosca.nodes.NetworkParameterType |
| 241 | properties: |
| 242 | name: c_tag |
| 243 | next_hop: |
| 244 | type: tosca.nodes.NetworkParameterType |
| 245 | properties: |
| 246 | name: next_hop |
| 247 | device: |
| 248 | type: tosca.nodes.NetworkParameterType |
| 249 | properties: |
| 250 | name: device |
| 251 | bridge: |
| 252 | type: tosca.nodes.NetworkParameterType |
| 253 | properties: |
| 254 | name: bridge |
| 255 | neutron_port_name: |
| 256 | type: tosca.nodes.NetworkParameterType |
| 257 | properties: |
| 258 | name: neutron_port_name |
| 259 | |
| 260 | # ---------------------------------------------------------------------------- |
| 261 | # Roles |
| 262 | # ---------------------------------------------------------------------------- |
| 263 | siterole#admin: |
| 264 | type: tosca.nodes.SiteRole |
| 265 | properties: |
| 266 | role: admin |
| 267 | siterole#pi: |
| 268 | type: tosca.nodes.SiteRole |
| 269 | properties: |
| 270 | role: pi |
| 271 | siterole#tech: |
| 272 | type: tosca.nodes.SiteRole |
| 273 | properties: |
| 274 | role: tech |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 275 | |
| 276 | # ----------------------------------------------------------------------------- |
| 277 | # Network Templates |
| 278 | # ----------------------------------------------------------------------------- |
| 279 | Private: |
| 280 | type: tosca.nodes.NetworkTemplate |
| 281 | properties: |
| 282 | name: Private |
| 283 | visibility: private |
| 284 | translation: none |
| 285 | |
| 286 | Public shared IPv4: |
| 287 | type: tosca.nodes.NetworkTemplate |
| 288 | properties: |
| 289 | name: Public shared IPv4 |
| 290 | visibility: private |
| 291 | translation: NAT |
| 292 | shared_network_name: nat-net |
| 293 | |
| 294 | Public dedicated IPv4: |
| 295 | type: tosca.nodes.NetworkTemplate |
| 296 | properties: |
| 297 | name: Public dedicated IPv4 |
| 298 | visibility: public |
| 299 | translation: none |
| 300 | shared_network_name: ext-net |
| 301 | |
| 302 | # ----------------------------------------------------------------------------- |
| 303 | # Deployment |
| 304 | # ----------------------------------------------------------------------------- |
| 305 | MyDeployment: |
| 306 | type: tosca.nodes.Deployment |
| 307 | properties: |
| 308 | name: MyDeployment |
| 309 | {{- end -}} |
| 310 | |
| 311 | |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 312 | {{- define "seba-services.serviceGraphTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 313 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 314 | imports: |
| 315 | - custom_types/fabricservice.yaml |
| 316 | - custom_types/onosservice.yaml |
| 317 | - custom_types/rcordservice.yaml |
| 318 | - custom_types/voltservice.yaml |
| 319 | - custom_types/fabriccrossconnectservice.yaml |
| 320 | - custom_types/servicedependency.yaml |
| 321 | - custom_types/servicegraphconstraint.yaml |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 322 | description: seba service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 323 | topology_template: |
| 324 | node_templates: |
| 325 | |
| 326 | # These services must be defined before loading the graph |
| 327 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 328 | service#onos: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 329 | type: tosca.nodes.ONOSService |
| 330 | properties: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 331 | name: onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 332 | must-exist: true |
| 333 | |
| 334 | service#fabric: |
| 335 | type: tosca.nodes.FabricService |
| 336 | properties: |
| 337 | name: fabric |
| 338 | must-exist: true |
| 339 | |
| 340 | service#rcord: |
| 341 | type: tosca.nodes.RCORDService |
| 342 | properties: |
| 343 | name: rcord |
| 344 | must-exist: true |
| 345 | |
| 346 | service#volt: |
| 347 | type: tosca.nodes.VOLTService |
| 348 | properties: |
| 349 | name: volt |
| 350 | must-exist: true |
| 351 | |
| 352 | service#fabric-crossconnect: |
| 353 | type: tosca.nodes.FabricCrossconnectService |
| 354 | properties: |
| 355 | name: fabric-crossconnect |
| 356 | must-exist: true |
| 357 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 358 | service_dependency#onos-fabric_fabric: |
| 359 | type: tosca.nodes.ServiceDependency |
| 360 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 361 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 362 | requirements: |
| 363 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 364 | node: service#fabric |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 365 | relationship: tosca.relationships.BelongsToOne |
| 366 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 367 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 368 | relationship: tosca.relationships.BelongsToOne |
| 369 | |
| 370 | service_dependency#rcord_volt: |
| 371 | type: tosca.nodes.ServiceDependency |
| 372 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 373 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 374 | requirements: |
| 375 | - subscriber_service: |
| 376 | node: service#rcord |
| 377 | relationship: tosca.relationships.BelongsToOne |
| 378 | - provider_service: |
| 379 | node: service#volt |
| 380 | relationship: tosca.relationships.BelongsToOne |
| 381 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 382 | service_dependency#onos_volt: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 383 | type: tosca.nodes.ServiceDependency |
| 384 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 385 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 386 | requirements: |
| 387 | - subscriber_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 388 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 389 | relationship: tosca.relationships.BelongsToOne |
| 390 | - provider_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 391 | node: service#volt |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 392 | relationship: tosca.relationships.BelongsToOne |
| 393 | |
| 394 | service_dependency#volt_fabric-crossconnect: |
| 395 | type: tosca.nodes.ServiceDependency |
| 396 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 397 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 398 | requirements: |
| 399 | - subscriber_service: |
| 400 | node: service#volt |
| 401 | relationship: tosca.relationships.BelongsToOne |
| 402 | - provider_service: |
| 403 | node: service#fabric-crossconnect |
| 404 | relationship: tosca.relationships.BelongsToOne |
| 405 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 406 | service_dependency#onos_fabric-crossconnect: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 407 | type: tosca.nodes.ServiceDependency |
| 408 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 409 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 410 | requirements: |
| 411 | - subscriber_service: |
| 412 | node: service#fabric-crossconnect |
| 413 | relationship: tosca.relationships.BelongsToOne |
| 414 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 415 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 416 | relationship: tosca.relationships.BelongsToOne |
| 417 | |
| 418 | constraints: |
| 419 | type: tosca.nodes.ServiceGraphConstraint |
| 420 | properties: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 421 | constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]' |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 422 | {{- end -}} |