Skip to content

Commit d135bfc

Browse files
authored
Merge branch 'main' into test-vcrpy
2 parents fb4ac9f + 2bb6ec0 commit d135bfc

File tree

12 files changed

+116
-0
lines changed

12 files changed

+116
-0
lines changed

scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .types import BaremetalServerInfo
1010
from .types import BaremetalSettingInfo
1111
from .types import InstanceServerInfo
12+
from .types import IpamIpInfo
1213
from .types import KeyManagerKeyInfo
1314
from .types import KubernetesACLInfo
1415
from .types import KubernetesClusterInfo
@@ -38,6 +39,7 @@
3839
"BaremetalServerInfo",
3940
"BaremetalSettingInfo",
4041
"InstanceServerInfo",
42+
"IpamIpInfo",
4143
"KeyManagerKeyInfo",
4244
"KubernetesACLInfo",
4345
"KubernetesClusterInfo",

scaleway-async/scaleway_async/audit_trail/v1alpha1/marshalling.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
BaremetalServerInfo,
1313
BaremetalSettingInfo,
1414
InstanceServerInfo,
15+
IpamIpInfo,
1516
KeyManagerKeyInfo,
1617
KubernetesACLInfo,
1718
KubernetesClusterInfo,
@@ -161,6 +162,23 @@ def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo:
161162
return InstanceServerInfo(**args)
162163

163164

165+
def unmarshal_IpamIpInfo(data: Any) -> IpamIpInfo:
166+
if not isinstance(data, dict):
167+
raise TypeError(
168+
"Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary."
169+
)
170+
171+
args: Dict[str, Any] = {}
172+
173+
field = data.get("address", None)
174+
if field is not None:
175+
args["address"] = field
176+
else:
177+
args["address"] = None
178+
179+
return IpamIpInfo(**args)
180+
181+
164182
def unmarshal_KeyManagerKeyInfo(data: Any) -> KeyManagerKeyInfo:
165183
if not isinstance(data, dict):
166184
raise TypeError(
@@ -466,6 +484,12 @@ def unmarshal_Resource(data: Any) -> Resource:
466484
else:
467485
args["baremetal_setting_info"] = None
468486

487+
field = data.get("ipam_ip_info", None)
488+
if field is not None:
489+
args["ipam_ip_info"] = unmarshal_IpamIpInfo(field)
490+
else:
491+
args["ipam_ip_info"] = None
492+
469493
return Resource(**args)
470494

471495

scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
4646
ACCOUNT_ORGANIZATION = "account_organization"
4747
ACCOUNT_PROJECT = "account_project"
4848
INSTANCE_SERVER = "instance_server"
49+
INSTANCE_PLACEMENT_GROUP = "instance_placement_group"
50+
INSTANCE_SECURITY_GROUP = "instance_security_group"
4951
APPLE_SILICON_SERVER = "apple_silicon_server"
5052
BAREMETAL_SERVER = "baremetal_server"
5153
BAREMETAL_SETTING = "baremetal_setting"
54+
IPAM_IP = "ipam_ip"
5255

5356
def __str__(self) -> str:
5457
return str(self.value)
@@ -92,6 +95,11 @@ class InstanceServerInfo:
9295
name: str
9396

9497

98+
@dataclass
99+
class IpamIpInfo:
100+
address: str
101+
102+
95103
@dataclass
96104
class KeyManagerKeyInfo:
97105
pass
@@ -182,6 +190,8 @@ class Resource:
182190

183191
baremetal_setting_info: Optional[BaremetalSettingInfo] = None
184192

193+
ipam_ip_info: Optional[IpamIpInfo] = None
194+
185195

186196
@dataclass
187197
class ProductService:

scaleway-async/scaleway_async/qaas/v1alpha1/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ async def create_session(
794794
deduplication_id: Optional[str] = None,
795795
booking_demand: Optional[CreateSessionRequestBookingDemand] = None,
796796
model_id: Optional[str] = None,
797+
parameters: Optional[str] = None,
797798
) -> Session:
798799
"""
799800
Create a session.
@@ -807,6 +808,7 @@ async def create_session(
807808
:param deduplication_id: Deduplication ID of the session.
808809
:param booking_demand: A booking demand to schedule the session, only applicable if the platform is bookable.
809810
:param model_id: Default computation model ID to be executed by job assigned to this session.
811+
:param parameters: Optional platform configuration parameters applied to this session.
810812
:return: :class:`Session <Session>`
811813
812814
Usage:
@@ -831,6 +833,7 @@ async def create_session(
831833
deduplication_id=deduplication_id,
832834
booking_demand=booking_demand,
833835
model_id=model_id,
836+
parameters=parameters,
834837
),
835838
self.client,
836839
),

scaleway-async/scaleway_async/qaas/v1alpha1/marshalling.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,12 @@ def unmarshal_Session(data: Any) -> Session:
752752
else:
753753
args["model_id"] = None
754754

755+
field = data.get("parameters", None)
756+
if field is not None:
757+
args["parameters"] = field
758+
else:
759+
args["parameters"] = None
760+
755761
return Session(**args)
756762

757763

@@ -1221,6 +1227,9 @@ def marshal_CreateSessionRequest(
12211227
if request.model_id is not None:
12221228
output["model_id"] = request.model_id
12231229

1230+
if request.parameters is not None:
1231+
output["parameters"] = request.parameters
1232+
12241233
return output
12251234

12261235

scaleway-async/scaleway_async/qaas/v1alpha1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,11 @@ class Session:
796796
Default computation model ID to be executed by job assigned to this session.
797797
"""
798798

799+
parameters: Optional[str] = None
800+
"""
801+
Platform configuration parameters applied to this session.
802+
"""
803+
799804

800805
@dataclass
801806
class CancelJobRequest:
@@ -944,6 +949,11 @@ class CreateSessionRequest:
944949
Default computation model ID to be executed by job assigned to this session.
945950
"""
946951

952+
parameters: Optional[str] = None
953+
"""
954+
Optional platform configuration parameters applied to this session.
955+
"""
956+
947957

948958
@dataclass
949959
class DeleteJobRequest:

scaleway/scaleway/audit_trail/v1alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .types import BaremetalServerInfo
1010
from .types import BaremetalSettingInfo
1111
from .types import InstanceServerInfo
12+
from .types import IpamIpInfo
1213
from .types import KeyManagerKeyInfo
1314
from .types import KubernetesACLInfo
1415
from .types import KubernetesClusterInfo
@@ -38,6 +39,7 @@
3839
"BaremetalServerInfo",
3940
"BaremetalSettingInfo",
4041
"InstanceServerInfo",
42+
"IpamIpInfo",
4143
"KeyManagerKeyInfo",
4244
"KubernetesACLInfo",
4345
"KubernetesClusterInfo",

scaleway/scaleway/audit_trail/v1alpha1/marshalling.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
BaremetalServerInfo,
1313
BaremetalSettingInfo,
1414
InstanceServerInfo,
15+
IpamIpInfo,
1516
KeyManagerKeyInfo,
1617
KubernetesACLInfo,
1718
KubernetesClusterInfo,
@@ -161,6 +162,23 @@ def unmarshal_InstanceServerInfo(data: Any) -> InstanceServerInfo:
161162
return InstanceServerInfo(**args)
162163

163164

165+
def unmarshal_IpamIpInfo(data: Any) -> IpamIpInfo:
166+
if not isinstance(data, dict):
167+
raise TypeError(
168+
"Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary."
169+
)
170+
171+
args: Dict[str, Any] = {}
172+
173+
field = data.get("address", None)
174+
if field is not None:
175+
args["address"] = field
176+
else:
177+
args["address"] = None
178+
179+
return IpamIpInfo(**args)
180+
181+
164182
def unmarshal_KeyManagerKeyInfo(data: Any) -> KeyManagerKeyInfo:
165183
if not isinstance(data, dict):
166184
raise TypeError(
@@ -466,6 +484,12 @@ def unmarshal_Resource(data: Any) -> Resource:
466484
else:
467485
args["baremetal_setting_info"] = None
468486

487+
field = data.get("ipam_ip_info", None)
488+
if field is not None:
489+
args["ipam_ip_info"] = unmarshal_IpamIpInfo(field)
490+
else:
491+
args["ipam_ip_info"] = None
492+
469493
return Resource(**args)
470494

471495

scaleway/scaleway/audit_trail/v1alpha1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta):
4646
ACCOUNT_ORGANIZATION = "account_organization"
4747
ACCOUNT_PROJECT = "account_project"
4848
INSTANCE_SERVER = "instance_server"
49+
INSTANCE_PLACEMENT_GROUP = "instance_placement_group"
50+
INSTANCE_SECURITY_GROUP = "instance_security_group"
4951
APPLE_SILICON_SERVER = "apple_silicon_server"
5052
BAREMETAL_SERVER = "baremetal_server"
5153
BAREMETAL_SETTING = "baremetal_setting"
54+
IPAM_IP = "ipam_ip"
5255

5356
def __str__(self) -> str:
5457
return str(self.value)
@@ -92,6 +95,11 @@ class InstanceServerInfo:
9295
name: str
9396

9497

98+
@dataclass
99+
class IpamIpInfo:
100+
address: str
101+
102+
95103
@dataclass
96104
class KeyManagerKeyInfo:
97105
pass
@@ -182,6 +190,8 @@ class Resource:
182190

183191
baremetal_setting_info: Optional[BaremetalSettingInfo] = None
184192

193+
ipam_ip_info: Optional[IpamIpInfo] = None
194+
185195

186196
@dataclass
187197
class ProductService:

scaleway/scaleway/qaas/v1alpha1/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ def create_session(
794794
deduplication_id: Optional[str] = None,
795795
booking_demand: Optional[CreateSessionRequestBookingDemand] = None,
796796
model_id: Optional[str] = None,
797+
parameters: Optional[str] = None,
797798
) -> Session:
798799
"""
799800
Create a session.
@@ -807,6 +808,7 @@ def create_session(
807808
:param deduplication_id: Deduplication ID of the session.
808809
:param booking_demand: A booking demand to schedule the session, only applicable if the platform is bookable.
809810
:param model_id: Default computation model ID to be executed by job assigned to this session.
811+
:param parameters: Optional platform configuration parameters applied to this session.
810812
:return: :class:`Session <Session>`
811813
812814
Usage:
@@ -831,6 +833,7 @@ def create_session(
831833
deduplication_id=deduplication_id,
832834
booking_demand=booking_demand,
833835
model_id=model_id,
836+
parameters=parameters,
834837
),
835838
self.client,
836839
),

0 commit comments

Comments
 (0)