vFW and vDNS support added to azure-plugin
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / tests / resources / service-templates / tosca-simple-1.0 / node-cellar / types / openstack.yaml
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  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 imports:
17   - os.yaml
18   - aria-1.0
19
20 dsl_definitions:
21
22   openstack:
23     uuid_constraints: &OPENSTACK_UUID_CONSTRAINTS
24       - pattern: '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'
25
26 node_types:
27
28   openstack.Instance:
29     description: >-
30       OpenStack instance.
31
32       You may assign an image_id or attach an openstack.Image artifact (the artifact
33       will take precedence).
34
35       You may assign either flavor_id or flavor_name (flavor_id will take precedence).
36       If neither are assigned, flavor_name has a default value.
37     derived_from: tosca.nodes.Compute
38     properties:
39       image_id:
40         description: >-
41           See: https://s3itwiki.uzh.ch/display/clouddoc/Supported+Images
42         type: openstack.UUID
43         default: 5d62e82c-924e-4fa9-b1e4-c133867596f7
44       flavor_id:
45         type: openstack.UUID
46         required: false
47       flavor_name:
48         type: string
49         default: m1.medium
50         required: false
51       availability_zone:
52         description: >-
53           OpenStack availability zone.
54         type: string
55         required: false
56       os_users:
57         type: map
58         entry_schema: os.UserInfo
59     interfaces:
60       Standard:
61         type: tosca.interfaces.node.lifecycle.Standard
62         inputs:
63           openstack_credential:
64             description: The OpenStack API credential for all operations.
65             type: openstack.Credential
66         create:
67           implementation:
68             primary: openstack/create_instance.sh
69             dependencies:
70               - openstack/utils/api.sh
71               - utils/os.sh
72     requirements:
73       - local_storage: # @override
74           capability: tosca.capabilities.Attachment
75           node: openstack.Volume
76           relationship: tosca.relationships.AttachesTo
77 #          relationship:
78 #            type: tosca.relationships.AttachesTo
79 #            interfaces:
80 #              Standard:
81 #                inputs:
82 #                  xxx:
83 #                    type: string
84 #                    default: { concat: [ a, b ] }
85           occurrences: [ 0, UNBOUNDED ]
86
87   openstack.Volume:
88     description: >-
89       OpenStack volume.
90
91       See: http://developer.openstack.org/api-ref-blockstorage-v2.html
92     derived_from: tosca.nodes.BlockStorage
93     properties:
94       tenant_id:
95         type: openstack.UUID
96         required: false
97       availability_zone:
98         type: string
99         required: false
100       source_volid:
101         type: openstack.UUID
102         required: false
103       description:
104         type: string
105         required: false
106       multiattach:
107         type: boolean
108         default: false
109       #snapshot_id: # @override
110       #  type: openstack.UUID
111       #  required: false
112       name:
113         type: string
114         required: false
115       volume_type:
116         type: string
117         required: false
118       metadata:
119         type: map
120         entry_schema: string
121         required: false
122       source_replica:
123         type: openstack.UUID
124         required: false
125       consistencygroup_id:
126         type: openstack.UUID
127         required: false
128       scheduler_hints:
129         type: map
130         entry_schema: string
131         required: false
132     interfaces:
133       Standard:
134         type: tosca.interfaces.node.lifecycle.Standard
135         inputs:
136           openstack_credential:
137             description: The OpenStack API credential for all operations.
138             type: openstack.Credential
139         create:
140           implementation:
141             primary: openstack/create_volume.sh
142             dependencies:
143               - openstack/utils/api.sh
144               - utils/os.sh
145
146 group_types:
147
148   openstack.Secured:
149     description: >-
150       OpenStack secured group.
151     derived_from: tosca.groups.Root
152     members:
153       - openstack.Instance
154     interfaces:
155       Standard:
156         type: tosca.interfaces.node.lifecycle.Standard
157         inputs:
158           openstack_credential:
159             description: The OpenStack API credential for all operations.
160             type: openstack.Credential
161         create:
162           implementation:
163             primary: openstack/create_secured_group.sh
164             dependencies:
165               - openstack/utils/api.sh
166               - utils/os.sh
167
168 policy_types:
169
170   openstack.Scaling:
171     description: >-
172       OpenStack scaling policy.
173     derived_from: aria.Scaling
174     properties:
175       bandwidth_threshold:
176         type: scalar-unit.size
177         default: 1 GB
178     targets:
179       - openstack.Instance
180       - openstack.Secured
181
182 data_types:
183
184   openstack.Credential:
185     derived_from: tosca.datatypes.Credential
186
187   openstack.UUID:
188     description: >-
189       OpenStack UUID (in GUID format).
190     derived_from: string
191     constraints: *OPENSTACK_UUID_CONSTRAINTS
192
193 artifact_types:
194
195   openstack.Image:
196     description: >-
197       OpenStack image artifact.
198     derived_from: tosca.artifacts.Deployment.Image.VM
199     file_ext:
200       - img
201       - iso