blob: 220a6c116740edf613e3e6a6ebfb75d7cb1f019b [file] [log] [blame]
Andy Baviera40e82b2018-05-07 17:00:36 -07001{{/* vim: set filetype=mustache: */}}
2{{/*
3Copyright 2018-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16*/}}
17{{- define "mcord.fixtureTosca" -}}
18tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/deployment.yaml
22 - custom_types/site.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070023
24description: set up site and deployment and link them
25
26topology_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 Scandolo3f2426b2019-01-18 13:46:26 -080042{{- define "mcord.onosTosca" -}}
43tosca_definitions_version: tosca_simple_yaml_1_0
44
45imports:
46 - custom_types/onosapp.yaml
47 - custom_types/onosservice.yaml
48 - custom_types/serviceinstanceattribute.yaml
49
50description: Configures the VOLTHA ONOS service
51
52topology_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 Baviera40e82b2018-05-07 17:00:36 -070094{{- define "mcord.serviceGraphTosca" -}}
95tosca_definitions_version: tosca_simple_yaml_1_0
96
97imports:
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080098 - custom_types/fabricservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070099 - custom_types/mcordsubscriberservice.yaml
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800100 - custom_types/onosservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700101 - custom_types/progranservice.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700102 - custom_types/servicegraphconstraint.yaml
103 - custom_types/servicedependency.yaml
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800104 - custom_types/service.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -0700105
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800106description: Configures the M-CORD service graph
Andy Baviera40e82b2018-05-07 17:00:36 -0700107
108topology_template:
109 node_templates:
110
Andy Baviera40e82b2018-05-07 17:00:36 -0700111 service#progran:
112 type: tosca.nodes.ProgranService
113 properties:
114 name: progran
115 must-exist: true
116
117 service#mcord:
118 type: tosca.nodes.MCordSubscriberService
119 properties:
120 name: mcord
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800121 must-exist: true
Andy Baviera40e82b2018-05-07 17:00:36 -0700122
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800123 service#onos:
124 type: tosca.nodes.ONOSService
125 properties:
126 name: onos
127 must-exist: true
128
129 service#fabric:
130 type: tosca.nodes.FabricService
131 properties:
132 name: fabric
133 must-exist: true
134
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800135 service#epc-local:
136 type: tosca.nodes.Service
137 properties:
138 name: epc-local
139
140 service#epc-remote:
141 type: tosca.nodes.Service
142 properties:
143 name: epc-remote
144
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800145 mcord_progran:
Andy Baviera40e82b2018-05-07 17:00:36 -0700146 type: tosca.nodes.ServiceDependency
147 properties:
Scott Baker1d408032018-08-29 08:34:49 -0700148 connect_method: none
Andy Baviera40e82b2018-05-07 17:00:36 -0700149 requirements:
150 - subscriber_service:
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800151 node: service#progran
Andy Baviera40e82b2018-05-07 17:00:36 -0700152 relationship: tosca.relationships.BelongsToOne
153 - provider_service:
154 node: service#mcord
155 relationship: tosca.relationships.BelongsToOne
156
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800157 progran_epc_local:
158 type: tosca.nodes.ServiceDependency
159 properties:
160 connect_method: none
161 requirements:
162 - subscriber_service:
163 node: service#epc-local
164 relationship: tosca.relationships.BelongsToOne
165 - provider_service:
166 node: service#progran
167 relationship: tosca.relationships.BelongsToOne
168
169 epc_local_epc_remote:
170 type: tosca.nodes.ServiceDependency
171 properties:
172 connect_method: none
173 requirements:
174 - subscriber_service:
175 node: service#epc-remote
176 relationship: tosca.relationships.BelongsToOne
177 - provider_service:
178 node: service#epc-local
179 relationship: tosca.relationships.BelongsToOne
180
Matteo Scandolo3f2426b2019-01-18 13:46:26 -0800181 service_dependency#onos-fabric_fabric:
182 type: tosca.nodes.ServiceDependency
183 properties:
184 connect_method: none
185 requirements:
186 - subscriber_service:
187 node: service#fabric
188 relationship: tosca.relationships.BelongsToOne
189 - provider_service:
190 node: service#onos
191 relationship: tosca.relationships.BelongsToOne
192
Andy Baviera40e82b2018-05-07 17:00:36 -0700193 constraints:
194 type: tosca.nodes.ServiceGraphConstraint
195 properties:
Matteo Scandolo2b08edc2019-01-25 15:03:37 -0800196{{- if .Values.seba.enabled }}
197 constraints: '[ ["mcord", null, "onos"], ["progran", null, "fabric"], ["epc-local", null, null] ["epc-remote", null, null] ]'
198{{ else }}
199 constraints: '[ ["mcord", "rcord", null], ["progran", "volt", "att-workflow-driver"], ["epc-local", "fabric-crossconnect", "onos"], ["epc-remote", null, "fabric"] ]'
200{{- end -}}
Andy Baviera40e82b2018-05-07 17:00:36 -0700201{{- end -}}
202