Skip to content

Commit be21c2d

Browse files
authored
feat(instance): deprecate use of NATed IP in instance api documentation (scaleway#637)
1 parent 7b09c81 commit be21c2d

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ async def list_ips(
34533453
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
34543454
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
34553455
:param page: A positive integer to choose the page to return.
3456-
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
3456+
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
34573457
:return: :class:`ListIpsResponse <ListIpsResponse>`
34583458
34593459
Usage:
@@ -3503,7 +3503,7 @@ async def list_ips_all(
35033503
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
35043504
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
35053505
:param page: A positive integer to choose the page to return.
3506-
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
3506+
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
35073507
:return: :class:`List[Ip] <List[Ip]>`
35083508
35093509
Usage:
@@ -3548,7 +3548,7 @@ async def create_ip(
35483548
One-Of ('project_identifier'): at most one of 'project', 'organization' could be set.
35493549
:param tags: Tags of the IP.
35503550
:param server: UUID of the Instance you want to attach the IP to.
3551-
:param type_: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
3551+
:param type_: IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
35523552
:return: :class:`CreateIpResponse <CreateIpResponse>`
35533553
35543554
Usage:

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,6 @@ def unmarshal_Server(data: Any) -> Server:
765765
if field is not None:
766766
args["dynamic_ip_required"] = field
767767

768-
field = data.get("routed_ip_enabled", None)
769-
if field is not None:
770-
args["routed_ip_enabled"] = field
771-
772768
field = data.get("hostname", None)
773769
if field is not None:
774770
args["hostname"] = field
@@ -777,6 +773,12 @@ def unmarshal_Server(data: Any) -> Server:
777773
if field is not None:
778774
args["protected"] = field
779775

776+
field = data.get("routed_ip_enabled", None)
777+
if field is not None:
778+
args["routed_ip_enabled"] = field
779+
else:
780+
args["routed_ip_enabled"] = None
781+
780782
field = data.get("enable_ipv6", None)
781783
if field is not None:
782784
args["enable_ipv6"] = field

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -837,11 +837,6 @@ class Server:
837837
True if a dynamic IPv4 is required.
838838
"""
839839

840-
routed_ip_enabled: bool
841-
"""
842-
True to configure the instance so it uses the new routed IP mode.
843-
"""
844-
845840
hostname: str
846841
"""
847842
Instance host name.
@@ -852,6 +847,11 @@ class Server:
852847
Defines whether the Instance protection option is activated.
853848
"""
854849

850+
routed_ip_enabled: Optional[bool]
851+
"""
852+
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated.
853+
"""
854+
855855
enable_ipv6: Optional[bool]
856856
"""
857857
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
@@ -1606,7 +1606,7 @@ class CreateIpRequest:
16061606

16071607
type_: Optional[IpType]
16081608
"""
1609-
IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
1609+
IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
16101610
"""
16111611

16121612
project: Optional[str]
@@ -2524,7 +2524,7 @@ class ListIpsRequest:
25242524

25252525
type_: Optional[str]
25262526
"""
2527-
Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
2527+
Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
25282528
"""
25292529

25302530

scaleway/scaleway/instance/v1/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,7 +3453,7 @@ def list_ips(
34533453
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
34543454
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
34553455
:param page: A positive integer to choose the page to return.
3456-
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
3456+
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
34573457
:return: :class:`ListIpsResponse <ListIpsResponse>`
34583458
34593459
Usage:
@@ -3503,7 +3503,7 @@ def list_ips_all(
35033503
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
35043504
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
35053505
:param page: A positive integer to choose the page to return.
3506-
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
3506+
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
35073507
:return: :class:`List[Ip] <List[Ip]>`
35083508
35093509
Usage:
@@ -3548,7 +3548,7 @@ def create_ip(
35483548
One-Of ('project_identifier'): at most one of 'project', 'organization' could be set.
35493549
:param tags: Tags of the IP.
35503550
:param server: UUID of the Instance you want to attach the IP to.
3551-
:param type_: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
3551+
:param type_: IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
35523552
:return: :class:`CreateIpResponse <CreateIpResponse>`
35533553
35543554
Usage:

scaleway/scaleway/instance/v1/marshalling.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,6 @@ def unmarshal_Server(data: Any) -> Server:
765765
if field is not None:
766766
args["dynamic_ip_required"] = field
767767

768-
field = data.get("routed_ip_enabled", None)
769-
if field is not None:
770-
args["routed_ip_enabled"] = field
771-
772768
field = data.get("hostname", None)
773769
if field is not None:
774770
args["hostname"] = field
@@ -777,6 +773,12 @@ def unmarshal_Server(data: Any) -> Server:
777773
if field is not None:
778774
args["protected"] = field
779775

776+
field = data.get("routed_ip_enabled", None)
777+
if field is not None:
778+
args["routed_ip_enabled"] = field
779+
else:
780+
args["routed_ip_enabled"] = None
781+
780782
field = data.get("enable_ipv6", None)
781783
if field is not None:
782784
args["enable_ipv6"] = field

scaleway/scaleway/instance/v1/types.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -837,11 +837,6 @@ class Server:
837837
True if a dynamic IPv4 is required.
838838
"""
839839

840-
routed_ip_enabled: bool
841-
"""
842-
True to configure the instance so it uses the new routed IP mode.
843-
"""
844-
845840
hostname: str
846841
"""
847842
Instance host name.
@@ -852,6 +847,11 @@ class Server:
852847
Defines whether the Instance protection option is activated.
853848
"""
854849

850+
routed_ip_enabled: Optional[bool]
851+
"""
852+
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated.
853+
"""
854+
855855
enable_ipv6: Optional[bool]
856856
"""
857857
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
@@ -1606,7 +1606,7 @@ class CreateIpRequest:
16061606

16071607
type_: Optional[IpType]
16081608
"""
1609-
IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
1609+
IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
16101610
"""
16111611

16121612
project: Optional[str]
@@ -2524,7 +2524,7 @@ class ListIpsRequest:
25242524

25252525
type_: Optional[str]
25262526
"""
2527-
Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
2527+
Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
25282528
"""
25292529

25302530

0 commit comments

Comments
 (0)