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 }} |
Matt Jeanneret | f3fbac2 | 2019-01-15 21:16:39 -0500 | [diff] [blame] | 64 | version: {{ .oltAppVersion }} |
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 }} |
Matt Jeanneret | f3fbac2 | 2019-01-15 21:16:39 -0500 | [diff] [blame] | 77 | version: {{ .sadisAppVersion }} |
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 }} |
Matt Jeanneret | f3fbac2 | 2019-01-15 21:16:39 -0500 | [diff] [blame] | 89 | version: {{ .dhcpl2relayAppVersion }} |
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 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 96 | onos_app#kafka: |
| 97 | type: tosca.nodes.ONOSApp |
| 98 | properties: |
| 99 | name: kafka |
| 100 | app_id: org.opencord.kafka |
| 101 | url: {{ .kafkaAppUrl }} |
Matt Jeanneret | f3fbac2 | 2019-01-15 21:16:39 -0500 | [diff] [blame] | 102 | version: {{ .kafkaAppVersion }} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 103 | requirements: |
| 104 | - owner: |
| 105 | node: service#onos |
| 106 | relationship: tosca.relationships.BelongsToOne |
| 107 | |
| 108 | # CORD-Configuration |
| 109 | kafka-config-attr: |
| 110 | type: tosca.nodes.ServiceInstanceAttribute |
| 111 | properties: |
| 112 | name: /onos/v1/network/configuration/apps/org.opencord.kafka |
| 113 | value: > |
| 114 | { |
| 115 | "kafka" : { |
| 116 | "bootstrapServers" : {{ .kafkaService | quote }} |
| 117 | } |
| 118 | } |
| 119 | requirements: |
| 120 | - service_instance: |
Andy Bavier | 1a24ced | 2018-09-15 11:49:14 -0700 | [diff] [blame] | 121 | node: onos_app#kafka |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 122 | relationship: tosca.relationships.BelongsToOne |
| 123 | |
| 124 | olt-config-attr: |
| 125 | type: tosca.nodes.ServiceInstanceAttribute |
| 126 | properties: |
| 127 | name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true |
| 128 | value: > |
| 129 | { |
| 130 | "enableDhcpOnProvisioning" : true |
| 131 | } |
| 132 | requirements: |
| 133 | - service_instance: |
| 134 | node: onos_app#olt |
| 135 | relationship: tosca.relationships.BelongsToOne |
| 136 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 137 | sadis-config-attr: |
| 138 | type: tosca.nodes.ServiceInstanceAttribute |
| 139 | properties: |
| 140 | name: /onos/v1/network/configuration/apps/org.opencord.sadis |
| 141 | value: > |
| 142 | { |
| 143 | "sadis" : { |
| 144 | "integration" : { |
| 145 | "cache" : { |
Matteo Scandolo | 4c481d1 | 2018-11-19 13:28:17 -0800 | [diff] [blame] | 146 | "maxsize" : 1000, |
| 147 | "ttl": "PT300S" |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 148 | }, |
| 149 | "url" : "http://sadis-service:8000/subscriber/%s" |
| 150 | } |
Zack Williams | e68bbde | 2019-04-15 22:03:13 -0700 | [diff] [blame] | 151 | }, |
| 152 | "bandwidthprofile":{ |
| 153 | "integration":{ |
| 154 | "url": "http://sadis-service:8000/bandwidthprofiles/%s", |
| 155 | "cache":{ |
| 156 | "enabled":true, |
| 157 | "maxsize":40, |
| 158 | "ttl":"PT1m" |
| 159 | } |
| 160 | } |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 161 | } |
| 162 | } |
| 163 | requirements: |
| 164 | - service_instance: |
| 165 | node: onos_app#sadis |
| 166 | relationship: tosca.relationships.BelongsToOne |
| 167 | |
| 168 | onos_app#segmentrouting: |
| 169 | type: tosca.nodes.ONOSApp |
| 170 | properties: |
| 171 | name: org.onosproject.segmentrouting |
| 172 | app_id: org.onosproject.segmentrouting |
| 173 | requirements: |
| 174 | - owner: |
| 175 | node: service#onos |
| 176 | relationship: tosca.relationships.BelongsToOne |
| 177 | |
| 178 | onos_app#netcfghostprovider: |
| 179 | type: tosca.nodes.ONOSApp |
| 180 | properties: |
| 181 | name: org.onosproject.netcfghostprovider |
| 182 | app_id: org.onosproject.netcfghostprovider |
| 183 | requirements: |
| 184 | - owner: |
| 185 | node: service#onos |
| 186 | relationship: tosca.relationships.BelongsToOne |
| 187 | |
| 188 | onos_app#openflow: |
| 189 | type: tosca.nodes.ONOSApp |
| 190 | properties: |
| 191 | name: org.onosproject.openflow |
| 192 | app_id: org.onosproject.openflow |
| 193 | requirements: |
| 194 | - owner: |
| 195 | node: service#onos |
| 196 | relationship: tosca.relationships.BelongsToOne |
| 197 | {{- end -}} |
| 198 | |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 199 | {{- define "seba-services.basicFixturesTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 200 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 201 | description: Some basic fixtures |
| 202 | imports: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 203 | - custom_types/networkparametertype.yaml |
| 204 | - custom_types/networktemplate.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 205 | topology_template: |
| 206 | node_templates: |
| 207 | |
| 208 | # ----------------------------------------------------------------------------- |
| 209 | # Network Parameter Types |
| 210 | # ----------------------------------------------------------------------------- |
| 211 | s_tag: |
| 212 | type: tosca.nodes.NetworkParameterType |
| 213 | properties: |
| 214 | name: s_tag |
| 215 | c_tag: |
| 216 | type: tosca.nodes.NetworkParameterType |
| 217 | properties: |
| 218 | name: c_tag |
| 219 | next_hop: |
| 220 | type: tosca.nodes.NetworkParameterType |
| 221 | properties: |
| 222 | name: next_hop |
| 223 | device: |
| 224 | type: tosca.nodes.NetworkParameterType |
| 225 | properties: |
| 226 | name: device |
| 227 | bridge: |
| 228 | type: tosca.nodes.NetworkParameterType |
| 229 | properties: |
| 230 | name: bridge |
| 231 | neutron_port_name: |
| 232 | type: tosca.nodes.NetworkParameterType |
| 233 | properties: |
| 234 | name: neutron_port_name |
| 235 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 236 | # ----------------------------------------------------------------------------- |
| 237 | # Network Templates |
| 238 | # ----------------------------------------------------------------------------- |
| 239 | Private: |
| 240 | type: tosca.nodes.NetworkTemplate |
| 241 | properties: |
| 242 | name: Private |
| 243 | visibility: private |
| 244 | translation: none |
| 245 | |
| 246 | Public shared IPv4: |
| 247 | type: tosca.nodes.NetworkTemplate |
| 248 | properties: |
| 249 | name: Public shared IPv4 |
| 250 | visibility: private |
| 251 | translation: NAT |
| 252 | shared_network_name: nat-net |
| 253 | |
| 254 | Public dedicated IPv4: |
| 255 | type: tosca.nodes.NetworkTemplate |
| 256 | properties: |
| 257 | name: Public dedicated IPv4 |
| 258 | visibility: public |
| 259 | translation: none |
| 260 | shared_network_name: ext-net |
| 261 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 262 | {{- end -}} |
| 263 | |
| 264 | |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 265 | {{- define "seba-services.serviceGraphTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 266 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 267 | imports: |
| 268 | - custom_types/fabricservice.yaml |
| 269 | - custom_types/onosservice.yaml |
| 270 | - custom_types/rcordservice.yaml |
| 271 | - custom_types/voltservice.yaml |
| 272 | - custom_types/fabriccrossconnectservice.yaml |
| 273 | - custom_types/servicedependency.yaml |
| 274 | - custom_types/servicegraphconstraint.yaml |
Matteo Scandolo | 34dd236 | 2018-12-12 15:16:25 -0800 | [diff] [blame] | 275 | description: seba service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 276 | topology_template: |
| 277 | node_templates: |
| 278 | |
| 279 | # These services must be defined before loading the graph |
| 280 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 281 | service#onos: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 282 | type: tosca.nodes.ONOSService |
| 283 | properties: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 284 | name: onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 285 | must-exist: true |
| 286 | |
| 287 | service#fabric: |
| 288 | type: tosca.nodes.FabricService |
| 289 | properties: |
| 290 | name: fabric |
| 291 | must-exist: true |
| 292 | |
| 293 | service#rcord: |
| 294 | type: tosca.nodes.RCORDService |
| 295 | properties: |
| 296 | name: rcord |
| 297 | must-exist: true |
| 298 | |
| 299 | service#volt: |
| 300 | type: tosca.nodes.VOLTService |
| 301 | properties: |
| 302 | name: volt |
| 303 | must-exist: true |
| 304 | |
| 305 | service#fabric-crossconnect: |
| 306 | type: tosca.nodes.FabricCrossconnectService |
| 307 | properties: |
| 308 | name: fabric-crossconnect |
| 309 | must-exist: true |
| 310 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 311 | service_dependency#onos-fabric_fabric: |
| 312 | type: tosca.nodes.ServiceDependency |
| 313 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 314 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 315 | requirements: |
| 316 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 317 | node: service#fabric |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 318 | relationship: tosca.relationships.BelongsToOne |
| 319 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 320 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 321 | relationship: tosca.relationships.BelongsToOne |
| 322 | |
| 323 | service_dependency#rcord_volt: |
| 324 | type: tosca.nodes.ServiceDependency |
| 325 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 326 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 327 | requirements: |
| 328 | - subscriber_service: |
| 329 | node: service#rcord |
| 330 | relationship: tosca.relationships.BelongsToOne |
| 331 | - provider_service: |
| 332 | node: service#volt |
| 333 | relationship: tosca.relationships.BelongsToOne |
| 334 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 335 | service_dependency#onos_volt: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 336 | type: tosca.nodes.ServiceDependency |
| 337 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 338 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 339 | requirements: |
| 340 | - subscriber_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 341 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 342 | relationship: tosca.relationships.BelongsToOne |
| 343 | - provider_service: |
Matteo Scandolo | 83a4f1c | 2018-08-28 09:57:45 -0700 | [diff] [blame] | 344 | node: service#volt |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 345 | relationship: tosca.relationships.BelongsToOne |
| 346 | |
| 347 | service_dependency#volt_fabric-crossconnect: |
| 348 | type: tosca.nodes.ServiceDependency |
| 349 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 350 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 351 | requirements: |
| 352 | - subscriber_service: |
| 353 | node: service#volt |
| 354 | relationship: tosca.relationships.BelongsToOne |
| 355 | - provider_service: |
| 356 | node: service#fabric-crossconnect |
| 357 | relationship: tosca.relationships.BelongsToOne |
| 358 | |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 359 | service_dependency#onos_fabric-crossconnect: |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 360 | type: tosca.nodes.ServiceDependency |
| 361 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 362 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 363 | requirements: |
| 364 | - subscriber_service: |
| 365 | node: service#fabric-crossconnect |
| 366 | relationship: tosca.relationships.BelongsToOne |
| 367 | - provider_service: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 368 | node: service#onos |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 369 | relationship: tosca.relationships.BelongsToOne |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 370 | {{- end -}} |