Andy Bavier | e302328 | 2018-05-12 06:35:13 -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 | |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 18 | {{- define "rcord-lite.onosTosca" -}} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | imports: |
| 21 | - custom_types/onosapp.yaml |
| 22 | - custom_types/onosservice.yaml |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 23 | - custom_types/serviceinstanceattribute.yaml |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 24 | description: ONOS service and app for fabric |
| 25 | topology_template: |
| 26 | node_templates: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 27 | service#ONOS: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 28 | type: tosca.nodes.ONOSService |
| 29 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 30 | name: ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 31 | kind: data |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 32 | rest_hostname: {{ .onosRestService | quote }} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 33 | rest_port: 8181 |
| 34 | |
| 35 | onos_app#segmentrouting: |
| 36 | type: tosca.nodes.ONOSApp |
| 37 | properties: |
| 38 | name: org.onosproject.segmentrouting |
| 39 | app_id: org.onosproject.segmentrouting |
| 40 | requirements: |
| 41 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 42 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 43 | relationship: tosca.relationships.BelongsToOne |
| 44 | |
| 45 | onos_app#vrouter: |
| 46 | type: tosca.nodes.ONOSApp |
| 47 | properties: |
| 48 | name: org.onosproject.vrouter |
| 49 | app_id: org.onosproject.vrouter |
| 50 | requirements: |
| 51 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 52 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 53 | relationship: tosca.relationships.BelongsToOne |
| 54 | |
| 55 | onos_app#netcfghostprovider: |
| 56 | type: tosca.nodes.ONOSApp |
| 57 | properties: |
| 58 | name: org.onosproject.netcfghostprovider |
| 59 | app_id: org.onosproject.netcfghostprovider |
| 60 | requirements: |
| 61 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 62 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 63 | relationship: tosca.relationships.BelongsToOne |
| 64 | |
| 65 | onos_app#openflow: |
| 66 | type: tosca.nodes.ONOSApp |
| 67 | properties: |
| 68 | name: org.onosproject.openflow |
| 69 | app_id: org.onosproject.openflow |
| 70 | requirements: |
| 71 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 72 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 73 | relationship: tosca.relationships.BelongsToOne |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 74 | |
| 75 | onos_app#openflow-base: |
| 76 | type: tosca.nodes.ONOSApp |
| 77 | properties: |
| 78 | name: openflow-base |
| 79 | app_id: org.onosproject.openflow-base |
| 80 | requirements: |
| 81 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 82 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 83 | relationship: tosca.relationships.BelongsToOne |
| 84 | |
| 85 | onos_app#hostprovider: |
| 86 | type: tosca.nodes.ONOSApp |
| 87 | properties: |
| 88 | name: hostprovider |
| 89 | app_id: org.onosproject.hostprovider |
| 90 | requirements: |
| 91 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 92 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 93 | relationship: tosca.relationships.BelongsToOne |
| 94 | |
| 95 | onos_app#cord-config: |
| 96 | type: tosca.nodes.ONOSApp |
| 97 | properties: |
| 98 | name: cord-config |
| 99 | app_id: org.opencord.config |
| 100 | url: {{ .cordConfigAppURL }} |
| 101 | version: 1.4.0 |
| 102 | requirements: |
| 103 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 104 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 105 | relationship: tosca.relationships.BelongsToOne |
| 106 | |
| 107 | onos_app#olt: |
| 108 | type: tosca.nodes.ONOSApp |
| 109 | properties: |
| 110 | name: olt |
| 111 | app_id: org.opencord.olt |
| 112 | url: {{ .oltAppUrl }} |
| 113 | version: 2.0.0.SNAPSHOT |
| 114 | dependencies: org.opencord.config |
| 115 | requirements: |
| 116 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 117 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 118 | relationship: tosca.relationships.BelongsToOne |
| 119 | |
| 120 | onos_app#sadis: |
| 121 | type: tosca.nodes.ONOSApp |
| 122 | properties: |
| 123 | name: sadis |
| 124 | app_id: org.opencord.sadis |
| 125 | url: {{ .sadisAppUrl }} |
| 126 | version: 2.1.0 |
| 127 | requirements: |
| 128 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 129 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 130 | relationship: tosca.relationships.BelongsToOne |
| 131 | |
| 132 | onos_app#dhcpl2relay: |
| 133 | type: tosca.nodes.ONOSApp |
| 134 | properties: |
| 135 | name: dhcpl2relay |
| 136 | app_id: org.opencord.dhcpl2relay |
| 137 | url: {{ .dhcpl2relayAppUrl }} |
| 138 | version: 1.5.0.SNAPSHOT |
| 139 | dependencies: org.opencord.sadis |
| 140 | requirements: |
| 141 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 142 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 143 | relationship: tosca.relationships.BelongsToOne |
| 144 | |
| 145 | onos_app#aaa: |
| 146 | type: tosca.nodes.ONOSApp |
| 147 | properties: |
| 148 | name: aaa |
| 149 | app_id: org.opencord.aaa |
| 150 | url: {{ .aaaAppUrl }} |
| 151 | version: 1.8.0.SNAPSHOT |
| 152 | dependencies: org.opencord.sadis |
| 153 | requirements: |
| 154 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 155 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 156 | relationship: tosca.relationships.BelongsToOne |
| 157 | |
| 158 | onos_app#kafka: |
| 159 | type: tosca.nodes.ONOSApp |
| 160 | properties: |
| 161 | name: kafka |
| 162 | app_id: org.opencord.kafka |
| 163 | url: {{ .kafkaAppUrl }} |
| 164 | version: 1.0.0.SNAPSHOT |
| 165 | dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay |
| 166 | requirements: |
| 167 | - owner: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 168 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 169 | relationship: tosca.relationships.BelongsToOne |
| 170 | |
| 171 | # CORD-Configuration |
| 172 | cord-config-attr: |
| 173 | type: tosca.nodes.ServiceInstanceAttribute |
| 174 | properties: |
| 175 | name: /onos/v1/network/configuration/apps/org.opencord.kafka |
| 176 | value: > |
| 177 | { |
| 178 | "kafka" : { |
| 179 | "bootstrapServers" : {{ .kafkaService | quote }} |
| 180 | } |
| 181 | } |
| 182 | requirements: |
| 183 | - service_instance: |
| 184 | node: onos_app#olt |
| 185 | relationship: tosca.relationships.BelongsToOne |
| 186 | |
| 187 | olt-config-attr: |
| 188 | type: tosca.nodes.ServiceInstanceAttribute |
| 189 | properties: |
| 190 | name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true |
| 191 | value: > |
| 192 | { |
| 193 | "enableDhcpOnProvisioning" : true |
| 194 | } |
| 195 | requirements: |
| 196 | - service_instance: |
| 197 | node: onos_app#olt |
| 198 | relationship: tosca.relationships.BelongsToOne |
| 199 | |
| 200 | dhcpl2relay-config-attr: |
| 201 | type: tosca.nodes.ServiceInstanceAttribute |
| 202 | properties: |
| 203 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 204 | value: > |
| 205 | { |
| 206 | "dhcpl2relay" : { |
| 207 | "useOltUplinkForServerPktInOut" : true |
| 208 | } |
| 209 | } |
| 210 | requirements: |
| 211 | - service_instance: |
| 212 | node: onos_app#dhcpl2relay |
| 213 | relationship: tosca.relationships.BelongsToOne |
| 214 | |
| 215 | aaa-config-attr: |
| 216 | type: tosca.nodes.ServiceInstanceAttribute |
| 217 | properties: |
| 218 | name: /onos/v1/network/configuration/apps/org.opencord.aaa |
| 219 | value: > |
| 220 | { |
| 221 | "AAA" : { |
| 222 | "radiusConnectionType" : "socket", |
| 223 | "radiusHost" : "freeradius.voltha.svc.cluster.local", |
| 224 | "radiusServerPort" : "1812", |
| 225 | "radiusSecret" : "SECRET" |
| 226 | } |
| 227 | } |
| 228 | requirements: |
| 229 | - service_instance: |
| 230 | node: onos_app#aaa |
| 231 | relationship: tosca.relationships.BelongsToOne |
| 232 | |
| 233 | sadis-config-attr: |
| 234 | type: tosca.nodes.ServiceInstanceAttribute |
| 235 | properties: |
| 236 | name: /onos/v1/network/configuration/apps/org.opencord.sadis |
| 237 | value: > |
| 238 | { |
| 239 | "sadis" : { |
| 240 | "integration" : { |
| 241 | "cache" : { |
| 242 | "maxsize" : 1000 |
| 243 | }, |
| 244 | "url" : "http://sadis-service:8000/subscriber/%s" |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | requirements: |
| 249 | - service_instance: |
| 250 | node: onos_app#sadis |
| 251 | relationship: tosca.relationships.BelongsToOne |
| 252 | {{- end -}} |
| 253 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 254 | {{- define "rcord-lite.serviceGraphTosca" -}} |
| 255 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 256 | imports: |
| 257 | - custom_types/fabricservice.yaml |
| 258 | - custom_types/onosservice.yaml |
| 259 | - custom_types/rcordservice.yaml |
| 260 | - custom_types/vrouterservice.yaml |
| 261 | - custom_types/voltservice.yaml |
| 262 | - custom_types/vsghwservice.yaml |
| 263 | - custom_types/servicedependency.yaml |
| 264 | - custom_types/servicegraphconstraint.yaml |
| 265 | description: rcord-lite service graph |
| 266 | topology_template: |
| 267 | node_templates: |
| 268 | |
| 269 | # These services must be defined before loading the graph |
| 270 | |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 271 | service#ONOS: |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 272 | type: tosca.nodes.ONOSService |
| 273 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 274 | name: ONOS |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 275 | must-exist: true |
| 276 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 277 | service#fabric: |
| 278 | type: tosca.nodes.FabricService |
| 279 | properties: |
| 280 | name: fabric |
| 281 | must-exist: true |
| 282 | |
| 283 | service#rcord: |
| 284 | type: tosca.nodes.RCORDService |
| 285 | properties: |
| 286 | name: rcord |
| 287 | must-exist: true |
| 288 | |
| 289 | service#vrouter: |
| 290 | type: tosca.nodes.VRouterService |
| 291 | properties: |
| 292 | name: vrouter |
| 293 | must-exist: true |
| 294 | |
| 295 | service#volt: |
| 296 | type: tosca.nodes.VOLTService |
| 297 | properties: |
| 298 | name: volt |
| 299 | must-exist: true |
| 300 | |
| 301 | service#vsg-hw: |
| 302 | type: tosca.nodes.VSGHWService |
| 303 | properties: |
| 304 | name: vsg-hw |
| 305 | must-exist: true |
| 306 | |
| 307 | # The rcord-lite service graph |
| 308 | |
| 309 | service_dependency#onos-fabric_fabric: |
| 310 | type: tosca.nodes.ServiceDependency |
| 311 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 312 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 313 | requirements: |
| 314 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 315 | node: service#fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 316 | relationship: tosca.relationships.BelongsToOne |
| 317 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 318 | node: service#ONOS |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 319 | relationship: tosca.relationships.BelongsToOne |
| 320 | |
| 321 | service_dependency#rcord_volt: |
| 322 | type: tosca.nodes.ServiceDependency |
| 323 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 324 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 325 | requirements: |
| 326 | - subscriber_service: |
| 327 | node: service#rcord |
| 328 | relationship: tosca.relationships.BelongsToOne |
| 329 | - provider_service: |
| 330 | node: service#volt |
| 331 | relationship: tosca.relationships.BelongsToOne |
| 332 | |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 333 | service_dependency#onos_voltha_volt: |
| 334 | type: tosca.nodes.ServiceDependency |
| 335 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 336 | connect_method: none |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 337 | requirements: |
| 338 | - subscriber_service: |
| 339 | node: service#volt |
| 340 | relationship: tosca.relationships.BelongsToOne |
| 341 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 342 | node: service#ONOS |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 343 | relationship: tosca.relationships.BelongsToOne |
| 344 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 345 | service_dependency#fabric_vrouter: |
| 346 | type: tosca.nodes.ServiceDependency |
| 347 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 348 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 349 | requirements: |
| 350 | - subscriber_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 351 | node: service#vrouter |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 352 | relationship: tosca.relationships.BelongsToOne |
| 353 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 354 | node: service#fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 355 | relationship: tosca.relationships.BelongsToOne |
| 356 | |
| 357 | service_dependency#volt_vsg-hw: |
| 358 | type: tosca.nodes.ServiceDependency |
| 359 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 360 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 361 | requirements: |
| 362 | - subscriber_service: |
| 363 | node: service#volt |
| 364 | relationship: tosca.relationships.BelongsToOne |
| 365 | - provider_service: |
| 366 | node: service#vsg-hw |
| 367 | relationship: tosca.relationships.BelongsToOne |
| 368 | |
| 369 | service_dependency#onos_fabric_vsg-hw: |
| 370 | type: tosca.nodes.ServiceDependency |
| 371 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 372 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 373 | requirements: |
| 374 | - subscriber_service: |
| 375 | node: service#vsg-hw |
| 376 | relationship: tosca.relationships.BelongsToOne |
| 377 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 378 | node: service#ONOS |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 379 | relationship: tosca.relationships.BelongsToOne |
| 380 | |
| 381 | constraints: |
| 382 | type: tosca.nodes.ServiceGraphConstraint |
| 383 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 384 | constraints: '[[null, "rcord"], [null, "volt"], ["ONOS", "vsg-hw"], ["fabric", null], ["vrouter", null]]' |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 385 | {{- end -}} |