Skip to content

Commit d4bde70

Browse files
feat(container): add of local storage limit (#611)
Co-authored-by: Laure-di <[email protected]>
1 parent 29585e9 commit d4bde70

File tree

6 files changed

+62
-0
lines changed

6 files changed

+62
-0
lines changed

scaleway-async/scaleway_async/container/v1beta1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ async def create_container(
594594
secret_environment_variables: Optional[List[Secret]] = None,
595595
http_option: Optional[ContainerHttpOption] = None,
596596
sandbox: Optional[ContainerSandbox] = None,
597+
local_storage_limit: Optional[int] = None,
597598
) -> Container:
598599
"""
599600
Create a new container.
@@ -618,6 +619,7 @@ async def create_container(
618619
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
619620
- enabled: Serve both HTTP and HTTPS traffic.
620621
:param sandbox: Execution environment of the container.
622+
:param local_storage_limit: Local storage limit of the container (in MB).
621623
:return: :class:`Container <Container>`
622624
623625
Usage:
@@ -656,6 +658,7 @@ async def create_container(
656658
secret_environment_variables=secret_environment_variables,
657659
http_option=http_option,
658660
sandbox=sandbox,
661+
local_storage_limit=local_storage_limit,
659662
),
660663
self.client,
661664
),
@@ -685,6 +688,7 @@ async def update_container(
685688
secret_environment_variables: Optional[List[Secret]] = None,
686689
http_option: Optional[ContainerHttpOption] = None,
687690
sandbox: Optional[ContainerSandbox] = None,
691+
local_storage_limit: Optional[int] = None,
688692
) -> Container:
689693
"""
690694
Update an existing container.
@@ -709,6 +713,7 @@ async def update_container(
709713
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
710714
- enabled: Serve both HTTP and HTTPS traffic.
711715
:param sandbox: Execution environment of the container.
716+
:param local_storage_limit: Local storage limit of the container (in MB).
712717
:return: :class:`Container <Container>`
713718
714719
Usage:
@@ -747,6 +752,7 @@ async def update_container(
747752
secret_environment_variables=secret_environment_variables,
748753
http_option=http_option,
749754
sandbox=sandbox,
755+
local_storage_limit=local_storage_limit,
750756
),
751757
self.client,
752758
),

scaleway-async/scaleway_async/container/v1beta1/marshalling.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def unmarshal_Container(data: Any) -> Container:
165165
if field is not None:
166166
args["sandbox"] = field
167167

168+
field = data.get("local_storage_limit", None)
169+
if field is not None:
170+
args["local_storage_limit"] = field
171+
168172
field = data.get("region", None)
169173
if field is not None:
170174
args["region"] = field
@@ -715,6 +719,9 @@ def marshal_CreateContainerRequest(
715719
if request.sandbox is not None:
716720
output["sandbox"] = str(request.sandbox)
717721

722+
if request.local_storage_limit is not None:
723+
output["local_storage_limit"] = request.local_storage_limit
724+
718725
return output
719726

720727

@@ -948,6 +955,9 @@ def marshal_UpdateContainerRequest(
948955
if request.sandbox is not None:
949956
output["sandbox"] = str(request.sandbox)
950957

958+
if request.local_storage_limit is not None:
959+
output["local_storage_limit"] = request.local_storage_limit
960+
951961
return output
952962

953963

scaleway-async/scaleway_async/container/v1beta1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ class Container:
428428
Execution environment of the container.
429429
"""
430430

431+
local_storage_limit: int
432+
"""
433+
Local storage limit of the container (in MB).
434+
"""
435+
431436
region: Region
432437
"""
433438
Region in which the container will be deployed.
@@ -745,6 +750,11 @@ class CreateContainerRequest:
745750
Execution environment of the container.
746751
"""
747752

753+
local_storage_limit: Optional[int]
754+
"""
755+
Local storage limit of the container (in MB).
756+
"""
757+
748758

749759
@dataclass
750760
class CreateCronRequest:
@@ -1415,6 +1425,11 @@ class UpdateContainerRequest:
14151425
Execution environment of the container.
14161426
"""
14171427

1428+
local_storage_limit: Optional[int]
1429+
"""
1430+
Local storage limit of the container (in MB).
1431+
"""
1432+
14181433

14191434
@dataclass
14201435
class UpdateCronRequest:

scaleway/scaleway/container/v1beta1/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ def create_container(
590590
secret_environment_variables: Optional[List[Secret]] = None,
591591
http_option: Optional[ContainerHttpOption] = None,
592592
sandbox: Optional[ContainerSandbox] = None,
593+
local_storage_limit: Optional[int] = None,
593594
) -> Container:
594595
"""
595596
Create a new container.
@@ -614,6 +615,7 @@ def create_container(
614615
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
615616
- enabled: Serve both HTTP and HTTPS traffic.
616617
:param sandbox: Execution environment of the container.
618+
:param local_storage_limit: Local storage limit of the container (in MB).
617619
:return: :class:`Container <Container>`
618620
619621
Usage:
@@ -652,6 +654,7 @@ def create_container(
652654
secret_environment_variables=secret_environment_variables,
653655
http_option=http_option,
654656
sandbox=sandbox,
657+
local_storage_limit=local_storage_limit,
655658
),
656659
self.client,
657660
),
@@ -681,6 +684,7 @@ def update_container(
681684
secret_environment_variables: Optional[List[Secret]] = None,
682685
http_option: Optional[ContainerHttpOption] = None,
683686
sandbox: Optional[ContainerSandbox] = None,
687+
local_storage_limit: Optional[int] = None,
684688
) -> Container:
685689
"""
686690
Update an existing container.
@@ -705,6 +709,7 @@ def update_container(
705709
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
706710
- enabled: Serve both HTTP and HTTPS traffic.
707711
:param sandbox: Execution environment of the container.
712+
:param local_storage_limit: Local storage limit of the container (in MB).
708713
:return: :class:`Container <Container>`
709714
710715
Usage:
@@ -743,6 +748,7 @@ def update_container(
743748
secret_environment_variables=secret_environment_variables,
744749
http_option=http_option,
745750
sandbox=sandbox,
751+
local_storage_limit=local_storage_limit,
746752
),
747753
self.client,
748754
),

scaleway/scaleway/container/v1beta1/marshalling.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def unmarshal_Container(data: Any) -> Container:
165165
if field is not None:
166166
args["sandbox"] = field
167167

168+
field = data.get("local_storage_limit", None)
169+
if field is not None:
170+
args["local_storage_limit"] = field
171+
168172
field = data.get("region", None)
169173
if field is not None:
170174
args["region"] = field
@@ -715,6 +719,9 @@ def marshal_CreateContainerRequest(
715719
if request.sandbox is not None:
716720
output["sandbox"] = str(request.sandbox)
717721

722+
if request.local_storage_limit is not None:
723+
output["local_storage_limit"] = request.local_storage_limit
724+
718725
return output
719726

720727

@@ -948,6 +955,9 @@ def marshal_UpdateContainerRequest(
948955
if request.sandbox is not None:
949956
output["sandbox"] = str(request.sandbox)
950957

958+
if request.local_storage_limit is not None:
959+
output["local_storage_limit"] = request.local_storage_limit
960+
951961
return output
952962

953963

scaleway/scaleway/container/v1beta1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ class Container:
428428
Execution environment of the container.
429429
"""
430430

431+
local_storage_limit: int
432+
"""
433+
Local storage limit of the container (in MB).
434+
"""
435+
431436
region: Region
432437
"""
433438
Region in which the container will be deployed.
@@ -745,6 +750,11 @@ class CreateContainerRequest:
745750
Execution environment of the container.
746751
"""
747752

753+
local_storage_limit: Optional[int]
754+
"""
755+
Local storage limit of the container (in MB).
756+
"""
757+
748758

749759
@dataclass
750760
class CreateCronRequest:
@@ -1415,6 +1425,11 @@ class UpdateContainerRequest:
14151425
Execution environment of the container.
14161426
"""
14171427

1428+
local_storage_limit: Optional[int]
1429+
"""
1430+
Local storage limit of the container (in MB).
1431+
"""
1432+
14181433

14191434
@dataclass
14201435
class UpdateCronRequest:

0 commit comments

Comments
 (0)