-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-elineservice.yaml.j2
144 lines (122 loc) · 4.12 KB
/
test-elineservice.yaml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{#
Copyright 2017-present Open Networking Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- custom_types/slice.yaml
- custom_types/site.yaml
- custom_types/image.yaml
- custom_types/flavor.yaml
- custom_types/network.yaml
- custom_types/networktemplate.yaml
- custom_types/networkslice.yaml
- custom_types/elineservice.yaml
- custom_types/elineserviceinstance.yaml
description: configure elineservice
topology_template:
node_templates:
# site, image, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
properties:
must-exist: true
name: {{ site_name }}
m1.small:
type: tosca.nodes.Flavor
properties:
name: m1.small
must-exist: true
trusty-server-multi-nic:
type: tosca.nodes.Image
properties:
name: trusty-server-multi-nic
must-exist: true
# private network template, fully created somewhere else
private:
type: tosca.nodes.NetworkTemplate
properties:
must-exist: true
name: Private
# management networks, fully created in management-net.yaml
management_network:
type: tosca.nodes.Network
properties:
must-exist: true
name: management
elineservice_network:
type: tosca.nodes.Network
properties:
name: elineservice_network
labels: elineservice_private_network
requirements:
- template:
node: private
relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_elineservice
relationship: tosca.relationships.BelongsToOne
# CORD Slices
{{ site_name }}_elineservice:
description: Eline Service Slice
type: tosca.nodes.Slice
properties:
name: {{ site_name }}_elineservice
default_isolation: vm
network: noauto
requirements:
- site:
node: mysite
relationship: tosca.relationships.BelongsToOne
- service:
node: elineservice
relationship: tosca.relationships.BelongsToOne
- default_image:
node: trusty-server-multi-nic
relationship: tosca.relationships.BelongsToOne
- default_flavor:
node: m1.small
relationship: tosca.relationships.BelongsToOne
# CORD NetworkSlices
elineservice_slice_management_network:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: management_network
relationship: tosca.relationships.BelongsToOne
- slice:
node: {{ site_name }}_elineservice
relationship: tosca.relationships.BelongsToOne
elineservice_slice_elineservice_network:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: elineservice_network
relationship: tosca.relationships.BelongsToOne
- slice:
node: {{ site_name }}_elineservice
relationship: tosca.relationships.BelongsToOne
elineservice:
type: tosca.nodes.ElineService
properties:
name: elineservice
public_key: {{ lookup('file', head_cord_profile_dir + '/key_import/vsg_rsa.pub') }}
private_key_fn: /opt/xos/services/elineservice/keys/vsg_rsa
#service_message: hello
elinetenant2:
type: tosca.nodes.ElineServiceInstance
properties:
name: elinetenant2
#tenant_message: world
requirements:
- owner:
node: elineservice
relationship: tosca.relationships.BelongsToOne