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