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