Skip to content

Commit 29b4863

Browse files
add AutoScalingVmGroup and AutoScalingPolicy
1 parent 519e589 commit 29b4863

5 files changed

Lines changed: 175 additions & 17 deletions

File tree

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

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

3-
20 / 31
3+
24 / 31
44

55
- [X] Domain
66
- [X] Account
@@ -14,8 +14,8 @@
1414
- [X] SshKeyPair
1515
- [X] UserData
1616
- [X] AffinityGroup
17-
- [ ] Volume AQUI
18-
- [ ] VolumeAttachment AQUI
17+
- [X] Volume
18+
- [X] VolumeAttachment
1919
- [X] Network
2020
- [X] Vpc
2121
- [X] IpAddress
@@ -29,7 +29,7 @@
2929
- [X] StaticNat
3030
- [ ] KubernetesCluster PARTIAL - VER COMO LIDAR COM MAPAS
3131
- [ ] VirtualMachine MAPAS
32-
- [ ] AutoScalingGroup AQUI
33-
- [ ] AutoScalingPolicy AQUI
34-
- [ ] AutoScalingVmProfile AQUI
32+
- [X] AutoScalingVmGroup
33+
- [X] AutoScalingPolicy
34+
- [ ] AutoScalingVmProfile MAPAS
3535
- [ ] SharedFileSystem AQUI
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
AutoScalingPolicy node type definition.
21+
22+
node_types:
23+
AutoScalingPolicy:
24+
properties:
25+
name:
26+
type: string
27+
description: The name of the auto scaling policy.
28+
required: false
29+
action:
30+
type: string
31+
description: >
32+
The action to be executed if all conditions are met for the specified duration.
33+
Valid values are: 'scaleup' and 'scaledown'.
34+
validation: { $valid_values: [ $value, [ scaleup, scaledown ] ] }
35+
required: true
36+
condition-ids:
37+
type: list
38+
entry_schema:
39+
type: string
40+
description: The list of condition IDs that are evaluated on every interval.
41+
required: true
42+
duration:
43+
type: integer
44+
description: The duration in which the conditions must be met before the action is executed.
45+
required: true
46+
quiet-time:
47+
type: integer
48+
description: The cooldown period in which the policy should not be evaluated after the action has been taken.
49+
required: false
50+
attributes:
51+
id:
52+
type: string
53+
description: ID of the auto scaling policy.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
AutoScalingVmGroup node type definition.
21+
22+
node_types:
23+
AutoScalingVmGroup:
24+
properties:
25+
name:
26+
type: string
27+
description: The name of the auto scaling VM group.
28+
required: false
29+
vm-profile-id:
30+
type: string
31+
description: The auto scaling profile that contains information about the VMs in the VM group.
32+
required: true
33+
scale-up-policy-ids:
34+
type: list
35+
entry_schema:
36+
type: string
37+
description: List of scale up auto scaling policies.
38+
required: true
39+
scale-down-policy-ids:
40+
type: list
41+
entry_schema:
42+
type: string
43+
description: List of scale down auto scaling policies.
44+
required: true
45+
min-members:
46+
type: integer
47+
description: The minimum number of VMs in the VM group.
48+
required: true
49+
max-members:
50+
type: integer
51+
description: The maximum number of VMs in the VM group.
52+
required: true
53+
load-balancer-id:
54+
type: string
55+
description: The ID of the load balancer that is associated with the VM group.
56+
required: true
57+
interval:
58+
type: integer
59+
description: The interval in which the performance counters will be collected.
60+
required: false
61+
attributes:
62+
id:
63+
type: string
64+
description: ID of the auto scaling VM group.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
VolumeAttachment node type definition.
21+
22+
node_types:
23+
VolumeAttachment:
24+
properties:
25+
volume-id:
26+
type: string
27+
description: The ID of the volume to be attached.
28+
required: true
29+
virtual-machine-id:
30+
type: string
31+
description: The ID of the VM to which the volume will be attached.
32+
required: true
33+
device-id:
34+
type: string
35+
description: The ID of the device to map the volume to the guest operating system.
36+
required: false

engine/schema/src/main/resources/nimble/resource-types/volume.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ description: >
2222
node_types:
2323
Volume:
2424
properties:
25+
name:
26+
type: string
27+
description: The name for the volume.
28+
required: true
2529
zone-id:
2630
type: string
2731
description: The ID of the zone in which the volume will be created.
@@ -30,14 +34,18 @@ node_types:
3034
type: string
3135
description: The ID of the disk offering for the volume.
3236
required: false
33-
snapshot-id:
34-
type: string
35-
description: The ID of the snapshot to be used to create the volume.
37+
size:
38+
type: integer
39+
description: The size of the volume.
40+
required: false
41+
min-iops:
42+
type: integer
43+
description: The minimum IOPS for the volume.
44+
required: false
45+
max-iops:
46+
type: integer
47+
description: The maximum IOPS for the volume.
3648
required: false
37-
name:
38-
type: string
39-
description: The name for the volume.
40-
required: true
4149
account:
4250
type: string
4351
description: The account name associated with the volume. It must be used with the domain-id property.
@@ -54,9 +62,6 @@ node_types:
5462
id:
5563
type: string
5664
description: ID of the volume.
57-
name:
58-
type: string
59-
description: The name of the volume.
6065
disk-offering-id:
6166
type: string
62-
description: The ID of the disk offering used by the volume.
67+
description: The ID of the disk offering used by the volume.

0 commit comments

Comments
 (0)