Skip to content

Commit df66b11

Browse files
authored
Merge pull request #84 from TomaAlexandru/SDK-155
Sdk 155
2 parents 9ed3f61 + a90efaa commit df66b11

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Python SDK
33

4-
Version: ionosenterprise-sdk-python **5.3.0**
4+
Version: ionosenterprise-sdk-python **5.4.0**
55

66
## Table of Contents
77

@@ -2376,7 +2376,8 @@ The following table describes the request arguments:
23762376
| auto_scaling | no | object | The minimum number of worker nodes that the managed node group can scale in. |
23772377
| lan_ids | no | List of ints | Array of additional LANs attached to worker nodes |
23782378
| labels | no | dict | Map of labels attached to node pool |
2379-
| annotations | dict | int | Map of annotations attached to node pool |
2379+
| annotations | no | dict | Map of annotations attached to node pool |
2380+
| public_ips | no | list | List of IP addresses to be used by nodes |
23802381

23812382
Method signature:
23822383

@@ -2484,6 +2485,7 @@ The following table describes the request arguments:
24842485
| maintenance_window | no | dict | The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss"Z"; HH:mm:ssZ. This time may varies by 15 minutes. |
24852486
| auto_scaling | no | dict | The minimum number of worker nodes that the managed node group can scale in. |
24862487
| lan_ids | no | List of ints | Array of additional LANs attached to worker nodes |
2488+
| public_ips | no | list | List of IP addresses to be used by nodes |
24872489

24882490
Method signature:
24892491

ionosenterprise/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
"""Ionos Enterprise API Client Library for Python"""
16-
__version__ = '5.3.0'
16+
__version__ = '5.4.0'
1717

1818
API_HOST = 'https://api.ionos.com/cloudapi/v5'
1919
API_VERSION = '5.0'

ionosenterprise/requests/k8s_nodepools.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def delete_k8s_cluster_nodepool(self, k8s_cluster_id, nodepool_id):
4343

4444
def update_k8s_cluster_nodepool(self,
4545
k8s_cluster_id, nodepool_id, node_count,
46-
maintenance_window=None, auto_scaling=None, lan_ids=None):
46+
maintenance_window=None, auto_scaling=None, lan_ids=None, public_ips=None):
47+
4748
"""
4849
This will modify the Kubernetes Node Pool.
4950
@@ -86,6 +87,12 @@ def update_k8s_cluster_nodepool(self,
8687
:param lan_ids: array of additional LANs attached to worker nodes
8788
:type lan_ids: ``list of ints``
8889
90+
:param public_ips: Optional array of reserved public IP addresses to be used by the nodes.
91+
IPs must be from same location as the data center used for the node pool.
92+
The array must contain one extra IP than maximum number of nodes could be.
93+
(nodeCount+1 if fixed node amount or maxNodeCount+1 if auto scaling is used).
94+
The extra provided IP Will be used during rebuilding of nodes.
95+
:type public_ips: ``list``
8996
"""
9097

9198
# mandatory fields
@@ -100,6 +107,8 @@ def update_k8s_cluster_nodepool(self,
100107
properties['autoScaling'] = auto_scaling
101108
if lan_ids is not None:
102109
properties['lans'] = [{'id': int(lan_id)} for lan_id in lan_ids]
110+
if public_ips is not None:
111+
properties['publicIps'] = public_ips
103112

104113
data = {
105114
'properties': properties
@@ -139,7 +148,7 @@ def create_k8s_cluster_nodepool(self,
139148
availability_zone,
140149
storage_type, storage_size,
141150
k8s_version=None, maintenance_window=None, auto_scaling=None,
142-
lan_ids=None, labels=None, annotations=None):
151+
lan_ids=None, labels=None, annotations=None, public_ips=None):
143152
"""
144153
This will create a new Kubernetes Node Pool inside a Kubernetes Cluster.
145154
@@ -221,6 +230,12 @@ def create_k8s_cluster_nodepool(self,
221230
222231
:param annotations: map of annotations attached to node pool
223232
:type annotations: ``dict``
233+
:param public_ips: Optional array of reserved public IP addresses to be used by the nodes.
234+
IPs must be from same location as the data center used for the node pool.
235+
The array must contain one extra IP than maximum number of nodes could be.
236+
(nodeCount+1 if fixed node amount or maxNodeCount+1 if auto scaling is used).
237+
The extra provided IP Will be used during rebuilding of nodes.
238+
:type public_ips: ``list``
224239
"""
225240

226241
# mandatory fields
@@ -249,6 +264,8 @@ def create_k8s_cluster_nodepool(self,
249264
properties['labels'] = labels
250265
if annotations is not None:
251266
properties['annotations'] = annotations
267+
if public_ips is not None:
268+
properties['publicIps'] = public_ips
252269

253270
data = {
254271
'properties': properties

0 commit comments

Comments
 (0)