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 | */}} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 17 | {{- define "att-workflow.onosTosca" -}} |
| 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 }} |
| 64 | version: 2.0.0.SNAPSHOT |
| 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 }} |
| 77 | version: 2.2.0.SNAPSHOT |
| 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 }} |
| 89 | version: 1.5.0.SNAPSHOT |
| 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 }} |
| 102 | version: 1.8.0.SNAPSHOT |
| 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 }} |
| 115 | version: 1.0.0.SNAPSHOT |
| 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: |
| 135 | node: onos_app#olt |
| 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 | |
| 151 | dhcpl2relay-config-attr: |
| 152 | type: tosca.nodes.ServiceInstanceAttribute |
| 153 | properties: |
| 154 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 155 | value: > |
| 156 | { |
| 157 | "dhcpl2relay" : { |
| 158 | "useOltUplinkForServerPktInOut" : true |
| 159 | } |
| 160 | } |
| 161 | requirements: |
| 162 | - service_instance: |
| 163 | node: onos_app#dhcpl2relay |
| 164 | relationship: tosca.relationships.BelongsToOne |
| 165 | |
| 166 | aaa-config-attr: |
| 167 | type: tosca.nodes.ServiceInstanceAttribute |
| 168 | properties: |
| 169 | name: /onos/v1/network/configuration/apps/org.opencord.aaa |
| 170 | value: > |
| 171 | { |
| 172 | "AAA" : { |
| 173 | "radiusConnectionType" : "socket", |
| 174 | "radiusHost" : "freeradius.voltha.svc.cluster.local", |
| 175 | "radiusServerPort" : "1812", |
| 176 | "radiusSecret" : "SECRET" |
| 177 | } |
| 178 | } |
| 179 | requirements: |
| 180 | - service_instance: |
| 181 | node: onos_app#aaa |
| 182 | relationship: tosca.relationships.BelongsToOne |
| 183 | |
| 184 | sadis-config-attr: |
| 185 | type: tosca.nodes.ServiceInstanceAttribute |
| 186 | properties: |
| 187 | name: /onos/v1/network/configuration/apps/org.opencord.sadis |
| 188 | value: > |
| 189 | { |
| 190 | "sadis" : { |
| 191 | "integration" : { |
| 192 | "cache" : { |
| 193 | "maxsize" : 1000 |
| 194 | }, |
| 195 | "url" : "http://sadis-service:8000/subscriber/%s" |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | requirements: |
| 200 | - service_instance: |
| 201 | node: onos_app#sadis |
| 202 | relationship: tosca.relationships.BelongsToOne |
| 203 | |
| 204 | onos_app#segmentrouting: |
| 205 | type: tosca.nodes.ONOSApp |
| 206 | properties: |
| 207 | name: org.onosproject.segmentrouting |
| 208 | app_id: org.onosproject.segmentrouting |
| 209 | requirements: |
| 210 | - owner: |
| 211 | node: service#onos |
| 212 | relationship: tosca.relationships.BelongsToOne |
| 213 | |
| 214 | onos_app#netcfghostprovider: |
| 215 | type: tosca.nodes.ONOSApp |
| 216 | properties: |
| 217 | name: org.onosproject.netcfghostprovider |
| 218 | app_id: org.onosproject.netcfghostprovider |
| 219 | requirements: |
| 220 | - owner: |
| 221 | node: service#onos |
| 222 | relationship: tosca.relationships.BelongsToOne |
| 223 | |
| 224 | onos_app#openflow: |
| 225 | type: tosca.nodes.ONOSApp |
| 226 | properties: |
| 227 | name: org.onosproject.openflow |
| 228 | app_id: org.onosproject.openflow |
| 229 | requirements: |
| 230 | - owner: |
| 231 | node: service#onos |
| 232 | relationship: tosca.relationships.BelongsToOne |
| 233 | {{- end -}} |
| 234 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 235 | {{- define "att-workflow.basicFixturesTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 236 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 237 | description: Some basic fixtures |
| 238 | imports: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 239 | - custom_types/deployment.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 240 | - custom_types/networkparametertype.yaml |
| 241 | - custom_types/networktemplate.yaml |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 242 | - custom_types/siterole.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 243 | topology_template: |
| 244 | node_templates: |
| 245 | |
| 246 | # ----------------------------------------------------------------------------- |
| 247 | # Network Parameter Types |
| 248 | # ----------------------------------------------------------------------------- |
| 249 | s_tag: |
| 250 | type: tosca.nodes.NetworkParameterType |
| 251 | properties: |
| 252 | name: s_tag |
| 253 | c_tag: |
| 254 | type: tosca.nodes.NetworkParameterType |
| 255 | properties: |
| 256 | name: c_tag |
| 257 | next_hop: |
| 258 | type: tosca.nodes.NetworkParameterType |
| 259 | properties: |
| 260 | name: next_hop |
| 261 | device: |
| 262 | type: tosca.nodes.NetworkParameterType |
| 263 | properties: |
| 264 | name: device |
| 265 | bridge: |
| 266 | type: tosca.nodes.NetworkParameterType |
| 267 | properties: |
| 268 | name: bridge |
| 269 | neutron_port_name: |
| 270 | type: tosca.nodes.NetworkParameterType |
| 271 | properties: |
| 272 | name: neutron_port_name |
| 273 | |
| 274 | # ---------------------------------------------------------------------------- |
| 275 | # Roles |
| 276 | # ---------------------------------------------------------------------------- |
| 277 | siterole#admin: |
| 278 | type: tosca.nodes.SiteRole |
| 279 | properties: |
| 280 | role: admin |
| 281 | siterole#pi: |
| 282 | type: tosca.nodes.SiteRole |
| 283 | properties: |
| 284 | role: pi |
| 285 | siterole#tech: |
| 286 | type: tosca.nodes.SiteRole |
| 287 | properties: |
| 288 | role: tech |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 289 | |
| 290 | # ----------------------------------------------------------------------------- |
| 291 | # Network Templates |
| 292 | # ----------------------------------------------------------------------------- |
| 293 | Private: |
| 294 | type: tosca.nodes.NetworkTemplate |
| 295 | properties: |
| 296 | name: Private |
| 297 | visibility: private |
| 298 | translation: none |
| 299 | |
| 300 | Public shared IPv4: |
| 301 | type: tosca.nodes.NetworkTemplate |
| 302 | properties: |
| 303 | name: Public shared IPv4 |
| 304 | visibility: private |
| 305 | translation: NAT |
| 306 | shared_network_name: nat-net |
| 307 | |
| 308 | Public dedicated IPv4: |
| 309 | type: tosca.nodes.NetworkTemplate |
| 310 | properties: |
| 311 | name: Public dedicated IPv4 |
| 312 | visibility: public |
| 313 | translation: none |
| 314 | shared_network_name: ext-net |
| 315 | |
| 316 | # ----------------------------------------------------------------------------- |
| 317 | # Deployment |
| 318 | # ----------------------------------------------------------------------------- |
| 319 | MyDeployment: |
| 320 | type: tosca.nodes.Deployment |
| 321 | properties: |
| 322 | name: MyDeployment |
| 323 | {{- end -}} |
| 324 | |
| 325 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 326 | {{- define "att-workflow.serviceGraphTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 327 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 328 | imports: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 329 | - custom_types/attworkflowdriverservice.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 330 | - custom_types/fabricservice.yaml |
| 331 | - custom_types/onosservice.yaml |
| 332 | - custom_types/rcordservice.yaml |
| 333 | - custom_types/voltservice.yaml |
| 334 | - custom_types/fabriccrossconnectservice.yaml |
| 335 | - custom_types/servicedependency.yaml |
| 336 | - custom_types/servicegraphconstraint.yaml |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 337 | description: att-workflow service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 338 | topology_template: |
| 339 | node_templates: |
| 340 | |
| 341 | # These services must be defined before loading the graph |
| 342 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 343 | service#onos: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 344 | type: tosca.nodes.ONOSService |
| 345 | properties: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 346 | name: onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 347 | must-exist: true |
| 348 | |
| 349 | service#fabric: |
| 350 | type: tosca.nodes.FabricService |
| 351 | properties: |
| 352 | name: fabric |
| 353 | must-exist: true |
| 354 | |
| 355 | service#rcord: |
| 356 | type: tosca.nodes.RCORDService |
| 357 | properties: |
| 358 | name: rcord |
| 359 | must-exist: true |
| 360 | |
| 361 | service#volt: |
| 362 | type: tosca.nodes.VOLTService |
| 363 | properties: |
| 364 | name: volt |
| 365 | must-exist: true |
| 366 | |
| 367 | service#fabric-crossconnect: |
| 368 | type: tosca.nodes.FabricCrossconnectService |
| 369 | properties: |
| 370 | name: fabric-crossconnect |
| 371 | must-exist: true |
| 372 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 373 | service#att-workflow-driver: |
| 374 | type: tosca.nodes.AttWorkflowDriverService |
| 375 | properties: |
| 376 | name: att-workflow-driver |
| 377 | must-exist: true |
| 378 | |
| 379 | # The att-workflow service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 380 | |
| 381 | service_dependency#onos-fabric_fabric: |
| 382 | type: tosca.nodes.ServiceDependency |
| 383 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 384 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 385 | requirements: |
| 386 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 387 | node: service#fabric |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 388 | relationship: tosca.relationships.BelongsToOne |
| 389 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 390 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 391 | relationship: tosca.relationships.BelongsToOne |
| 392 | |
| 393 | service_dependency#rcord_volt: |
| 394 | type: tosca.nodes.ServiceDependency |
| 395 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 396 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 397 | requirements: |
| 398 | - subscriber_service: |
| 399 | node: service#rcord |
| 400 | relationship: tosca.relationships.BelongsToOne |
| 401 | - provider_service: |
| 402 | node: service#volt |
| 403 | relationship: tosca.relationships.BelongsToOne |
| 404 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 405 | service_dependency#onos_volt: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 406 | type: tosca.nodes.ServiceDependency |
| 407 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 408 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 409 | requirements: |
| 410 | - subscriber_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 411 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 412 | relationship: tosca.relationships.BelongsToOne |
| 413 | - provider_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 414 | node: service#volt |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 415 | relationship: tosca.relationships.BelongsToOne |
| 416 | |
| 417 | service_dependency#volt_fabric-crossconnect: |
| 418 | type: tosca.nodes.ServiceDependency |
| 419 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 420 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 421 | requirements: |
| 422 | - subscriber_service: |
| 423 | node: service#volt |
| 424 | relationship: tosca.relationships.BelongsToOne |
| 425 | - provider_service: |
| 426 | node: service#fabric-crossconnect |
| 427 | relationship: tosca.relationships.BelongsToOne |
| 428 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 429 | service_dependency#onos_fabric-crossconnect: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 430 | type: tosca.nodes.ServiceDependency |
| 431 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 432 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 433 | requirements: |
| 434 | - subscriber_service: |
| 435 | node: service#fabric-crossconnect |
| 436 | relationship: tosca.relationships.BelongsToOne |
| 437 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 438 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 439 | relationship: tosca.relationships.BelongsToOne |
| 440 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 441 | service_dependency#workflow_volt: |
| 442 | type: tosca.nodes.ServiceDependency |
| 443 | properties: |
| 444 | connect_method: none |
| 445 | requirements: |
| 446 | - subscriber_service: |
| 447 | node: service#att-workflow-driver |
| 448 | relationship: tosca.relationships.BelongsToOne |
| 449 | - provider_service: |
| 450 | node: service#volt |
| 451 | relationship: tosca.relationships.BelongsToOne |
| 452 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 453 | constraints: |
| 454 | type: tosca.nodes.ServiceGraphConstraint |
| 455 | properties: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 456 | 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] | 457 | {{- end -}} |