Skip to content

Commit 6221ce8

Browse files
authored
feat(instance): expose ipam_id for ServerIp and Ip (#401)
1 parent 94b3787 commit 6221ce8

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

scaleway-async/scaleway_async/instance/v1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ def unmarshal_ServerIp(data: Any) -> ServerIp:
507507
field = data.get("id", None)
508508
args["id"] = field
509509

510+
field = data.get("ipam_id", None)
511+
args["ipam_id"] = field
512+
510513
field = data.get("netmask", None)
511514
args["netmask"] = field
512515

@@ -828,6 +831,9 @@ def unmarshal_Ip(data: Any) -> Ip:
828831
field = data.get("id", None)
829832
args["id"] = field
830833

834+
field = data.get("ipam_id", None)
835+
args["ipam_id"] = field
836+
831837
field = data.get("organization", None)
832838
args["organization"] = field
833839

@@ -2526,6 +2532,9 @@ def marshal_ServerIp(
25262532
if request.id is not None:
25272533
output["id"] = request.id
25282534

2535+
if request.ipam_id is not None:
2536+
output["ipam_id"] = request.ipam_id
2537+
25292538
if request.netmask is not None:
25302539
output["netmask"] = request.netmask
25312540

scaleway-async/scaleway_async/instance/v1/types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ class Ip:
605605

606606
prefix: str
607607

608+
ipam_id: str
609+
608610
zone: Zone
609611

610612

@@ -1310,6 +1312,11 @@ class ServerIp:
13101312

13111313
state: ServerIpState
13121314

1315+
ipam_id: str
1316+
"""
1317+
The ip_id of an IPAM ip if the ip is created from IPAM, null if not.
1318+
"""
1319+
13131320

13141321
@dataclass
13151322
class ServerIpv6:

scaleway/scaleway/instance/v1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ def unmarshal_ServerIp(data: Any) -> ServerIp:
507507
field = data.get("id", None)
508508
args["id"] = field
509509

510+
field = data.get("ipam_id", None)
511+
args["ipam_id"] = field
512+
510513
field = data.get("netmask", None)
511514
args["netmask"] = field
512515

@@ -828,6 +831,9 @@ def unmarshal_Ip(data: Any) -> Ip:
828831
field = data.get("id", None)
829832
args["id"] = field
830833

834+
field = data.get("ipam_id", None)
835+
args["ipam_id"] = field
836+
831837
field = data.get("organization", None)
832838
args["organization"] = field
833839

@@ -2526,6 +2532,9 @@ def marshal_ServerIp(
25262532
if request.id is not None:
25272533
output["id"] = request.id
25282534

2535+
if request.ipam_id is not None:
2536+
output["ipam_id"] = request.ipam_id
2537+
25292538
if request.netmask is not None:
25302539
output["netmask"] = request.netmask
25312540

scaleway/scaleway/instance/v1/types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ class Ip:
605605

606606
prefix: str
607607

608+
ipam_id: str
609+
608610
zone: Zone
609611

610612

@@ -1308,6 +1310,11 @@ class ServerIp:
13081310
Tags associated with the IP.
13091311
"""
13101312

1313+
ipam_id: str
1314+
"""
1315+
The ip_id of an IPAM ip if the ip is created from IPAM, null if not.
1316+
"""
1317+
13111318
state: ServerIpState
13121319

13131320

0 commit comments

Comments
 (0)