Skip to content

Commit 32940eb

Browse files
add vpcoffering loadbalancerattachment and kubernetescluster
1 parent a2d1eb2 commit 32940eb

4 files changed

Lines changed: 163 additions & 6 deletions

File tree

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

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

3-
25 / 31
3+
28 / 31
44

55
- [X] Domain
66
- [X] Account
@@ -9,7 +9,7 @@
99
- [X] ComputeOffering
1010
- [X] DiskOffering
1111
- [ ] NetworkOffering MAPAS
12-
- [ ] VpcOffering MAPAS
12+
- [X] VpcOffering
1313
- [X] InstanceGroup
1414
- [X] SshKeyPair
1515
- [X] UserData
@@ -22,12 +22,12 @@
2222
- [X] EgressFirewallRule
2323
- [X] FirewallRule
2424
- [X] LoadBalancer
25-
- [ ] LoadBalancerVirtualMachineAssigner MAPAS
25+
- [X] LoadBalancerAttachment
2626
- [X] PortForwardingRule
2727
- [X] NetworkAclList
2828
- [X] NetworkAclRule
2929
- [X] StaticNat
30-
- [ ] KubernetesCluster PARTIAL - VER COMO LIDAR COM MAPAS
30+
- [X] KubernetesCluster
3131
- [ ] VirtualMachine MAPAS
3232
- [X] AutoScalingVmGroup
3333
- [X] AutoScalingPolicy

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

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ tosca_definitions_version: tosca_2_0
1919
description: >
2020
KubernetesCluster node type definition.
2121
22+
data_types:
23+
NodeOffering:
24+
properties:
25+
node:
26+
type: string
27+
description: "Node type (e.g. 'control', 'worker') for which the offering will be applied."
28+
offering:
29+
type: string
30+
description: ID of the service offering to be used for this node type.
31+
NodeTemplate:
32+
properties:
33+
node:
34+
type: string
35+
description: "Node type (e.g. 'control', 'worker') for which the template will be used."
36+
template:
37+
type: string
38+
description: ID of the template to be used for this node type.
39+
2240
node_types:
2341
KubernetesCluster:
2442
properties:
@@ -78,7 +96,7 @@ node_types:
7896
type: string
7997
description: Kubernetes cluster type (CloudManaged or ExternalManaged).
8098
required: false
81-
validation: { $valid_values: [ $value, [CloudManaged, ExternalManaged] ] }
99+
validation: { $valid_values: [ $value, [ CloudManaged, ExternalManaged ] ] }
82100
docker-registry-password:
83101
type: string
84102
description: Password for the Docker image private registry.
@@ -103,7 +121,18 @@ node_types:
103121
type: integer
104122
description: Number of etcd nodes in the cluster.
105123
required: false
106-
# node templates, nodeofferings
124+
node-offerings:
125+
type: list
126+
entry_schema:
127+
type: NodeOffering
128+
description: "Compute offerings for each node type. If used, overrides the 'service-offering-id' property."
129+
required: false
130+
node-templates:
131+
type: list
132+
entry_schema:
133+
type: NodeTemplate
134+
description: Templates for each node type. If not specified, the system VM templates will be used.
135+
required: false
107136
attributes:
108137
id:
109138
type: string
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
LoadBalancerAttachment node type definition.
21+
22+
data_types:
23+
VirtualMachineIpMapping:
24+
properties:
25+
virtual-machine-id:
26+
type: string
27+
description: The ID of the virtual machine.
28+
ip:
29+
type: string
30+
description: The internal IP address of the virtual machine.
31+
32+
node_types:
33+
LoadBalancerAttachment:
34+
properties:
35+
load-balancer-id:
36+
type: string
37+
description: The ID of the load balancer.
38+
required: true
39+
virtual-machine-ids:
40+
type: list
41+
entry_schema:
42+
type: string
43+
description: The list of IDs of the virtual machines to attach to the load balancer.
44+
required: true
45+
virtual-machine-ip-map:
46+
type: list
47+
entry_schema:
48+
type: VirtualMachineIpMapping
49+
description: The mapping between virtual machine IDs and their internal IP addresses.
50+
required: true
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
VpcOffering node type definition.
21+
22+
data_types:
23+
NetworkServiceProviderMapping:
24+
properties:
25+
service:
26+
type: string
27+
description: The network service.
28+
provider:
29+
type: string
30+
description: The network service provider.
31+
32+
node_types:
33+
VpcOffering:
34+
properties:
35+
name:
36+
type: string
37+
description: Name of the VPC offering.
38+
required: true
39+
display-text:
40+
type: string
41+
description: Display text of the VPC offering.
42+
required: false
43+
zone-id:
44+
type: string
45+
description: The ID of the availability zone. If not specified, the VPC offering will be public.
46+
required: false
47+
domain-id:
48+
type: string
49+
description: The ID of the domain for which the VPC offering will be available. If not specified, the compute offering will be public.
50+
required: false
51+
enable:
52+
type: boolean
53+
description: Whether the VPC offering will be enabled during creation.
54+
required: false
55+
internet-protocol:
56+
type: list
57+
description: "The internet protocol of the offering. Valid values are 'ipv4' and 'dualstack'."
58+
required: false
59+
supported-services:
60+
type: list
61+
entry_schema:
62+
type: string
63+
description: The network services supported by the offering.
64+
required: false
65+
service-provider-map:
66+
type: list
67+
entry_schema:
68+
type: NetworkServiceProviderMapping
69+
description: The network services mapped to their providers.
70+
required: false
71+
service-offering-id:
72+
type: string
73+
description: The ID of the network service offering for the VPC router.
74+
required: false
75+
attributes:
76+
id:
77+
type: string
78+
description: The ID of the VPC offering.

0 commit comments

Comments
 (0)