Skip to content

Commit 519e589

Browse files
add ComputeOffering and DiskOffering
1 parent c68b1c8 commit 519e589

3 files changed

Lines changed: 339 additions & 4 deletions

File tree

engine/schema/src/main/resources/nimble/resource-types/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# TOSCA Profile
22

3-
18 / 31
3+
20 / 31
44

55
- [X] Domain
66
- [X] Account
77
- [X] User
88
- [X] Project
9-
- [ ] ComputeOffering AQUI
10-
- [ ] DiskOffering AQUI
9+
- [X] ComputeOffering
10+
- [X] DiskOffering
1111
- [ ] NetworkOffering MAPAS
1212
- [ ] VpcOffering MAPAS
1313
- [X] InstanceGroup
@@ -33,4 +33,3 @@
3333
- [ ] AutoScalingPolicy AQUI
3434
- [ ] AutoScalingVmProfile AQUI
3535
- [ ] SharedFileSystem AQUI
36-
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
tosca_definitions_version: tosca_2_0
18+
19+
description: >
20+
ComputeOffering node type definition.
21+
22+
node_types:
23+
ComputeOffering:
24+
properties:
25+
name:
26+
type: string
27+
description: Name of the compute offering.
28+
required: true
29+
display-text:
30+
type: string
31+
description: Display text of the compute offering.
32+
required: false
33+
zone-id:
34+
type: string
35+
description: The ID of the availability zone. If not specified, the compute offering will be public.
36+
required: false
37+
domain-id:
38+
type: string
39+
description: The ID of the domain for which the compute offering will be available. If not specified, the compute offering will be public.
40+
required: false
41+
storage-type:
42+
type: string
43+
description: "The type of storage used by the compute offering. Valid values are 'local' and 'shared'."
44+
required: false
45+
validation: { $valid_values: [ $value, [ local, shared ] ] }
46+
provisioning-type:
47+
type: string
48+
description: "The type of provisioning used by the compute offering. Valid values are 'thin', 'sparse' and 'fat'."
49+
required: false
50+
validation: { $valid_values: [ $value, [ thin, sparse, fat ] ] }
51+
cache-mode:
52+
type: string
53+
description: "The cache mode used by the compute offering. Valid values are 'none', 'writethrough', 'writeback' and 'hypervisor default'."
54+
required: false
55+
validation: { $valid_values: [ $value, [ none, writethrough, writeback, hypervisor default ] ] }
56+
encrypt-root:
57+
type: boolean
58+
description: VMs using this compute offering require root volume encryption.
59+
required: false
60+
root-disk-size:
61+
type: integer
62+
description: The root disk size of the compute offering in GB.
63+
required: false
64+
disk-offering-strictness:
65+
type: boolean
66+
description: Indicates whether the compute offering is strictly associated with the compute offering.
67+
required: false
68+
disk-offering-id:
69+
type: string
70+
description: The ID of the compute offering.
71+
required: false
72+
deployment-planner:
73+
type: string
74+
description: The deployment planner for the compute offering.
75+
required: false
76+
offer-ha:
77+
type: boolean
78+
description: Whether the compute offering offers HA.
79+
required: false
80+
network-rate:
81+
type: integer
82+
description: The network rate of the compute offering in Mbps.
83+
required: false
84+
dynamic-scaling-enabled:
85+
type: boolean
86+
description: Whether the compute offering supports dynamic scaling.
87+
required: false
88+
min-memory:
89+
type: integer
90+
description: The minimum memory for the compute offering in MB.
91+
required: false
92+
max-memory:
93+
type: integer
94+
description: The maximum memory for the compute offering in MB.
95+
required: false
96+
memory:
97+
type: integer
98+
description: The memory for the compute offering in MB.
99+
required: false
100+
cpu-speed:
101+
type: integer
102+
description: The CPU speed for the compute offering in MHz.
103+
required: false
104+
cpu-number:
105+
type: integer
106+
description: The number of vCPUs for the compute offering.
107+
required: false
108+
min-cpu-number:
109+
type: integer
110+
description: The minimum number of vCPUs for the compute offering.
111+
required: false
112+
max-cpu-number:
113+
type: integer
114+
description: The maximum number of vCPUs for the compute offering.
115+
required: false
116+
limit-cpu-use:
117+
type: boolean
118+
description: Whether CPU limitation will be applied for VMs created from this compute offering.
119+
required: false
120+
volatile:
121+
type: boolean
122+
description: >
123+
True if the VM needs to be volatile, so that on every reboot of the VM, its original root disk is detached
124+
and destroyed, and a new root disk is created and attached.
125+
required: false
126+
host-tags:
127+
type: list
128+
entry_schema:
129+
type: string
130+
description: The host tags of the compute offering.
131+
required: false
132+
customized-iops:
133+
type: boolean
134+
description: Whether the compute offering IOPS is custom or not.
135+
required: false
136+
min-iops:
137+
type: integer
138+
description: The minimum IOPS for the compute offering.
139+
required: false
140+
max-iops:
141+
type: integer
142+
description: The maximum IOPS for the compute offering.
143+
required: false
144+
iops-read-rate:
145+
type: integer
146+
description: The IO requests read rate of the compute offering.
147+
required: false
148+
iops-read-rate-max:
149+
type: integer
150+
description: Burst requests read rate of the compute offering.
151+
required: false
152+
iops-read-rate-max-length:
153+
type: integer
154+
description: Burst requests read rate length (in seconds) of the compute offering.
155+
required: false
156+
iops-write-rate:
157+
type: integer
158+
description: The IO requests write rate of the compute offering.
159+
required: false
160+
iops-write-rate-max:
161+
type: integer
162+
description: Burst IO requests write rate of the compute offering.
163+
required: false
164+
iops-write-rate-max-length:
165+
type: integer
166+
description: Burst requests write rate length (in seconds) of the compute offering.
167+
required: false
168+
bytes-write-rate:
169+
type: integer
170+
description: The bytes write rate for the compute offering.
171+
required: false
172+
bytes-write-rate-max:
173+
type: integer
174+
description: Burst bytes write rate for the compute offering.
175+
required: false
176+
bytes-write-rate-max-length:
177+
type: integer
178+
description: Burst bytes write rate length (in seconds) for the compute offering.
179+
required: false
180+
bytes-read-rate:
181+
type: integer
182+
description: The bytes read rate for the compute offering.
183+
required: false
184+
bytes-read-rate-max:
185+
type: integer
186+
description: Burst bytes read rate for the compute offering.
187+
required: false
188+
bytes-read-rate-max-length:
189+
type: integer
190+
description: Burst bytes read rate length (in seconds) for the compute offering.
191+
required: false
192+
attributes:
193+
id:
194+
type: string
195+
description: The ID of the compute offering.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
tosca_definitions_version: tosca_2_0
18+
19+
description: >
20+
DiskOffering node type definition.
21+
22+
node_types:
23+
DiskOffering:
24+
properties:
25+
name:
26+
type: string
27+
description: Name of the disk offering.
28+
required: true
29+
display-text:
30+
type: string
31+
description: Display text of the disk offering.
32+
required: false
33+
zone-id:
34+
type: string
35+
description: The ID of the availability zone. If not specified, the disk offering will be public.
36+
required: false
37+
domain-id:
38+
type: string
39+
description: The ID of the domain for which the disk offering will be available. If not specified, the disk offering will be public.
40+
required: false
41+
storage-type:
42+
type: string
43+
description: "The type of storage used by the disk offering. Valid values are 'local' and 'shared'."
44+
required: false
45+
validation: { $valid_values: [ $value, [ local, shared ] ] }
46+
provisioning-type:
47+
type: string
48+
description: "The type of provisioning used by the disk offering. Valid values are 'thin', 'sparse' and 'fat'."
49+
required: false
50+
validation: { $valid_values: [ $value, [ thin, sparse, fat ] ] }
51+
cache-mode:
52+
type: string
53+
description: "The cache mode used by the disk offering. Valid values are 'none', 'writethrough', 'writeback' and 'hypervisor default'."
54+
required: false
55+
validation: { $valid_values: [ $value, [ none, writethrough, writeback, hypervisor default ] ] }
56+
encrypt:
57+
type: boolean
58+
description: If true, the disk offering will be encrypted.
59+
required: false
60+
disk-size-strictness:
61+
type: boolean
62+
description: Indicates whether the resize operation will be allowed for disks created with this disk offering.
63+
required: false
64+
disk-size:
65+
type: integer
66+
description: The disk size of the disk offering in GB.
67+
required: false
68+
customized:
69+
type: boolean
70+
description: If true, the disk offering is customized, i.e., its size is arbitrarily defined.
71+
required: false
72+
storage-tags:
73+
type: list
74+
entry_schema:
75+
type: string
76+
description: The storage tags of the disk offering.
77+
required: false
78+
customized-iops:
79+
type: boolean
80+
description: Whether the disk offering IOPS is custom or not.
81+
required: false
82+
min-iops:
83+
type: integer
84+
description: The minimum IOPS for the disk offering.
85+
required: false
86+
max-iops:
87+
type: integer
88+
description: The maximum IOPS for the disk offering.
89+
required: false
90+
iops-read-rate:
91+
type: integer
92+
description: The IO requests read rate of the disk offering.
93+
required: false
94+
iops-read-rate-max:
95+
type: integer
96+
description: Burst requests read rate of the disk offering.
97+
required: false
98+
iops-read-rate-max-length:
99+
type: integer
100+
description: Burst requests read rate length (in seconds) of the disk offering.
101+
required: false
102+
iops-write-rate:
103+
type: integer
104+
description: The IO requests write rate of the disk offering.
105+
required: false
106+
iops-write-rate-max:
107+
type: integer
108+
description: Burst IO requests write rate of the disk offering.
109+
required: false
110+
iops-write-rate-max-length:
111+
type: integer
112+
description: Burst requests write rate length (in seconds) of the disk offering.
113+
required: false
114+
bytes-write-rate:
115+
type: integer
116+
description: The bytes write rate for the disk offering.
117+
required: false
118+
bytes-write-rate-max:
119+
type: integer
120+
description: Burst bytes write rate for the disk offering.
121+
required: false
122+
bytes-write-rate-max-length:
123+
type: integer
124+
description: Burst bytes write rate length (in seconds) for the disk offering.
125+
required: false
126+
bytes-read-rate:
127+
type: integer
128+
description: The bytes read rate for the disk offering.
129+
required: false
130+
bytes-read-rate-max:
131+
type: integer
132+
description: Burst bytes read rate for the disk offering.
133+
required: false
134+
bytes-read-rate-max-length:
135+
type: integer
136+
description: Burst bytes read rate length (in seconds) for the disk offering.
137+
required: false
138+
attributes:
139+
id:
140+
type: string
141+
description: The ID of the disk offering.

0 commit comments

Comments
 (0)