Skip to content

Commit b6cc7b9

Browse files
authored
docs(k8s): adjust examples (#25)
1 parent f252426 commit b6cc7b9

File tree

6 files changed

+28
-52
lines changed

6 files changed

+28
-52
lines changed

scaleway-async/scaleway_async/k8s/v1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def create_cluster(
219219
:param project_id: The project ID where the cluster will be created.
220220
221221
One-of ('project_identifier'): at most one of 'organization_id', 'project_id' could be set.
222-
:param type_: The type of the cluster
222+
:param type_: The type of the cluster (possible values are kapsule, multicloud).
223223
:param name: The name of the cluster
224224
:param description: The description of the cluster
225225
:param tags: The tags associated with the cluster

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

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,18 @@ def marshal_CreateClusterRequest(
679679
defaults: ProfileDefaults,
680680
) -> Dict[str, Any]:
681681
return {
682+
**resolve_one_of(
683+
[
684+
OneOfPossibility(
685+
"project_id", request.project_id, defaults.default_project_id
686+
),
687+
OneOfPossibility(
688+
"organization_id",
689+
request.organization_id,
690+
defaults.default_organization_id,
691+
),
692+
]
693+
),
682694
"admission_plugins": request.admission_plugins,
683695
"apiserver_cert_sans": request.apiserver_cert_sans,
684696
"auto_upgrade": marshal_CreateClusterRequestAutoUpgrade(
@@ -702,35 +714,11 @@ def marshal_CreateClusterRequest(
702714
)
703715
if request.open_id_connect_config is not None
704716
else None,
705-
**resolve_one_of(
706-
[
707-
OneOfPossibility(
708-
"project_id", request.project_id, defaults.default_project_id
709-
),
710-
OneOfPossibility(
711-
"organization_id",
712-
request.organization_id,
713-
defaults.default_organization_id,
714-
),
715-
]
716-
),
717717
"pools": [
718718
marshal_CreateClusterRequestPoolConfig(v, defaults) for v in request.pools
719719
]
720720
if request.pools is not None
721721
else None,
722-
**resolve_one_of(
723-
[
724-
OneOfPossibility(
725-
"project_id", request.project_id, defaults.default_project_id
726-
),
727-
OneOfPossibility(
728-
"organization_id",
729-
request.organization_id,
730-
defaults.default_organization_id,
731-
),
732-
]
733-
),
734722
"tags": request.tags,
735723
"type": request.type_,
736724
"version": request.version,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ class CreateClusterRequest:
12081208

12091209
type_: str
12101210
"""
1211-
The type of the cluster
1211+
The type of the cluster (possible values are kapsule, multicloud).
12121212
"""
12131213

12141214
name: Optional[str]

scaleway/scaleway/k8s/v1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def create_cluster(
219219
:param project_id: The project ID where the cluster will be created.
220220
221221
One-of ('project_identifier'): at most one of 'organization_id', 'project_id' could be set.
222-
:param type_: The type of the cluster
222+
:param type_: The type of the cluster (possible values are kapsule, multicloud).
223223
:param name: The name of the cluster
224224
:param description: The description of the cluster
225225
:param tags: The tags associated with the cluster

scaleway/scaleway/k8s/v1/marshalling.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,18 @@ def marshal_CreateClusterRequest(
679679
defaults: ProfileDefaults,
680680
) -> Dict[str, Any]:
681681
return {
682+
**resolve_one_of(
683+
[
684+
OneOfPossibility(
685+
"project_id", request.project_id, defaults.default_project_id
686+
),
687+
OneOfPossibility(
688+
"organization_id",
689+
request.organization_id,
690+
defaults.default_organization_id,
691+
),
692+
]
693+
),
682694
"admission_plugins": request.admission_plugins,
683695
"apiserver_cert_sans": request.apiserver_cert_sans,
684696
"auto_upgrade": marshal_CreateClusterRequestAutoUpgrade(
@@ -702,35 +714,11 @@ def marshal_CreateClusterRequest(
702714
)
703715
if request.open_id_connect_config is not None
704716
else None,
705-
**resolve_one_of(
706-
[
707-
OneOfPossibility(
708-
"project_id", request.project_id, defaults.default_project_id
709-
),
710-
OneOfPossibility(
711-
"organization_id",
712-
request.organization_id,
713-
defaults.default_organization_id,
714-
),
715-
]
716-
),
717717
"pools": [
718718
marshal_CreateClusterRequestPoolConfig(v, defaults) for v in request.pools
719719
]
720720
if request.pools is not None
721721
else None,
722-
**resolve_one_of(
723-
[
724-
OneOfPossibility(
725-
"project_id", request.project_id, defaults.default_project_id
726-
),
727-
OneOfPossibility(
728-
"organization_id",
729-
request.organization_id,
730-
defaults.default_organization_id,
731-
),
732-
]
733-
),
734722
"tags": request.tags,
735723
"type": request.type_,
736724
"version": request.version,

scaleway/scaleway/k8s/v1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ class CreateClusterRequest:
12081208

12091209
type_: str
12101210
"""
1211-
The type of the cluster
1211+
The type of the cluster (possible values are kapsule, multicloud).
12121212
"""
12131213

12141214
name: Optional[str]

0 commit comments

Comments
 (0)