Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -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 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | description: Creates a CORD test subscriber, created by platform-install |
| 22 | |
| 23 | imports: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 24 | - custom_types/cordsubscriberroot.yaml |
| 25 | - custom_types/site.yaml |
| 26 | - custom_types/slice.yaml |
| 27 | - custom_types/user.yaml |
| 28 | - custom_types/voltservice.yaml |
| 29 | - custom_types/volttenant.yaml |
| 30 | - custom_types/serviceinstancelink.yaml |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 31 | |
| 32 | topology_template: |
| 33 | node_templates: |
| 34 | |
| 35 | # site, fully created in deployment.yaml |
| 36 | {{ site_name }}: |
| 37 | type: tosca.nodes.Site |
| 38 | properties: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 39 | name: {{ site_name }} |
| 40 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 41 | |
| 42 | # vsg slice, volt service, fully created in cord-services.yaml |
| 43 | {{ site_name }}_vsg: |
| 44 | type: tosca.nodes.Slice |
| 45 | properties: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 46 | name: {{ site_name }}_vsg |
| 47 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 48 | |
| 49 | service#volt: |
| 50 | type: tosca.nodes.VOLTService |
| 51 | properties: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 52 | name: volt |
| 53 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 54 | |
| 55 | # Test subscriber |
| 56 | |
| 57 | # Let's add a user who can be administrator of the household |
| 58 | johndoe@myhouse.com: |
| 59 | type: tosca.nodes.User |
| 60 | properties: |
| 61 | password: letmein |
| 62 | firstname: john |
| 63 | lastname: doe |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 64 | username: johndoe@myhouse.com |
| 65 | email: johndoe@myhouse.com |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 66 | requirements: |
| 67 | - site: |
| 68 | node: {{ site_name }} |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 69 | relationship: tosca.relationships.BelongsToOne |
| 70 | # NOTE: is this useful? can't find this relation in the old TOSCA |
| 71 | # - dependency: |
| 72 | # node: {{ site_name }}_vsg |
| 73 | # relationship: tosca.relationships.DependsOn |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 74 | |
| 75 | # A subscriber |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 76 | my_house: |
| 77 | type: tosca.nodes.CordSubscriberRoot |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 78 | properties: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 79 | name: My House |
| 80 | service_specific_id: "123" |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 81 | firewall_enable: false |
| 82 | cdn_enable: false |
| 83 | url_filter_enable: false |
| 84 | url_filter_level: R |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 85 | # NOTE this appears not to be used |
| 86 | # requirements: |
| 87 | # - house_admin: |
| 88 | # node: johndoe@myhouse.com |
| 89 | # relationship: tosca.relationships.AdminPrivilege |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 90 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 91 | # NOTE needs to be moved to a new model (now they are JSON encoded) |
| 92 | # Mom's PC: |
| 93 | # type: tosca.nodes.CORDUser |
| 94 | # properties: |
| 95 | # mac: 01:02:03:04:05:06 |
| 96 | # level: PG_13 |
| 97 | # requirements: |
| 98 | # - household: |
| 99 | # node: My House |
| 100 | # relationship: tosca.relationships.SubscriberDevice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 101 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 102 | # Dad's PC: |
| 103 | # type: tosca.nodes.CORDUser |
| 104 | # properties: |
| 105 | # mac: 90:E2:BA:82:F9:75 |
| 106 | # level: PG_13 |
| 107 | # requirements: |
| 108 | # - household: |
| 109 | # node: My House |
| 110 | # relationship: tosca.relationships.SubscriberDevice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 111 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 112 | # Jack's Laptop: |
| 113 | # type: tosca.nodes.CORDUser |
| 114 | # properties: |
| 115 | # mac: 68:5B:35:9D:91:D5 |
| 116 | # level: PG_13 |
| 117 | # requirements: |
| 118 | # - household: |
| 119 | # node: My House |
| 120 | # relationship: tosca.relationships.SubscriberDevice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 121 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 122 | # Jill's Laptop: |
| 123 | # type: tosca.nodes.CORDUser |
| 124 | # properties: |
| 125 | # mac: 34:36:3B:C9:B6:A6 |
| 126 | # level: PG_13 |
| 127 | # requirements: |
| 128 | # - household: |
| 129 | # node: My House |
| 130 | # relationship: tosca.relationships.SubscriberDevice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 131 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 132 | si#volt: |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 133 | type: tosca.nodes.VOLTTenant |
| 134 | properties: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 135 | name: My Volt |
| 136 | service_specific_id: "123" |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 137 | s_tag: 222 |
| 138 | c_tag: 111 |
| 139 | requirements: |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 140 | - owner: |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 141 | node: service#volt |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 142 | relationship: tosca.relationships.BelongsToOne |
| 143 | # - subscriber: |
| 144 | # node: my_house |
| 145 | # relationship: tosca.relationships.BelongsToSubscriber |
| 146 | # - dependency: |
| 147 | # node: {{ site_name }}_vsg |
| 148 | # relationship: tosca.relationships.DependsOn |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 149 | |
Matteo Scandolo | 55bb096 | 2017-12-20 16:06:19 -0800 | [diff] [blame^] | 150 | My_Volt_My_House: |
| 151 | type: tosca.nodes.ServiceInstanceLink |
| 152 | requirements: |
| 153 | - provider_service_instance: |
| 154 | node: si#volt |
| 155 | relationship: tosca.relationships.BelongsToOne |
| 156 | - subscriber_service_instance: |
| 157 | node: my_house |
| 158 | relationship: tosca.relationships.BelongsToOne |