Andy Bavier | 01685f8 | 2017-12-21 14:06:54 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-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 | |
| 18 | |
| 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | imports: |
| 22 | - custom_types/addresspool.yaml |
| 23 | - custom_types/addressmanagerservice.yaml |
| 24 | - custom_types/addressmanagerserviceinstance.yaml |
| 25 | - custom_types/network.yaml |
| 26 | - custom_types/networktemplate.yaml |
| 27 | - custom_types/serviceinstance.yaml |
| 28 | - custom_types/serviceinstancelink.yaml |
| 29 | - custom_types/site.yaml |
| 30 | - custom_types/slice.yaml |
| 31 | |
| 32 | description: public network config, generated by platform-install |
| 33 | |
| 34 | topology_template: |
| 35 | node_templates: |
| 36 | |
| 37 | # site, fully created in deployment.yaml |
| 38 | {{ site_name }}: |
| 39 | type: tosca.nodes.Site |
| 40 | properties: |
| 41 | name: {{ site_name }} |
| 42 | must-exist: true |
| 43 | |
| 44 | |
| 45 | |
| 46 | # Address Manager service, fully created in cord-service.yaml |
| 47 | service#addressmanager: |
| 48 | type: tosca.nodes.AddressManagerService |
| 49 | properties: |
| 50 | name: addressmanager |
| 51 | must-exist: true |
| 52 | |
| 53 | # public network |
| 54 | |
| 55 | public_template: |
| 56 | type: tosca.nodes.NetworkTemplate |
| 57 | properties: |
| 58 | name: public_template |
| 59 | visibility: public |
| 60 | translation: none |
| 61 | vtn_kind: PUBLIC |
| 62 | |
| 63 | public: |
| 64 | type: tosca.nodes.Network |
| 65 | properties: |
| 66 | name: public |
| 67 | permit_all_slices: true |
| 68 | subnet: 10.8.1.0/24 # NOTE same as AddressPool#addresses_public |
| 69 | # ip_version: 4 |
| 70 | requirements: |
| 71 | - template: |
| 72 | node: public_template |
| 73 | relationship: tosca.relationships.BelongsToOne |
| 74 | - owner: |
| 75 | node: {{ site_name }}_public |
| 76 | relationship: tosca.relationships.BelongsToOne |
| 77 | |
| 78 | # Created in cord-services.yaml.j2 |
| 79 | addresses_public: |
| 80 | type: tosca.nodes.AddressPool |
| 81 | properties: |
| 82 | name: addresses_public |
| 83 | must-exist: true |
| 84 | |
| 85 | AddressManagerServiceInstancePublicNetwork: |
| 86 | type: tosca.nodes.AddressManagerServiceInstance |
| 87 | requirements: |
| 88 | - owner: |
| 89 | node: service#addressmanager |
| 90 | relationship: tosca.relationships.BelongsToOne |
| 91 | - address_pool: |
| 92 | node: addresses_public |
| 93 | relationship: tosca.relationships.BelongsToOne |
| 94 | properties: |
| 95 | name: AM_public_net |
| 96 | |
| 97 | public_to_address_manager: |
| 98 | type: tosca.nodes.ServiceInstanceLink |
| 99 | requirements: |
| 100 | - provider_service_instance: |
| 101 | node: AddressManagerServiceInstancePublicNetwork |
| 102 | relationship: tosca.relationships.BelongsToOne |
| 103 | - subscriber_network: |
| 104 | node: public |
| 105 | relationship: tosca.relationships.BelongsToOne |
| 106 | |
| 107 | {{ site_name }}_public: |
| 108 | description: This slice exists solely to own the public network |
| 109 | type: tosca.nodes.Slice |
| 110 | properties: |
| 111 | network: noauto |
| 112 | name: {{ site_name }}_public |
| 113 | requirements: |
| 114 | - site: |
| 115 | node: {{ site_name }} |
| 116 | relationship: tosca.relationships.BelongsToOne |
| 117 | |