Skip to content

feat(container): add of local storage limit #611

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 2 commits into from
Aug 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: 6 additions & 0 deletions scaleway-async/scaleway_async/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ async def create_container(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[ContainerHttpOption] = None,
sandbox: Optional[ContainerSandbox] = None,
local_storage_limit: Optional[int] = None,
) -> Container:
"""
Create a new container.
Expand All @@ -618,6 +619,7 @@ async def create_container(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the container.
:param local_storage_limit: Local storage limit of the container (in MB).
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -656,6 +658,7 @@ async def create_container(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
local_storage_limit=local_storage_limit,
),
self.client,
),
Expand Down Expand Up @@ -685,6 +688,7 @@ async def update_container(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[ContainerHttpOption] = None,
sandbox: Optional[ContainerSandbox] = None,
local_storage_limit: Optional[int] = None,
) -> Container:
"""
Update an existing container.
Expand All @@ -709,6 +713,7 @@ async def update_container(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the container.
:param local_storage_limit: Local storage limit of the container (in MB).
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -747,6 +752,7 @@ async def update_container(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
local_storage_limit=local_storage_limit,
),
self.client,
),
Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/container/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ def unmarshal_Container(data: Any) -> Container:
if field is not None:
args["sandbox"] = field

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

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down Expand Up @@ -715,6 +719,9 @@ def marshal_CreateContainerRequest(
if request.sandbox is not None:
output["sandbox"] = str(request.sandbox)

if request.local_storage_limit is not None:
output["local_storage_limit"] = request.local_storage_limit

return output


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

if request.local_storage_limit is not None:
output["local_storage_limit"] = request.local_storage_limit

return output


Expand Down
15 changes: 15 additions & 0 deletions scaleway-async/scaleway_async/container/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ class Container:
Execution environment of the container.
"""

local_storage_limit: int
"""
Local storage limit of the container (in MB).
"""

region: Region
"""
Region in which the container will be deployed.
Expand Down Expand Up @@ -745,6 +750,11 @@ class CreateContainerRequest:
Execution environment of the container.
"""

local_storage_limit: Optional[int]
"""
Local storage limit of the container (in MB).
"""


@dataclass
class CreateCronRequest:
Expand Down Expand Up @@ -1415,6 +1425,11 @@ class UpdateContainerRequest:
Execution environment of the container.
"""

local_storage_limit: Optional[int]
"""
Local storage limit of the container (in MB).
"""


@dataclass
class UpdateCronRequest:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ def create_container(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[ContainerHttpOption] = None,
sandbox: Optional[ContainerSandbox] = None,
local_storage_limit: Optional[int] = None,
) -> Container:
"""
Create a new container.
Expand All @@ -614,6 +615,7 @@ def create_container(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the container.
:param local_storage_limit: Local storage limit of the container (in MB).
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -652,6 +654,7 @@ def create_container(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
local_storage_limit=local_storage_limit,
),
self.client,
),
Expand Down Expand Up @@ -681,6 +684,7 @@ def update_container(
secret_environment_variables: Optional[List[Secret]] = None,
http_option: Optional[ContainerHttpOption] = None,
sandbox: Optional[ContainerSandbox] = None,
local_storage_limit: Optional[int] = None,
) -> Container:
"""
Update an existing container.
Expand All @@ -705,6 +709,7 @@ def update_container(
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
- enabled: Serve both HTTP and HTTPS traffic.
:param sandbox: Execution environment of the container.
:param local_storage_limit: Local storage limit of the container (in MB).
:return: :class:`Container <Container>`

Usage:
Expand Down Expand Up @@ -743,6 +748,7 @@ def update_container(
secret_environment_variables=secret_environment_variables,
http_option=http_option,
sandbox=sandbox,
local_storage_limit=local_storage_limit,
),
self.client,
),
Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/container/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ def unmarshal_Container(data: Any) -> Container:
if field is not None:
args["sandbox"] = field

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

field = data.get("region", None)
if field is not None:
args["region"] = field
Expand Down Expand Up @@ -715,6 +719,9 @@ def marshal_CreateContainerRequest(
if request.sandbox is not None:
output["sandbox"] = str(request.sandbox)

if request.local_storage_limit is not None:
output["local_storage_limit"] = request.local_storage_limit

return output


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

if request.local_storage_limit is not None:
output["local_storage_limit"] = request.local_storage_limit

return output


Expand Down
15 changes: 15 additions & 0 deletions scaleway/scaleway/container/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ class Container:
Execution environment of the container.
"""

local_storage_limit: int
"""
Local storage limit of the container (in MB).
"""

region: Region
"""
Region in which the container will be deployed.
Expand Down Expand Up @@ -745,6 +750,11 @@ class CreateContainerRequest:
Execution environment of the container.
"""

local_storage_limit: Optional[int]
"""
Local storage limit of the container (in MB).
"""


@dataclass
class CreateCronRequest:
Expand Down Expand Up @@ -1415,6 +1425,11 @@ class UpdateContainerRequest:
Execution environment of the container.
"""

local_storage_limit: Optional[int]
"""
Local storage limit of the container (in MB).
"""


@dataclass
class UpdateCronRequest:
Expand Down