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