Skip to content

feat(instance): deprecate use of NATed IP in instance api documentation #637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scaleway-async/scaleway_async/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3453,7 +3453,7 @@ async def list_ips(
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
:param page: A positive integer to choose the page to return.
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
:return: :class:`ListIpsResponse <ListIpsResponse>`

Usage:
Expand Down Expand Up @@ -3503,7 +3503,7 @@ async def list_ips_all(
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
:param page: A positive integer to choose the page to return.
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
:return: :class:`List[Ip] <List[Ip]>`

Usage:
Expand Down Expand Up @@ -3548,7 +3548,7 @@ async def create_ip(
One-Of ('project_identifier'): at most one of 'project', 'organization' could be set.
:param tags: Tags of the IP.
:param server: UUID of the Instance you want to attach the IP to.
:param type_: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
:return: :class:`CreateIpResponse <CreateIpResponse>`

Usage:
Expand Down
10 changes: 6 additions & 4 deletions scaleway-async/scaleway_async/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,6 @@ def unmarshal_Server(data: Any) -> Server:
if field is not None:
args["dynamic_ip_required"] = field

field = data.get("routed_ip_enabled", None)
if field is not None:
args["routed_ip_enabled"] = field

field = data.get("hostname", None)
if field is not None:
args["hostname"] = field
Expand All @@ -777,6 +773,12 @@ def unmarshal_Server(data: Any) -> Server:
if field is not None:
args["protected"] = field

field = data.get("routed_ip_enabled", None)
if field is not None:
args["routed_ip_enabled"] = field
else:
args["routed_ip_enabled"] = None

field = data.get("enable_ipv6", None)
if field is not None:
args["enable_ipv6"] = field
Expand Down
14 changes: 7 additions & 7 deletions scaleway-async/scaleway_async/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,6 @@ class Server:
True if a dynamic IPv4 is required.
"""

routed_ip_enabled: bool
"""
True to configure the instance so it uses the new routed IP mode.
"""

hostname: str
"""
Instance host name.
Expand All @@ -852,6 +847,11 @@ class Server:
Defines whether the Instance protection option is activated.
"""

routed_ip_enabled: Optional[bool]
"""
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated.
"""

enable_ipv6: Optional[bool]
"""
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
Expand Down Expand Up @@ -1606,7 +1606,7 @@ class CreateIpRequest:

type_: Optional[IpType]
"""
IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
"""

project: Optional[str]
Expand Down Expand Up @@ -2524,7 +2524,7 @@ class ListIpsRequest:

type_: Optional[str]
"""
Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
"""


Expand Down
6 changes: 3 additions & 3 deletions scaleway/scaleway/instance/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3453,7 +3453,7 @@ def list_ips(
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
:param page: A positive integer to choose the page to return.
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
:return: :class:`ListIpsResponse <ListIpsResponse>`

Usage:
Expand Down Expand Up @@ -3503,7 +3503,7 @@ def list_ips_all(
:param name: Filter on the IP address (Works as a LIKE operation on the IP address).
:param per_page: A positive integer lower or equal to 100 to select the number of items to return.
:param page: A positive integer to choose the page to return.
:param type_: Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
:return: :class:`List[Ip] <List[Ip]>`

Usage:
Expand Down Expand Up @@ -3548,7 +3548,7 @@ def create_ip(
One-Of ('project_identifier'): at most one of 'project', 'organization' could be set.
:param tags: Tags of the IP.
:param server: UUID of the Instance you want to attach the IP to.
:param type_: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
:param type_: IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
:return: :class:`CreateIpResponse <CreateIpResponse>`

Usage:
Expand Down
10 changes: 6 additions & 4 deletions scaleway/scaleway/instance/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,6 @@ def unmarshal_Server(data: Any) -> Server:
if field is not None:
args["dynamic_ip_required"] = field

field = data.get("routed_ip_enabled", None)
if field is not None:
args["routed_ip_enabled"] = field

field = data.get("hostname", None)
if field is not None:
args["hostname"] = field
Expand All @@ -777,6 +773,12 @@ def unmarshal_Server(data: Any) -> Server:
if field is not None:
args["protected"] = field

field = data.get("routed_ip_enabled", None)
if field is not None:
args["routed_ip_enabled"] = field
else:
args["routed_ip_enabled"] = None

field = data.get("enable_ipv6", None)
if field is not None:
args["enable_ipv6"] = field
Expand Down
14 changes: 7 additions & 7 deletions scaleway/scaleway/instance/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,6 @@ class Server:
True if a dynamic IPv4 is required.
"""

routed_ip_enabled: bool
"""
True to configure the instance so it uses the new routed IP mode.
"""

hostname: str
"""
Instance host name.
Expand All @@ -852,6 +847,11 @@ class Server:
Defines whether the Instance protection option is activated.
"""

routed_ip_enabled: Optional[bool]
"""
True to configure the instance so it uses the routed IP mode. Use of `routed_ip_enabled` as `False` is deprecated.
"""

enable_ipv6: Optional[bool]
"""
True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
Expand Down Expand Up @@ -1606,7 +1606,7 @@ class CreateIpRequest:

type_: Optional[IpType]
"""
IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
IP type to reserve (either 'routed_ipv4' or 'routed_ipv6', use of 'nat' is deprecated).
"""

project: Optional[str]
Expand Down Expand Up @@ -2524,7 +2524,7 @@ class ListIpsRequest:

type_: Optional[str]
"""
Filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4', 'routed_ipv6' or 'nat').
"""


Expand Down