Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | {# |
| 2 | Copyright 2017-present Open Networking Foundation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | #} |
| 16 | |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | |
| 19 | description: Creates a CORD test subscriber, created by platform-install |
| 20 | |
| 21 | imports: |
| 22 | - custom_types/xos.yaml |
| 23 | - custom_types/vee.yaml |
| 24 | - custom_types/veg.yaml |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | # site, fully created in deployment.yaml |
| 30 | {{ site_name }}: |
| 31 | type: tosca.nodes.Site |
| 32 | properties: |
| 33 | no-delete: true |
| 34 | no-create: true |
| 35 | no-update: true |
| 36 | # vsg slice, volt service, fully created in cord-services.yaml |
| 37 | {{ site_name }}_veg: |
| 38 | type: tosca.nodes.Slice |
| 39 | properties: |
| 40 | no-delete: true |
| 41 | no-create: true |
| 42 | no-update: true |
| 43 | |
| 44 | service#vee: |
| 45 | type: tosca.nodes.VEEService |
| 46 | properties: |
| 47 | no-delete: true |
| 48 | no-create: true |
| 49 | no-update: true |
| 50 | |
| 51 | service#vrouter: |
| 52 | type: tosca.nodes.VRouterService |
| 53 | properties: |
| 54 | no-delete: true |
| 55 | no-create: true |
| 56 | no-update: true |
| 57 | |
| 58 | service#veg: |
| 59 | type: tosca.nodes.VEGService |
| 60 | requirements: |
| 61 | properties: |
| 62 | no-delete: true |
| 63 | no-create: true |
| 64 | no-update: true |
| 65 | |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 66 | # Test subscriber |
| 67 | |
| 68 | # Let's add a user who can be administrator of the household |
| 69 | johndoe@myhouse.com: |
| 70 | type: tosca.nodes.User |
| 71 | properties: |
| 72 | password: letmein |
| 73 | firstname: john |
| 74 | lastname: doe |
| 75 | requirements: |
| 76 | - site: |
| 77 | node: {{ site_name }} |
| 78 | relationship: tosca.relationships.MemberOfSite |
| 79 | - dependency: |
| 80 | node: {{ site_name }}_veg |
| 81 | relationship: tosca.relationships.DependsOn |
| 82 | |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 83 | # Subscribers require a service in 4.0, so make sure we have an ecordlocal service. |
| 84 | # FIXME: Move to a different tosca recipe? |
| 85 | service#ecordlocal: |
| 86 | type: tosca.nodes.Service |
| 87 | |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 88 | # A subscriber |
| 89 | My Enterprise: |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 90 | type: tosca.nodes.Tenant |
| 91 | properties: |
| 92 | service_specific_id: 123 |
| 93 | requirements: |
| 94 | - provider_service: |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 95 | node: service#ecordlocal |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 96 | relationship: tosca.relationships.MemberOfService |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 97 | |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 98 | My vEG: |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 99 | type: tosca.nodes.Tenant |
| 100 | properties: |
| 101 | service_specific_id: 123 |
| 102 | requirements: |
| 103 | - provider_service: |
| 104 | node: service#veg |
| 105 | relationship: tosca.relationships.MemberOfService |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 106 | - subscriber_tenant: |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 107 | node: My vEE |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 108 | relationship: tosca.relationships.BelongsToTenant |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 109 | |
| 110 | My vEE: |
| 111 | type: tosca.nodes.Tenant |
| 112 | properties: |
| 113 | service_specific_id: 123 |
| 114 | requirements: |
| 115 | - provider_service: |
| 116 | node: service#vee |
| 117 | relationship: tosca.relationships.MemberOfService |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 118 | - subscriber: |
| 119 | node: My Enterprise |
| 120 | relationship: tosca.relationships.BelongsToSubscriber |
Scott Baker | 33a71b4 | 2017-10-12 08:57:55 -0700 | [diff] [blame] | 121 | # - dependency: |
| 122 | # node: {{ site_name }}_veg |
| 123 | # relationship: tosca.relationships.DependsOn |