Andy Bavier | a40e82b | 2018-05-07 17:00:36 -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 | */}} |
| 17 | {{- define "mcord.fixtureTosca" -}} |
| 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | |
| 20 | imports: |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 21 | - custom_types/site.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 22 | |
| 23 | description: set up site and deployment and link them |
| 24 | |
| 25 | topology_template: |
| 26 | node_templates: |
| 27 | |
| 28 | {{ .Values.cordSiteName }}: |
| 29 | type: tosca.nodes.Site |
| 30 | properties: |
| 31 | name: {{ .Values.cordSiteName }} |
| 32 | site_url: http://mysite.opencord.us/ |
| 33 | hosts_nodes: true |
| 34 | |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 35 | {{- end -}} |
| 36 | |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 37 | {{- define "mcord.onosTosca" -}} |
| 38 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 39 | |
| 40 | imports: |
| 41 | - custom_types/onosapp.yaml |
| 42 | - custom_types/onosservice.yaml |
| 43 | - custom_types/serviceinstanceattribute.yaml |
| 44 | |
| 45 | description: Configures the VOLTHA ONOS service |
| 46 | |
| 47 | topology_template: |
| 48 | node_templates: |
| 49 | |
| 50 | service#onos: |
| 51 | type: tosca.nodes.ONOSService |
| 52 | properties: |
| 53 | name: onos |
| 54 | kind: data |
| 55 | rest_hostname: {{ .onosRestService | quote }} |
| 56 | rest_port: 8181 |
| 57 | |
| 58 | onos_app#segmentrouting: |
| 59 | type: tosca.nodes.ONOSApp |
| 60 | properties: |
| 61 | name: org.onosproject.segmentrouting |
| 62 | app_id: org.onosproject.segmentrouting |
| 63 | requirements: |
| 64 | - owner: |
| 65 | node: service#onos |
| 66 | relationship: tosca.relationships.BelongsToOne |
| 67 | |
| 68 | onos_app#netcfghostprovider: |
| 69 | type: tosca.nodes.ONOSApp |
| 70 | properties: |
| 71 | name: org.onosproject.netcfghostprovider |
| 72 | app_id: org.onosproject.netcfghostprovider |
| 73 | requirements: |
| 74 | - owner: |
| 75 | node: service#onos |
| 76 | relationship: tosca.relationships.BelongsToOne |
| 77 | |
| 78 | onos_app#openflow: |
| 79 | type: tosca.nodes.ONOSApp |
| 80 | properties: |
| 81 | name: org.onosproject.openflow |
| 82 | app_id: org.onosproject.openflow |
| 83 | requirements: |
| 84 | - owner: |
| 85 | node: service#onos |
| 86 | relationship: tosca.relationships.BelongsToOne |
| 87 | {{- end -}} |
| 88 | |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 89 | {{- define "mcord.serviceGraphTosca" -}} |
| 90 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 91 | |
| 92 | imports: |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 93 | - custom_types/fabricservice.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 94 | - custom_types/mcordsubscriberservice.yaml |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 95 | - custom_types/onosservice.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 96 | - custom_types/progranservice.yaml |
Matteo Scandolo | a9ac2b8 | 2019-01-29 16:55:35 -0800 | [diff] [blame] | 97 | - custom_types/vrouterservice.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 98 | - custom_types/servicegraphconstraint.yaml |
| 99 | - custom_types/servicedependency.yaml |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 100 | - custom_types/service.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 101 | |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 102 | description: Configures the M-CORD service graph |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 103 | |
| 104 | topology_template: |
| 105 | node_templates: |
| 106 | |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 107 | service#progran: |
| 108 | type: tosca.nodes.ProgranService |
| 109 | properties: |
| 110 | name: progran |
| 111 | must-exist: true |
| 112 | |
Matteo Scandolo | a9ac2b8 | 2019-01-29 16:55:35 -0800 | [diff] [blame] | 113 | service#vrouter: |
| 114 | type: tosca.nodes.VRouterService |
| 115 | properties: |
| 116 | name: vrouter |
| 117 | must-exist: true |
| 118 | |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 119 | service#mcord: |
| 120 | type: tosca.nodes.MCordSubscriberService |
| 121 | properties: |
| 122 | name: mcord |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 123 | must-exist: true |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 124 | |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 125 | service#onos: |
| 126 | type: tosca.nodes.ONOSService |
| 127 | properties: |
| 128 | name: onos |
| 129 | must-exist: true |
| 130 | |
| 131 | service#fabric: |
| 132 | type: tosca.nodes.FabricService |
| 133 | properties: |
| 134 | name: fabric |
| 135 | must-exist: true |
| 136 | |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 137 | service#omec-cp: |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 138 | type: tosca.nodes.Service |
| 139 | properties: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 140 | name: omec-cp |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 141 | |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 142 | service#omec-up: |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 143 | type: tosca.nodes.Service |
| 144 | properties: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 145 | name: omec-up |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 146 | |
Matteo Scandolo | c889afb | 2019-02-15 10:42:00 -0800 | [diff] [blame] | 147 | service#cdn-local: |
| 148 | type: tosca.nodes.Service |
| 149 | properties: |
| 150 | name: cdn-local |
| 151 | |
| 152 | service#cdn-remote: |
| 153 | type: tosca.nodes.Service |
| 154 | properties: |
| 155 | name: cdn-remote |
| 156 | |
Matteo Scandolo | 3f2426b | 2019-01-18 13:46:26 -0800 | [diff] [blame] | 157 | service_dependency#onos-fabric_fabric: |
| 158 | type: tosca.nodes.ServiceDependency |
| 159 | properties: |
| 160 | connect_method: none |
| 161 | requirements: |
| 162 | - subscriber_service: |
| 163 | node: service#fabric |
| 164 | relationship: tosca.relationships.BelongsToOne |
| 165 | - provider_service: |
| 166 | node: service#onos |
| 167 | relationship: tosca.relationships.BelongsToOne |
| 168 | |
Matteo Scandolo | a9ac2b8 | 2019-01-29 16:55:35 -0800 | [diff] [blame] | 169 | service_dependency#vrouter_fabric: |
| 170 | type: tosca.nodes.ServiceDependency |
| 171 | properties: |
| 172 | connect_method: none |
| 173 | requirements: |
| 174 | - subscriber_service: |
| 175 | node: service#vrouter |
| 176 | relationship: tosca.relationships.BelongsToOne |
| 177 | - provider_service: |
| 178 | node: service#fabric |
| 179 | relationship: tosca.relationships.BelongsToOne |
| 180 | |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 181 | service_dependency#mcord_progran: |
| 182 | type: tosca.nodes.ServiceDependency |
| 183 | properties: |
| 184 | connect_method: none |
| 185 | requirements: |
| 186 | - subscriber_service: |
| 187 | node: service#progran |
| 188 | relationship: tosca.relationships.BelongsToOne |
| 189 | - provider_service: |
| 190 | node: service#mcord |
| 191 | relationship: tosca.relationships.BelongsToOne |
| 192 | |
| 193 | service_dependency#progran_epc_cp: |
| 194 | type: tosca.nodes.ServiceDependency |
| 195 | properties: |
| 196 | connect_method: none |
| 197 | requirements: |
| 198 | - subscriber_service: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 199 | node: service#omec-cp |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 200 | relationship: tosca.relationships.BelongsToOne |
| 201 | - provider_service: |
| 202 | node: service#progran |
| 203 | relationship: tosca.relationships.BelongsToOne |
| 204 | |
| 205 | service_dependency#epc_cp_epc_up: |
| 206 | type: tosca.nodes.ServiceDependency |
| 207 | properties: |
| 208 | connect_method: none |
| 209 | requirements: |
| 210 | - subscriber_service: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 211 | node: service#omec-up |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 212 | relationship: tosca.relationships.BelongsToOne |
| 213 | - provider_service: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 214 | node: service#omec-cp |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 215 | relationship: tosca.relationships.BelongsToOne |
| 216 | |
| 217 | service_dependency#progran_epc_up: |
| 218 | type: tosca.nodes.ServiceDependency |
| 219 | properties: |
| 220 | connect_method: none |
| 221 | requirements: |
| 222 | - subscriber_service: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 223 | node: service#omec-up |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 224 | relationship: tosca.relationships.BelongsToOne |
| 225 | - provider_service: |
| 226 | node: service#progran |
| 227 | relationship: tosca.relationships.BelongsToOne |
| 228 | |
| 229 | service_dependency#epc_up_cdn_local: |
| 230 | type: tosca.nodes.ServiceDependency |
| 231 | properties: |
| 232 | connect_method: none |
| 233 | requirements: |
| 234 | - subscriber_service: |
| 235 | node: service#cdn-local |
| 236 | relationship: tosca.relationships.BelongsToOne |
| 237 | - provider_service: |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 238 | node: service#omec-up |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 239 | relationship: tosca.relationships.BelongsToOne |
| 240 | |
| 241 | service_dependency#cdn_local_cdn_remote: |
| 242 | type: tosca.nodes.ServiceDependency |
| 243 | properties: |
| 244 | connect_method: none |
| 245 | requirements: |
| 246 | - subscriber_service: |
| 247 | node: service#cdn-remote |
| 248 | relationship: tosca.relationships.BelongsToOne |
| 249 | - provider_service: |
| 250 | node: service#cdn-local |
| 251 | relationship: tosca.relationships.BelongsToOne |
| 252 | |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 253 | constraints: |
| 254 | type: tosca.nodes.ServiceGraphConstraint |
| 255 | properties: |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 256 | {{- if .Values.seba.enabled }} |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 257 | constraints: '[ ["mcord", null, "onos"], ["progran", null, "fabric"], ["omec-cp", null, null] ["omec-up", null, null] ]' |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 258 | {{ else }} |
Woojoong Kim | 79360c3 | 2019-07-08 15:56:50 -0700 | [diff] [blame] | 259 | constraints: '[ ["mcord", "progran", null], ["omec-cp", "omec-up", "onos"], [null, "cdn-local", "fabric"], [null, "cdn-remote", "vrouter"] ]' |
Matteo Scandolo | 2b08edc | 2019-01-25 15:03:37 -0800 | [diff] [blame] | 260 | {{- end -}} |
Woojoong Kim | ee78bac | 2019-06-21 14:31:42 -0700 | [diff] [blame] | 261 | {{- end -}} |