Skip to content

Commit

Permalink
feat(rdb): add of private network details (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Apr 19, 2024
1 parent d08fbab commit 80b3f57
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
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

0 comments on commit 80b3f57

Please sign in to comment.