Skip to content
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
10 changes: 4 additions & 6 deletions scaleway-async/scaleway_async/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,34 +267,32 @@ async def wait_for_namespace(
async def create_namespace(
self,
*,
activate_vpc_integration: bool,
region: Optional[ScwRegion] = None,
name: Optional[str] = None,
environment_variables: Optional[dict[str, str]] = None,
project_id: Optional[str] = None,
description: Optional[str] = None,
secret_environment_variables: Optional[list[Secret]] = None,
tags: Optional[list[str]] = None,
activate_vpc_integration: Optional[bool] = None,
) -> Namespace:
"""
Create a new namespace.
Create a new namespace in a specified region.
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
:param region: Region to target. If none is passed will use default region from the config.
:param name: Name of the namespace to create.
:param environment_variables: Environment variables of the namespace to create.
:param project_id: UUID of the Project in which the namespace will be created.
:param description: Description of the namespace to create.
:param secret_environment_variables: Secret environment variables of the namespace to create.
:param tags: Tags of the Serverless Container Namespace.
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
:return: :class:`Namespace <Namespace>`

Usage:
::

result = await api.create_namespace(
activate_vpc_integration=False,
)
result = await api.create_namespace()
"""

param_region = validate_path_param(
Expand All @@ -306,14 +304,14 @@ async def create_namespace(
f"/containers/v1beta1/regions/{param_region}/namespaces",
body=marshal_CreateNamespaceRequest(
CreateNamespaceRequest(
activate_vpc_integration=activate_vpc_integration,
region=region,
name=name or random_name(prefix="cns"),
environment_variables=environment_variables,
project_id=project_id,
description=description,
secret_environment_variables=secret_environment_variables,
tags=tags,
activate_vpc_integration=activate_vpc_integration,
),
self.client,
),
Expand Down
12 changes: 6 additions & 6 deletions scaleway-async/scaleway_async/container/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,6 @@ def unmarshal_Namespace(data: Any) -> Namespace:
else:
args["tags"] = []

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

field = data.get("description", None)
if field is not None:
args["description"] = field
Expand All @@ -587,6 +581,12 @@ def unmarshal_Namespace(data: Any) -> Namespace:
else:
args["updated_at"] = None

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

return Namespace(**args)


Expand Down
28 changes: 14 additions & 14 deletions scaleway-async/scaleway_async/container/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,6 @@ class Namespace:
List of tags applied to the Serverless Container Namespace.
"""

vpc_integration_activated: bool
"""
The value of this field doesn't matter anymore, and will be removed in a near future.
"""

error_message: Optional[str] = None
"""
Last error message of the namesace.
Expand All @@ -680,6 +675,11 @@ class Namespace:
Last update date of the namespace.
"""

vpc_integration_activated: Optional[bool] = None
"""
The value of this field doesn't matter anymore, and will be removed in a near future.
"""


@dataclass
class Token:
Expand All @@ -693,14 +693,14 @@ class Token:
Identifier of the token.
"""

public_key: str
status: TokenStatus
"""
Public key of the token.
Status of the token.
"""

status: TokenStatus
public_key: Optional[str] = None
"""
Status of the token.
Public key of the token.
"""

description: Optional[str] = None
Expand Down Expand Up @@ -949,11 +949,6 @@ class CreateDomainRequest:

@dataclass
class CreateNamespaceRequest:
activate_vpc_integration: bool
"""
Setting this field to true doesn't matter anymore. It will be removed in a near future.
"""

region: Optional[ScwRegion] = None
"""
Region to target. If none is passed will use default region from the config.
Expand Down Expand Up @@ -989,6 +984,11 @@ class CreateNamespaceRequest:
Tags of the Serverless Container Namespace.
"""

activate_vpc_integration: Optional[bool] = None
"""
Setting this field to true doesn't matter anymore. It will be removed in a near future.
"""


@dataclass
class CreateTokenRequest:
Expand Down
10 changes: 4 additions & 6 deletions scaleway/scaleway/container/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,34 +265,32 @@ def wait_for_namespace(
def create_namespace(
self,
*,
activate_vpc_integration: bool,
region: Optional[ScwRegion] = None,
name: Optional[str] = None,
environment_variables: Optional[dict[str, str]] = None,
project_id: Optional[str] = None,
description: Optional[str] = None,
secret_environment_variables: Optional[list[Secret]] = None,
tags: Optional[list[str]] = None,
activate_vpc_integration: Optional[bool] = None,
) -> Namespace:
"""
Create a new namespace.
Create a new namespace in a specified region.
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
:param region: Region to target. If none is passed will use default region from the config.
:param name: Name of the namespace to create.
:param environment_variables: Environment variables of the namespace to create.
:param project_id: UUID of the Project in which the namespace will be created.
:param description: Description of the namespace to create.
:param secret_environment_variables: Secret environment variables of the namespace to create.
:param tags: Tags of the Serverless Container Namespace.
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
:return: :class:`Namespace <Namespace>`

Usage:
::

result = api.create_namespace(
activate_vpc_integration=False,
)
result = api.create_namespace()
"""

param_region = validate_path_param(
Expand All @@ -304,14 +302,14 @@ def create_namespace(
f"/containers/v1beta1/regions/{param_region}/namespaces",
body=marshal_CreateNamespaceRequest(
CreateNamespaceRequest(
activate_vpc_integration=activate_vpc_integration,
region=region,
name=name or random_name(prefix="cns"),
environment_variables=environment_variables,
project_id=project_id,
description=description,
secret_environment_variables=secret_environment_variables,
tags=tags,
activate_vpc_integration=activate_vpc_integration,
),
self.client,
),
Expand Down
12 changes: 6 additions & 6 deletions scaleway/scaleway/container/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,6 @@ def unmarshal_Namespace(data: Any) -> Namespace:
else:
args["tags"] = []

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

field = data.get("description", None)
if field is not None:
args["description"] = field
Expand All @@ -587,6 +581,12 @@ def unmarshal_Namespace(data: Any) -> Namespace:
else:
args["updated_at"] = None

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

return Namespace(**args)


Expand Down
28 changes: 14 additions & 14 deletions scaleway/scaleway/container/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,6 @@ class Namespace:
List of tags applied to the Serverless Container Namespace.
"""

vpc_integration_activated: bool
"""
The value of this field doesn't matter anymore, and will be removed in a near future.
"""

error_message: Optional[str] = None
"""
Last error message of the namesace.
Expand All @@ -680,6 +675,11 @@ class Namespace:
Last update date of the namespace.
"""

vpc_integration_activated: Optional[bool] = None
"""
The value of this field doesn't matter anymore, and will be removed in a near future.
"""


@dataclass
class Token:
Expand All @@ -693,14 +693,14 @@ class Token:
Identifier of the token.
"""

public_key: str
status: TokenStatus
"""
Public key of the token.
Status of the token.
"""

status: TokenStatus
public_key: Optional[str] = None
"""
Status of the token.
Public key of the token.
"""

description: Optional[str] = None
Expand Down Expand Up @@ -949,11 +949,6 @@ class CreateDomainRequest:

@dataclass
class CreateNamespaceRequest:
activate_vpc_integration: bool
"""
Setting this field to true doesn't matter anymore. It will be removed in a near future.
"""

region: Optional[ScwRegion] = None
"""
Region to target. If none is passed will use default region from the config.
Expand Down Expand Up @@ -989,6 +984,11 @@ class CreateNamespaceRequest:
Tags of the Serverless Container Namespace.
"""

activate_vpc_integration: Optional[bool] = None
"""
Setting this field to true doesn't matter anymore. It will be removed in a near future.
"""


@dataclass
class CreateTokenRequest:
Expand Down
Loading