Skip to content

Commit ef8b0d7

Browse files
committed
feat(booking): wip booking
1 parent 99b392a commit ef8b0d7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

scaleway_qaas_client/v1alpha1/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
from .quantum_as_a_service_api_client.models import (
6666
ScalewayQaasV1Alpha1SessionStatus as QaaSSessionStatus,
6767
)
68-
from quantum_as_a_service_api_client.models import (
68+
from .quantum_as_a_service_api_client.models import (
6969
ScalewayQaasV1Alpha1PlatformBookingRequirement as QaaSBookingRequirements,
7070
)
71-
from quantum_as_a_service_api_client.models import (
71+
from .quantum_as_a_service_api_client.models import (
7272
ScalewayQaasV1Alpha1Booking as QaaSBooking,
7373
)

scaleway_qaas_client/v1alpha1/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import randomname
1818
from pytimeparse.timeparse import timeparse
19+
from datetime import datetime
1920

2021
from scaleway_qaas_client.v1alpha1.quantum_as_a_service_api_client.api.applications.get_application import (
2122
sync_detailed as _get_application_sync,
@@ -247,8 +248,8 @@ def create_session(
247248
name: Optional[str] = None,
248249
model_id: Optional[str] = None,
249250
parameters: Optional[Union[Dict, List, str]] = None,
250-
booking_demand_started_at: Optional[str] = None,
251-
booking_demand_finished_at: Optional[str] = None,
251+
booking_demand_started_at: Optional[datetime] = None,
252+
booking_demand_finished_at: Optional[datetime] = None,
252253
booking_demand_description: Optional[str] = None,
253254
) -> ScalewayQaasV1Alpha1Session:
254255
"""Create a session
@@ -263,6 +264,9 @@ def create_session(
263264
max_duration (Union[None, Unset, str]): Maximum duration before the session ends. (in seconds) Example: 20m.
264265
deduplication_id (Union[None, Unset, str]): Deduplication ID of the session.
265266
model_id (Union[None, Unset, str]): Default computation model ID to be executed by job assigned to this session.
267+
booking_demand_started_at (Union[None, Unset, datetime.datetime]): Wished started time for an exclusive session over a QPU, only works if the platform is_bookable (RFC 3339 format) Example: 2022-03-22T12:34:56.123456Z.
268+
booking_demand_finished_at (Union[None, Unset, datetime.datetime]): Wished finished time for an exclusive session over a QPU, only works if the platform is_bookable (RFC 3339 format) Example: 2022-03-22T12:34:56.123456Z.
269+
booking_demand_description (Union[None, Unset, str]): User description of the booking
266270
267271
Raises:
268272
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

0 commit comments

Comments
 (0)