Skip to content

feat(rdb): add of private network details #496

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
Apr 19, 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
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .types import ACLRuleProtocol
from .types import DatabaseBackupStatus
from .content import DATABASE_BACKUP_TRANSIENT_STATUSES
from .types import EndpointPrivateNetworkDetailsProvisioningMode
from .types import EngineSettingPropertyType
from .types import InstanceLogStatus
from .content import INSTANCE_LOG_TRANSIENT_STATUSES
Expand Down Expand Up @@ -150,6 +151,7 @@
"ACLRuleProtocol",
"DatabaseBackupStatus",
"DATABASE_BACKUP_TRANSIENT_STATUSES",
"EndpointPrivateNetworkDetailsProvisioningMode",
"EngineSettingPropertyType",
"InstanceLogStatus",
"INSTANCE_LOG_TRANSIENT_STATUSES",
Expand Down
4 changes: 4 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetwork
if field is not None:
args["zone"] = field

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

return EndpointPrivateNetworkDetails(**args)


Expand Down
13 changes: 13 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ def __str__(self) -> str:
return str(self.value)


class EndpointPrivateNetworkDetailsProvisioningMode(str, Enum, metaclass=StrEnumMeta):
STATIC = "static"
IPAM = "ipam"

def __str__(self) -> str:
return str(self.value)


class EngineSettingPropertyType(str, Enum, metaclass=StrEnumMeta):
BOOLEAN = "boolean"
INT = "int"
Expand Down Expand Up @@ -286,6 +294,11 @@ class EndpointPrivateNetworkDetails:
Private network zone.
"""

provisioning_mode: EndpointPrivateNetworkDetailsProvisioningMode
"""
How endpoint ips are provisioned.
"""


@dataclass
class EndpointSpecPrivateNetworkIpamConfig:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/rdb/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .types import ACLRuleProtocol
from .types import DatabaseBackupStatus
from .content import DATABASE_BACKUP_TRANSIENT_STATUSES
from .types import EndpointPrivateNetworkDetailsProvisioningMode
from .types import EngineSettingPropertyType
from .types import InstanceLogStatus
from .content import INSTANCE_LOG_TRANSIENT_STATUSES
Expand Down Expand Up @@ -150,6 +151,7 @@
"ACLRuleProtocol",
"DatabaseBackupStatus",
"DATABASE_BACKUP_TRANSIENT_STATUSES",
"EndpointPrivateNetworkDetailsProvisioningMode",
"EngineSettingPropertyType",
"InstanceLogStatus",
"INSTANCE_LOG_TRANSIENT_STATUSES",
Expand Down
4 changes: 4 additions & 0 deletions scaleway/scaleway/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetwork
if field is not None:
args["zone"] = field

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

return EndpointPrivateNetworkDetails(**args)


Expand Down
13 changes: 13 additions & 0 deletions scaleway/scaleway/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ def __str__(self) -> str:
return str(self.value)


class EndpointPrivateNetworkDetailsProvisioningMode(str, Enum, metaclass=StrEnumMeta):
STATIC = "static"
IPAM = "ipam"

def __str__(self) -> str:
return str(self.value)


class EngineSettingPropertyType(str, Enum, metaclass=StrEnumMeta):
BOOLEAN = "boolean"
INT = "int"
Expand Down Expand Up @@ -286,6 +294,11 @@ class EndpointPrivateNetworkDetails:
Private network zone.
"""

provisioning_mode: EndpointPrivateNetworkDetailsProvisioningMode
"""
How endpoint ips are provisioned.
"""


@dataclass
class EndpointSpecPrivateNetworkIpamConfig:
Expand Down