Scott Baker | afff308 | 2018-07-16 17:23:26 -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 | */}} |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 17 | {{- define "att-workflow.basicFixturesTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | description: Some basic fixtures |
| 20 | imports: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 21 | - custom_types/deployment.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 22 | - custom_types/networkparametertype.yaml |
| 23 | - custom_types/networktemplate.yaml |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 24 | - custom_types/siterole.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 25 | topology_template: |
| 26 | node_templates: |
| 27 | |
| 28 | # ----------------------------------------------------------------------------- |
| 29 | # Network Parameter Types |
| 30 | # ----------------------------------------------------------------------------- |
| 31 | s_tag: |
| 32 | type: tosca.nodes.NetworkParameterType |
| 33 | properties: |
| 34 | name: s_tag |
| 35 | c_tag: |
| 36 | type: tosca.nodes.NetworkParameterType |
| 37 | properties: |
| 38 | name: c_tag |
| 39 | next_hop: |
| 40 | type: tosca.nodes.NetworkParameterType |
| 41 | properties: |
| 42 | name: next_hop |
| 43 | device: |
| 44 | type: tosca.nodes.NetworkParameterType |
| 45 | properties: |
| 46 | name: device |
| 47 | bridge: |
| 48 | type: tosca.nodes.NetworkParameterType |
| 49 | properties: |
| 50 | name: bridge |
| 51 | neutron_port_name: |
| 52 | type: tosca.nodes.NetworkParameterType |
| 53 | properties: |
| 54 | name: neutron_port_name |
| 55 | |
| 56 | # ---------------------------------------------------------------------------- |
| 57 | # Roles |
| 58 | # ---------------------------------------------------------------------------- |
| 59 | siterole#admin: |
| 60 | type: tosca.nodes.SiteRole |
| 61 | properties: |
| 62 | role: admin |
| 63 | siterole#pi: |
| 64 | type: tosca.nodes.SiteRole |
| 65 | properties: |
| 66 | role: pi |
| 67 | siterole#tech: |
| 68 | type: tosca.nodes.SiteRole |
| 69 | properties: |
| 70 | role: tech |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 71 | |
| 72 | # ----------------------------------------------------------------------------- |
| 73 | # Network Templates |
| 74 | # ----------------------------------------------------------------------------- |
| 75 | Private: |
| 76 | type: tosca.nodes.NetworkTemplate |
| 77 | properties: |
| 78 | name: Private |
| 79 | visibility: private |
| 80 | translation: none |
| 81 | |
| 82 | Public shared IPv4: |
| 83 | type: tosca.nodes.NetworkTemplate |
| 84 | properties: |
| 85 | name: Public shared IPv4 |
| 86 | visibility: private |
| 87 | translation: NAT |
| 88 | shared_network_name: nat-net |
| 89 | |
| 90 | Public dedicated IPv4: |
| 91 | type: tosca.nodes.NetworkTemplate |
| 92 | properties: |
| 93 | name: Public dedicated IPv4 |
| 94 | visibility: public |
| 95 | translation: none |
| 96 | shared_network_name: ext-net |
| 97 | |
| 98 | # ----------------------------------------------------------------------------- |
| 99 | # Deployment |
| 100 | # ----------------------------------------------------------------------------- |
| 101 | MyDeployment: |
| 102 | type: tosca.nodes.Deployment |
| 103 | properties: |
| 104 | name: MyDeployment |
| 105 | {{- end -}} |
| 106 | |
| 107 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 108 | {{- define "att-workflow.serviceGraphTosca" -}} |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 109 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 110 | imports: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 111 | - custom_types/attworkflowdriverservice.yaml |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 112 | - custom_types/fabricservice.yaml |
| 113 | - custom_types/onosservice.yaml |
| 114 | - custom_types/rcordservice.yaml |
| 115 | - custom_types/voltservice.yaml |
| 116 | - custom_types/fabriccrossconnectservice.yaml |
| 117 | - custom_types/servicedependency.yaml |
| 118 | - custom_types/servicegraphconstraint.yaml |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 119 | description: att-workflow service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 120 | topology_template: |
| 121 | node_templates: |
| 122 | |
| 123 | # These services must be defined before loading the graph |
| 124 | |
| 125 | service#ONOS_Fabric: |
| 126 | type: tosca.nodes.ONOSService |
| 127 | properties: |
| 128 | name: ONOS_Fabric |
| 129 | must-exist: true |
| 130 | |
| 131 | service#ONOS_VOLTHA: |
| 132 | type: tosca.nodes.ONOSService |
| 133 | properties: |
| 134 | name: ONOS_VOLTHA |
| 135 | must-exist: true |
| 136 | |
| 137 | service#fabric: |
| 138 | type: tosca.nodes.FabricService |
| 139 | properties: |
| 140 | name: fabric |
| 141 | must-exist: true |
| 142 | |
| 143 | service#rcord: |
| 144 | type: tosca.nodes.RCORDService |
| 145 | properties: |
| 146 | name: rcord |
| 147 | must-exist: true |
| 148 | |
| 149 | service#volt: |
| 150 | type: tosca.nodes.VOLTService |
| 151 | properties: |
| 152 | name: volt |
| 153 | must-exist: true |
| 154 | |
| 155 | service#fabric-crossconnect: |
| 156 | type: tosca.nodes.FabricCrossconnectService |
| 157 | properties: |
| 158 | name: fabric-crossconnect |
| 159 | must-exist: true |
| 160 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 161 | service#att-workflow-driver: |
| 162 | type: tosca.nodes.AttWorkflowDriverService |
| 163 | properties: |
| 164 | name: att-workflow-driver |
| 165 | must-exist: true |
| 166 | |
| 167 | # The att-workflow service graph |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 168 | |
| 169 | service_dependency#onos-fabric_fabric: |
| 170 | type: tosca.nodes.ServiceDependency |
| 171 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 172 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 173 | requirements: |
| 174 | - subscriber_service: |
| 175 | node: service#ONOS_Fabric |
| 176 | relationship: tosca.relationships.BelongsToOne |
| 177 | - provider_service: |
| 178 | node: service#fabric |
| 179 | relationship: tosca.relationships.BelongsToOne |
| 180 | |
| 181 | service_dependency#rcord_volt: |
| 182 | type: tosca.nodes.ServiceDependency |
| 183 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 184 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 185 | requirements: |
| 186 | - subscriber_service: |
| 187 | node: service#rcord |
| 188 | relationship: tosca.relationships.BelongsToOne |
| 189 | - provider_service: |
| 190 | node: service#volt |
| 191 | relationship: tosca.relationships.BelongsToOne |
| 192 | |
| 193 | service_dependency#onos_voltha_volt: |
| 194 | type: tosca.nodes.ServiceDependency |
| 195 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 196 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 197 | requirements: |
| 198 | - subscriber_service: |
| 199 | node: service#volt |
| 200 | relationship: tosca.relationships.BelongsToOne |
| 201 | - provider_service: |
| 202 | node: service#ONOS_VOLTHA |
| 203 | relationship: tosca.relationships.BelongsToOne |
| 204 | |
| 205 | service_dependency#volt_fabric-crossconnect: |
| 206 | type: tosca.nodes.ServiceDependency |
| 207 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 208 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 209 | requirements: |
| 210 | - subscriber_service: |
| 211 | node: service#volt |
| 212 | relationship: tosca.relationships.BelongsToOne |
| 213 | - provider_service: |
| 214 | node: service#fabric-crossconnect |
| 215 | relationship: tosca.relationships.BelongsToOne |
| 216 | |
| 217 | service_dependency#onos_fabric_fabric-crossconnect: |
| 218 | type: tosca.nodes.ServiceDependency |
| 219 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 220 | connect_method: none |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 221 | requirements: |
| 222 | - subscriber_service: |
| 223 | node: service#fabric-crossconnect |
| 224 | relationship: tosca.relationships.BelongsToOne |
| 225 | - provider_service: |
| 226 | node: service#ONOS_Fabric |
| 227 | relationship: tosca.relationships.BelongsToOne |
| 228 | |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 229 | service_dependency#workflow_volt: |
| 230 | type: tosca.nodes.ServiceDependency |
| 231 | properties: |
| 232 | connect_method: none |
| 233 | requirements: |
| 234 | - subscriber_service: |
| 235 | node: service#att-workflow-driver |
| 236 | relationship: tosca.relationships.BelongsToOne |
| 237 | - provider_service: |
| 238 | node: service#volt |
| 239 | relationship: tosca.relationships.BelongsToOne |
| 240 | |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 241 | constraints: |
| 242 | type: tosca.nodes.ServiceGraphConstraint |
| 243 | properties: |
Matteo Scandolo | 7607b52 | 2018-08-09 17:03:58 -0700 | [diff] [blame] | 244 | constraints: '[[null, "rcord", null], ["ONOS_VOLTHA", "volt", null], ["ONOS_Fabric", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]' |
Scott Baker | afff308 | 2018-07-16 17:23:26 -0700 | [diff] [blame] | 245 | {{- end -}} |
| 246 | |