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 | */}} |
| 17 | {{- define "rcord-lite.basicFixturesTosca" -}} |
| 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | description: Some basic fixtures |
| 20 | imports: |
| 21 | - custom_types/siterole.yaml |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 22 | - custom_types/deployment.yaml |
| 23 | topology_template: |
| 24 | node_templates: |
| 25 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 26 | # ---------------------------------------------------------------------------- |
| 27 | # Roles |
| 28 | # ---------------------------------------------------------------------------- |
| 29 | siterole#admin: |
| 30 | type: tosca.nodes.SiteRole |
| 31 | properties: |
| 32 | role: admin |
| 33 | siterole#pi: |
| 34 | type: tosca.nodes.SiteRole |
| 35 | properties: |
| 36 | role: pi |
| 37 | siterole#tech: |
| 38 | type: tosca.nodes.SiteRole |
| 39 | properties: |
| 40 | role: tech |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 41 | |
| 42 | # ----------------------------------------------------------------------------- |
| 43 | # Deployment |
| 44 | # ----------------------------------------------------------------------------- |
| 45 | MyDeployment: |
| 46 | type: tosca.nodes.Deployment |
| 47 | properties: |
| 48 | name: MyDeployment |
| 49 | {{- end -}} |
| 50 | |
| 51 | |
| 52 | {{- define "rcord-lite.serviceGraphTosca" -}} |
| 53 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 54 | imports: |
| 55 | - custom_types/fabricservice.yaml |
| 56 | - custom_types/onosservice.yaml |
| 57 | - custom_types/rcordservice.yaml |
| 58 | - custom_types/vrouterservice.yaml |
| 59 | - custom_types/voltservice.yaml |
| 60 | - custom_types/vsghwservice.yaml |
| 61 | - custom_types/servicedependency.yaml |
| 62 | - custom_types/servicegraphconstraint.yaml |
| 63 | description: rcord-lite service graph |
| 64 | topology_template: |
| 65 | node_templates: |
| 66 | |
| 67 | # These services must be defined before loading the graph |
| 68 | |
| 69 | service#ONOS_Fabric: |
| 70 | type: tosca.nodes.ONOSService |
| 71 | properties: |
| 72 | name: ONOS_Fabric |
| 73 | must-exist: true |
| 74 | |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 75 | service#ONOS_VOLTHA: |
| 76 | type: tosca.nodes.ONOSService |
| 77 | properties: |
| 78 | name: ONOS_VOLTHA |
| 79 | must-exist: true |
| 80 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 81 | service#fabric: |
| 82 | type: tosca.nodes.FabricService |
| 83 | properties: |
| 84 | name: fabric |
| 85 | must-exist: true |
| 86 | |
| 87 | service#rcord: |
| 88 | type: tosca.nodes.RCORDService |
| 89 | properties: |
| 90 | name: rcord |
| 91 | must-exist: true |
| 92 | |
| 93 | service#vrouter: |
| 94 | type: tosca.nodes.VRouterService |
| 95 | properties: |
| 96 | name: vrouter |
| 97 | must-exist: true |
| 98 | |
| 99 | service#volt: |
| 100 | type: tosca.nodes.VOLTService |
| 101 | properties: |
| 102 | name: volt |
| 103 | must-exist: true |
| 104 | |
| 105 | service#vsg-hw: |
| 106 | type: tosca.nodes.VSGHWService |
| 107 | properties: |
| 108 | name: vsg-hw |
| 109 | must-exist: true |
| 110 | |
| 111 | # The rcord-lite service graph |
| 112 | |
| 113 | service_dependency#onos-fabric_fabric: |
| 114 | type: tosca.nodes.ServiceDependency |
| 115 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 116 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 117 | requirements: |
| 118 | - subscriber_service: |
| 119 | node: service#ONOS_Fabric |
| 120 | relationship: tosca.relationships.BelongsToOne |
| 121 | - provider_service: |
| 122 | node: service#fabric |
| 123 | relationship: tosca.relationships.BelongsToOne |
| 124 | |
| 125 | service_dependency#rcord_volt: |
| 126 | type: tosca.nodes.ServiceDependency |
| 127 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 128 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 129 | requirements: |
| 130 | - subscriber_service: |
| 131 | node: service#rcord |
| 132 | relationship: tosca.relationships.BelongsToOne |
| 133 | - provider_service: |
| 134 | node: service#volt |
| 135 | relationship: tosca.relationships.BelongsToOne |
| 136 | |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 137 | service_dependency#onos_voltha_volt: |
| 138 | type: tosca.nodes.ServiceDependency |
| 139 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 140 | connect_method: none |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 141 | requirements: |
| 142 | - subscriber_service: |
| 143 | node: service#volt |
| 144 | relationship: tosca.relationships.BelongsToOne |
| 145 | - provider_service: |
| 146 | node: service#ONOS_VOLTHA |
| 147 | relationship: tosca.relationships.BelongsToOne |
| 148 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 149 | service_dependency#fabric_vrouter: |
| 150 | type: tosca.nodes.ServiceDependency |
| 151 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 152 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 153 | requirements: |
| 154 | - subscriber_service: |
| 155 | node: service#fabric |
| 156 | relationship: tosca.relationships.BelongsToOne |
| 157 | - provider_service: |
| 158 | node: service#vrouter |
| 159 | relationship: tosca.relationships.BelongsToOne |
| 160 | |
| 161 | service_dependency#volt_vsg-hw: |
| 162 | type: tosca.nodes.ServiceDependency |
| 163 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 164 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 165 | requirements: |
| 166 | - subscriber_service: |
| 167 | node: service#volt |
| 168 | relationship: tosca.relationships.BelongsToOne |
| 169 | - provider_service: |
| 170 | node: service#vsg-hw |
| 171 | relationship: tosca.relationships.BelongsToOne |
| 172 | |
| 173 | service_dependency#onos_fabric_vsg-hw: |
| 174 | type: tosca.nodes.ServiceDependency |
| 175 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 176 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 177 | requirements: |
| 178 | - subscriber_service: |
| 179 | node: service#vsg-hw |
| 180 | relationship: tosca.relationships.BelongsToOne |
| 181 | - provider_service: |
| 182 | node: service#ONOS_Fabric |
| 183 | relationship: tosca.relationships.BelongsToOne |
| 184 | |
| 185 | constraints: |
| 186 | type: tosca.nodes.ServiceGraphConstraint |
| 187 | properties: |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 188 | constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]' |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 189 | {{- end -}} |
| 190 | |