Skip to content

Commit aabcc08

Browse files
authored
Merge branch 'dev' into feature/TPT-4010-python-sdk-add-region-capability-enum
2 parents fe92e9a + f30ac54 commit aabcc08

File tree

11 files changed

+32
-21
lines changed

11 files changed

+32
-21
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@
77
**What are the steps to reproduce the issue or verify the changes?**
88

99
**How do I run the relevant unit/integration tests?**
10-
11-
## 📷 Preview
12-
13-
**If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.**

linode_api4/groups/linode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ def instance_create(
335335
:type network_helper: bool
336336
:param maintenance_policy: The slug of the maintenance policy to apply during maintenance.
337337
If not provided, the default policy (linode/migrate) will be applied.
338-
NOTE: This field is in beta and may only
339-
function if base_url is set to `https://api.linode.com/v4beta`.
340338
:type maintenance_policy: str
341339
342340
:returns: A new Instance object, or a tuple containing the new Instance and

linode_api4/groups/maintenance.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class MaintenanceGroup(Group):
99

1010
def maintenance_policies(self):
1111
"""
12-
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
13-
1412
Returns a collection of MaintenancePolicy objects representing
1513
available maintenance policies that can be applied to Linodes
1614

linode_api4/objects/account.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ class AccountSettings(Base):
218218
"object_storage": Property(),
219219
"backups_enabled": Property(mutable=True),
220220
"interfaces_for_new_linodes": Property(mutable=True),
221-
"maintenance_policy": Property(
222-
mutable=True
223-
), # Note: This field is only available when using v4beta.
221+
"maintenance_policy": Property(mutable=True),
224222
}
225223

226224

@@ -249,7 +247,7 @@ class Event(Base):
249247
"duration": Property(),
250248
"secondary_entity": Property(),
251249
"message": Property(),
252-
"maintenance_policy_set": Property(), # Note: This field is only available when using v4beta.
250+
"maintenance_policy_set": Property(),
253251
"description": Property(),
254252
"source": Property(),
255253
"not_before": Property(is_datetime=True),

linode_api4/objects/linode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,7 @@ class Instance(Base):
800800
"lke_cluster_id": Property(),
801801
"capabilities": Property(unordered=True),
802802
"interface_generation": Property(),
803-
"maintenance_policy": Property(
804-
mutable=True
805-
), # Note: This field is only available when using v4beta.
803+
"maintenance_policy": Property(mutable=True),
806804
"locks": Property(unordered=True),
807805
}
808806

linode_api4/objects/nodebalancer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class NodeBalancer(Base):
252252
"transfer": Property(),
253253
"tags": Property(mutable=True, unordered=True),
254254
"client_udp_sess_throttle": Property(mutable=True),
255+
"locks": Property(unordered=True),
255256
}
256257

257258
# create derived objects

test/fixtures/nodebalancers.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"updated": "2018-01-01T00:01:01",
1111
"label": "balancer123456",
1212
"client_conn_throttle": 0,
13-
"tags": ["something"]
13+
"tags": ["something"],
14+
"locks": ["cannot_delete_with_subresources"]
1415
},
1516
{
1617
"created": "2018-01-01T00:01:01",
@@ -22,7 +23,8 @@
2223
"updated": "2018-01-01T00:01:01",
2324
"label": "balancer123457",
2425
"client_conn_throttle": 0,
25-
"tags": []
26+
"tags": [],
27+
"locks": []
2628
}
2729
],
2830
"results": 2,

test/fixtures/nodebalancers_123456.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"client_conn_throttle": 0,
1111
"tags": [
1212
"something"
13+
],
14+
"locks": [
15+
"cannot_delete_with_subresources"
1316
]
1417
}

test/integration/linode_client/test_linode_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ def test_cluster_create_with_api_objects(test_linode_client):
328328
node_type = client.linode.types()[1] # g6-standard-1
329329
version = client.lke.versions()[0]
330330
region = get_region(client, {"Kubernetes"})
331-
node_pools = client.lke.node_pool(node_type, 3)
331+
node_pool = client.lke.node_pool(node_type, 3)
332332
label = get_test_label()
333333

334-
cluster = client.lke.cluster_create(region, label, node_pools, version)
334+
cluster = client.lke.cluster_create(region, label, version, [node_pool])
335335

336336
assert cluster.region.id == region.id
337337
assert cluster.k8s_version.id == version.id

test/integration/models/linode/test_linode.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,7 @@ def test_delete_interface_containing_vpc(
11011101

11021102
def test_create_linode_with_maintenance_policy(test_linode_client):
11031103
client = test_linode_client
1104-
# TODO: Replace with random region after GA
1105-
region = "ap-south"
1104+
region = get_region(client, {"Linodes", "Cloud Firewall"}, site_type="core")
11061105
label = get_test_label()
11071106

11081107
policies = client.maintenance.maintenance_policies()

0 commit comments

Comments
 (0)