Skip to content

Commit fd150fa

Browse files
authored
feat(redis): ipam integration (#121)
1 parent ee607d5 commit fd150fa

File tree

6 files changed

+50
-0
lines changed

6 files changed

+50
-0
lines changed

scaleway-async/scaleway_async/redis/v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .types import Endpoint
1818
from .types import EndpointSpec
1919
from .types import EndpointSpecPrivateNetworkSpec
20+
from .types import EndpointSpecPrivateNetworkSpecIpamConfig
2021
from .types import EndpointSpecPublicNetworkSpec
2122
from .types import ListClusterVersionsResponse
2223
from .types import ListClustersResponse
@@ -47,6 +48,7 @@
4748
"Endpoint",
4849
"EndpointSpec",
4950
"EndpointSpecPrivateNetworkSpec",
51+
"EndpointSpecPrivateNetworkSpecIpamConfig",
5052
"EndpointSpecPublicNetworkSpec",
5153
"ListClusterVersionsResponse",
5254
"ListClustersResponse",

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
Endpoint,
2727
EndpointSpec,
2828
EndpointSpecPrivateNetworkSpec,
29+
EndpointSpecPrivateNetworkSpecIpamConfig,
2930
EndpointSpecPublicNetworkSpec,
3031
ListClusterVersionsResponse,
3132
ListClustersResponse,
@@ -449,12 +450,24 @@ def unmarshal_SetEndpointsResponse(data: Any) -> SetEndpointsResponse:
449450
return SetEndpointsResponse(**args)
450451

451452

453+
def marshal_EndpointSpecPrivateNetworkSpecIpamConfig(
454+
request: EndpointSpecPrivateNetworkSpecIpamConfig,
455+
defaults: ProfileDefaults,
456+
) -> Dict[str, Any]:
457+
return {}
458+
459+
452460
def marshal_EndpointSpecPrivateNetworkSpec(
453461
request: EndpointSpecPrivateNetworkSpec,
454462
defaults: ProfileDefaults,
455463
) -> Dict[str, Any]:
456464
return {
457465
"id": request.id,
466+
"ipam_config": marshal_EndpointSpecPrivateNetworkSpecIpamConfig(
467+
request.ipam_config, defaults
468+
)
469+
if request.ipam_config is not None
470+
else None,
458471
"service_ips": request.service_ips,
459472
}
460473

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,16 @@ class EndpointSpecPrivateNetworkSpec:
417417
Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
418418
"""
419419

420+
ipam_config: Optional[EndpointSpecPrivateNetworkSpecIpamConfig]
421+
"""
422+
Automated configuration of your Private Network endpoint with Scaleway IPAM service.
423+
"""
424+
425+
426+
@dataclass
427+
class EndpointSpecPrivateNetworkSpecIpamConfig:
428+
pass
429+
420430

421431
@dataclass
422432
class EndpointSpecPublicNetworkSpec:

scaleway/scaleway/redis/v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .types import Endpoint
1818
from .types import EndpointSpec
1919
from .types import EndpointSpecPrivateNetworkSpec
20+
from .types import EndpointSpecPrivateNetworkSpecIpamConfig
2021
from .types import EndpointSpecPublicNetworkSpec
2122
from .types import ListClusterVersionsResponse
2223
from .types import ListClustersResponse
@@ -47,6 +48,7 @@
4748
"Endpoint",
4849
"EndpointSpec",
4950
"EndpointSpecPrivateNetworkSpec",
51+
"EndpointSpecPrivateNetworkSpecIpamConfig",
5052
"EndpointSpecPublicNetworkSpec",
5153
"ListClusterVersionsResponse",
5254
"ListClustersResponse",

scaleway/scaleway/redis/v1/marshalling.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
Endpoint,
2727
EndpointSpec,
2828
EndpointSpecPrivateNetworkSpec,
29+
EndpointSpecPrivateNetworkSpecIpamConfig,
2930
EndpointSpecPublicNetworkSpec,
3031
ListClusterVersionsResponse,
3132
ListClustersResponse,
@@ -449,12 +450,24 @@ def unmarshal_SetEndpointsResponse(data: Any) -> SetEndpointsResponse:
449450
return SetEndpointsResponse(**args)
450451

451452

453+
def marshal_EndpointSpecPrivateNetworkSpecIpamConfig(
454+
request: EndpointSpecPrivateNetworkSpecIpamConfig,
455+
defaults: ProfileDefaults,
456+
) -> Dict[str, Any]:
457+
return {}
458+
459+
452460
def marshal_EndpointSpecPrivateNetworkSpec(
453461
request: EndpointSpecPrivateNetworkSpec,
454462
defaults: ProfileDefaults,
455463
) -> Dict[str, Any]:
456464
return {
457465
"id": request.id,
466+
"ipam_config": marshal_EndpointSpecPrivateNetworkSpecIpamConfig(
467+
request.ipam_config, defaults
468+
)
469+
if request.ipam_config is not None
470+
else None,
458471
"service_ips": request.service_ips,
459472
}
460473

scaleway/scaleway/redis/v1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,16 @@ class EndpointSpecPrivateNetworkSpec:
417417
Endpoint IPv4 address with a CIDR notation. You must provide at least one IPv4 per node.
418418
"""
419419

420+
ipam_config: Optional[EndpointSpecPrivateNetworkSpecIpamConfig]
421+
"""
422+
Automated configuration of your Private Network endpoint with Scaleway IPAM service.
423+
"""
424+
425+
426+
@dataclass
427+
class EndpointSpecPrivateNetworkSpecIpamConfig:
428+
pass
429+
420430

421431
@dataclass
422432
class EndpointSpecPublicNetworkSpec:

0 commit comments

Comments
 (0)