Daniele Moro | 50fa407 | 2019-11-07 23:42:16 -0800 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2019-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 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @oss-service.yaml http://10.90.0.101:30007/run |
| 17 | |
| 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | imports: |
| 20 | - custom_types/servicedependency.yaml |
| 21 | - custom_types/voltservice.yaml |
| 22 | - custom_types/dtworkflowdriverwhitelistentry.yaml |
| 23 | - custom_types/dtworkflowdriverservice.yaml |
| 24 | description: Create an instance of the OSS Service and connect it to the vOLT Service |
| 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | service#dt: |
| 30 | type: tosca.nodes.DtWorkflowDriverService |
| 31 | properties: |
| 32 | name: dt-workflow-driver |
| 33 | must-exist: true |
| 34 | |
| 35 | {{- $onucount := (.Values.numOnus|int) }} |
| 36 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 37 | {{- range $j, $junk1 := until ($onucount) }} |
| 38 | whitelist{{ $i }}-{{ $j }}: |
| 39 | type: tosca.nodes.DtWorkflowDriverWhiteListEntry |
| 40 | properties: |
| 41 | {{- if $.Values.legacyPonsim }} |
| 42 | serial_number: PSMO12345678 |
| 43 | device_id: of:0000aabbccddeeff |
| 44 | {{- else }} |
| 45 | serial_number: PSMO{{ printf "%04d%04d" $i $j }} |
| 46 | device_id: {{ index $.Values.oltDpids $i }} |
| 47 | {{- end }} |
| 48 | pon_port_id: 1 |
| 49 | requirements: |
| 50 | - owner: |
| 51 | node: service#dt |
| 52 | relationship: tosca.relationships.BelongsToOne |
| 53 | {{- end }} |
| 54 | {{- end }} |