Skip to content

Commit 7e93153

Browse files
feat: We can search for pilots
1 parent 9da8033 commit 7e93153

File tree

19 files changed

+1828
-657
lines changed

19 files changed

+1828
-657
lines changed

diracx-client/src/diracx/client/_generated/aio/operations/_operations.py

Lines changed: 188 additions & 46 deletions
Large diffs are not rendered by default.

diracx-client/src/diracx/client/_generated/models/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,16 @@
1616
BodyAuthGetOidcTokenGrantType,
1717
BodyAuthPilotLogin,
1818
BodyAuthRefreshPilotTokens,
19+
BodyPilotsAddPilotStamps,
1920
BodyPilotsAssociatePilotWithJobs,
2021
BodyPilotsAssociatePilotsWithSecrets,
2122
BodyPilotsCreatePilotSecrets,
22-
BodyPilotsRegisterNewPilotsToDb,
2323
GroupInfo,
2424
HTTPValidationError,
2525
HeartbeatData,
2626
InitiateDeviceFlowResponse,
2727
InsertedJob,
2828
JobCommand,
29-
JobSearchParams,
30-
JobSearchParamsSearchItem,
3129
JobStatusUpdate,
3230
JobSummaryParams,
3331
JobSummaryParamsSearchItem,
@@ -37,12 +35,14 @@
3735
PilotFieldsMapping,
3836
PilotSecretsInfo,
3937
PilotStampInfo,
40-
ResponsePilotsRegisterNewPilotsToDb,
38+
ResponsePilotsAddPilotStamps,
4139
SandboxDownloadResponse,
4240
SandboxInfo,
4341
SandboxUploadResponse,
4442
ScalarSearchSpec,
4543
ScalarSearchSpecValue,
44+
SearchParams,
45+
SearchParamsSearchItem,
4646
SetJobStatusReturn,
4747
SetJobStatusReturnSuccess,
4848
SortSpec,
@@ -75,18 +75,16 @@
7575
"BodyAuthGetOidcTokenGrantType",
7676
"BodyAuthPilotLogin",
7777
"BodyAuthRefreshPilotTokens",
78+
"BodyPilotsAddPilotStamps",
7879
"BodyPilotsAssociatePilotWithJobs",
7980
"BodyPilotsAssociatePilotsWithSecrets",
8081
"BodyPilotsCreatePilotSecrets",
81-
"BodyPilotsRegisterNewPilotsToDb",
8282
"GroupInfo",
8383
"HTTPValidationError",
8484
"HeartbeatData",
8585
"InitiateDeviceFlowResponse",
8686
"InsertedJob",
8787
"JobCommand",
88-
"JobSearchParams",
89-
"JobSearchParamsSearchItem",
9088
"JobStatusUpdate",
9189
"JobSummaryParams",
9290
"JobSummaryParamsSearchItem",
@@ -96,12 +94,14 @@
9694
"PilotFieldsMapping",
9795
"PilotSecretsInfo",
9896
"PilotStampInfo",
99-
"ResponsePilotsRegisterNewPilotsToDb",
97+
"ResponsePilotsAddPilotStamps",
10098
"SandboxDownloadResponse",
10199
"SandboxInfo",
102100
"SandboxUploadResponse",
103101
"ScalarSearchSpec",
104102
"ScalarSearchSpecValue",
103+
"SearchParams",
104+
"SearchParamsSearchItem",
105105
"SetJobStatusReturn",
106106
"SetJobStatusReturnSuccess",
107107
"SortSpec",

diracx-client/src/diracx/client/_generated/models/_models.py

Lines changed: 126 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,76 @@ def __init__(self, *, refresh_token: str, **kwargs: Any) -> None:
153153
self.refresh_token = refresh_token
154154

155155

156+
class BodyPilotsAddPilotStamps(_serialization.Model):
157+
"""Body_pilots_add_pilot_stamps.
158+
159+
All required parameters must be populated in order to send to server.
160+
161+
:ivar pilot_stamps: List of the pilot stamps we want to add to the db. Required.
162+
:vartype pilot_stamps: list[str]
163+
:ivar vo: Virtual Organisation associated with the inserted pilots. Required.
164+
:vartype vo: str
165+
:ivar grid_type: Grid type of the pilots.
166+
:vartype grid_type: str
167+
:ivar pilot_references: Association of a pilot reference with a pilot stamp.
168+
:vartype pilot_references: dict[str, any]
169+
:ivar generate_secrets: Boolean to allow secret creation or not.
170+
:vartype generate_secrets: bool
171+
:ivar pilot_secret_use_count_max: Number of times we can use a secret.
172+
:vartype pilot_secret_use_count_max: int
173+
"""
174+
175+
_validation = {
176+
"pilot_stamps": {"required": True},
177+
"vo": {"required": True},
178+
}
179+
180+
_attribute_map = {
181+
"pilot_stamps": {"key": "pilot_stamps", "type": "[str]"},
182+
"vo": {"key": "vo", "type": "str"},
183+
"grid_type": {"key": "grid_type", "type": "str"},
184+
"pilot_references": {"key": "pilot_references", "type": "{object}"},
185+
"generate_secrets": {"key": "generate_secrets", "type": "bool"},
186+
"pilot_secret_use_count_max": {
187+
"key": "pilot_secret_use_count_max",
188+
"type": "int",
189+
},
190+
}
191+
192+
def __init__(
193+
self,
194+
*,
195+
pilot_stamps: List[str],
196+
vo: str,
197+
grid_type: str = "Dirac",
198+
pilot_references: Optional[Dict[str, Any]] = None,
199+
generate_secrets: bool = True,
200+
pilot_secret_use_count_max: int = 1,
201+
**kwargs: Any,
202+
) -> None:
203+
"""
204+
:keyword pilot_stamps: List of the pilot stamps we want to add to the db. Required.
205+
:paramtype pilot_stamps: list[str]
206+
:keyword vo: Virtual Organisation associated with the inserted pilots. Required.
207+
:paramtype vo: str
208+
:keyword grid_type: Grid type of the pilots.
209+
:paramtype grid_type: str
210+
:keyword pilot_references: Association of a pilot reference with a pilot stamp.
211+
:paramtype pilot_references: dict[str, any]
212+
:keyword generate_secrets: Boolean to allow secret creation or not.
213+
:paramtype generate_secrets: bool
214+
:keyword pilot_secret_use_count_max: Number of times we can use a secret.
215+
:paramtype pilot_secret_use_count_max: int
216+
"""
217+
super().__init__(**kwargs)
218+
self.pilot_stamps = pilot_stamps
219+
self.vo = vo
220+
self.grid_type = grid_type
221+
self.pilot_references = pilot_references
222+
self.generate_secrets = generate_secrets
223+
self.pilot_secret_use_count_max = pilot_secret_use_count_max
224+
225+
156226
class BodyPilotsAssociatePilotsWithSecrets(_serialization.Model):
157227
"""Body_pilots_associate_pilots_with_secrets.
158228
@@ -283,76 +353,6 @@ def __init__(
283353
self.pilot_secret_use_count_max = pilot_secret_use_count_max
284354

285355

286-
class BodyPilotsRegisterNewPilotsToDb(_serialization.Model):
287-
"""Body_pilots_register_new_pilots_to_db.
288-
289-
All required parameters must be populated in order to send to server.
290-
291-
:ivar pilot_stamps: List of the pilot stamps we want to add to the db. Required.
292-
:vartype pilot_stamps: list[str]
293-
:ivar vo: Virtual Organisation associated with the inserted pilots. Required.
294-
:vartype vo: str
295-
:ivar grid_type: Grid type of the pilots.
296-
:vartype grid_type: str
297-
:ivar pilot_references: Association of a pilot reference with a pilot stamp.
298-
:vartype pilot_references: dict[str, any]
299-
:ivar generate_secrets: Boolean to allow secret creation or not.
300-
:vartype generate_secrets: bool
301-
:ivar pilot_secret_use_count_max: Number of times we can use a secret.
302-
:vartype pilot_secret_use_count_max: int
303-
"""
304-
305-
_validation = {
306-
"pilot_stamps": {"required": True},
307-
"vo": {"required": True},
308-
}
309-
310-
_attribute_map = {
311-
"pilot_stamps": {"key": "pilot_stamps", "type": "[str]"},
312-
"vo": {"key": "vo", "type": "str"},
313-
"grid_type": {"key": "grid_type", "type": "str"},
314-
"pilot_references": {"key": "pilot_references", "type": "{object}"},
315-
"generate_secrets": {"key": "generate_secrets", "type": "bool"},
316-
"pilot_secret_use_count_max": {
317-
"key": "pilot_secret_use_count_max",
318-
"type": "int",
319-
},
320-
}
321-
322-
def __init__(
323-
self,
324-
*,
325-
pilot_stamps: List[str],
326-
vo: str,
327-
grid_type: str = "Dirac",
328-
pilot_references: Optional[Dict[str, Any]] = None,
329-
generate_secrets: bool = True,
330-
pilot_secret_use_count_max: int = 1,
331-
**kwargs: Any,
332-
) -> None:
333-
"""
334-
:keyword pilot_stamps: List of the pilot stamps we want to add to the db. Required.
335-
:paramtype pilot_stamps: list[str]
336-
:keyword vo: Virtual Organisation associated with the inserted pilots. Required.
337-
:paramtype vo: str
338-
:keyword grid_type: Grid type of the pilots.
339-
:paramtype grid_type: str
340-
:keyword pilot_references: Association of a pilot reference with a pilot stamp.
341-
:paramtype pilot_references: dict[str, any]
342-
:keyword generate_secrets: Boolean to allow secret creation or not.
343-
:paramtype generate_secrets: bool
344-
:keyword pilot_secret_use_count_max: Number of times we can use a secret.
345-
:paramtype pilot_secret_use_count_max: int
346-
"""
347-
super().__init__(**kwargs)
348-
self.pilot_stamps = pilot_stamps
349-
self.vo = vo
350-
self.grid_type = grid_type
351-
self.pilot_references = pilot_references
352-
self.generate_secrets = generate_secrets
353-
self.pilot_secret_use_count_max = pilot_secret_use_count_max
354-
355-
356356
class GroupInfo(_serialization.Model):
357357
"""GroupInfo.
358358
@@ -635,56 +635,6 @@ def __init__(
635635
self.arguments = arguments
636636

637637

638-
class JobSearchParams(_serialization.Model):
639-
"""JobSearchParams.
640-
641-
:ivar parameters: Parameters.
642-
:vartype parameters: list[str]
643-
:ivar search: Search.
644-
:vartype search: list[~_generated.models.JobSearchParamsSearchItem]
645-
:ivar sort: Sort.
646-
:vartype sort: list[~_generated.models.SortSpec]
647-
:ivar distinct: Distinct.
648-
:vartype distinct: bool
649-
"""
650-
651-
_attribute_map = {
652-
"parameters": {"key": "parameters", "type": "[str]"},
653-
"search": {"key": "search", "type": "[JobSearchParamsSearchItem]"},
654-
"sort": {"key": "sort", "type": "[SortSpec]"},
655-
"distinct": {"key": "distinct", "type": "bool"},
656-
}
657-
658-
def __init__(
659-
self,
660-
*,
661-
parameters: Optional[List[str]] = None,
662-
search: List["_models.JobSearchParamsSearchItem"] = [],
663-
sort: List["_models.SortSpec"] = [],
664-
distinct: bool = False,
665-
**kwargs: Any,
666-
) -> None:
667-
"""
668-
:keyword parameters: Parameters.
669-
:paramtype parameters: list[str]
670-
:keyword search: Search.
671-
:paramtype search: list[~_generated.models.JobSearchParamsSearchItem]
672-
:keyword sort: Sort.
673-
:paramtype sort: list[~_generated.models.SortSpec]
674-
:keyword distinct: Distinct.
675-
:paramtype distinct: bool
676-
"""
677-
super().__init__(**kwargs)
678-
self.parameters = parameters
679-
self.search = search
680-
self.sort = sort
681-
self.distinct = distinct
682-
683-
684-
class JobSearchParamsSearchItem(_serialization.Model):
685-
"""JobSearchParamsSearchItem."""
686-
687-
688638
class JobStatusUpdate(_serialization.Model):
689639
"""JobStatusUpdate.
690640
@@ -1026,7 +976,7 @@ class PilotFieldsMapping(_serialization.Model):
1026976
:ivar accounting_sent: Accountingsent.
1027977
:vartype accounting_sent: bool
1028978
:ivar current_job_id: Currentjobid.
1029-
:vartype current_job_id: bool
979+
:vartype current_job_id: int
1030980
"""
1031981

1032982
_validation = {
@@ -1043,7 +993,7 @@ class PilotFieldsMapping(_serialization.Model):
1043993
"grid_site": {"key": "GridSite", "type": "str"},
1044994
"grid_type": {"key": "GridType", "type": "str"},
1045995
"accounting_sent": {"key": "AccountingSent", "type": "bool"},
1046-
"current_job_id": {"key": "CurrentJobID", "type": "bool"},
996+
"current_job_id": {"key": "CurrentJobID", "type": "int"},
1047997
}
1048998

1049999
def __init__(
@@ -1058,7 +1008,7 @@ def __init__(
10581008
grid_site: Optional[str] = None,
10591009
grid_type: Optional[str] = None,
10601010
accounting_sent: Optional[bool] = None,
1061-
current_job_id: Optional[bool] = None,
1011+
current_job_id: Optional[int] = None,
10621012
**kwargs: Any,
10631013
) -> None:
10641014
"""
@@ -1082,7 +1032,7 @@ def __init__(
10821032
:keyword accounting_sent: Accountingsent.
10831033
:paramtype accounting_sent: bool
10841034
:keyword current_job_id: Currentjobid.
1085-
:paramtype current_job_id: bool
1035+
:paramtype current_job_id: int
10861036
"""
10871037
super().__init__(**kwargs)
10881038
self.pilot_stamp = pilot_stamp
@@ -1158,8 +1108,8 @@ def __init__(self, *, pilot_stamp: str, **kwargs: Any) -> None:
11581108
self.pilot_stamp = pilot_stamp
11591109

11601110

1161-
class ResponsePilotsRegisterNewPilotsToDb(_serialization.Model):
1162-
"""Response Pilots Register New Pilots To Db."""
1111+
class ResponsePilotsAddPilotStamps(_serialization.Model):
1112+
"""Response Pilots Add Pilot Stamps."""
11631113

11641114

11651115
class SandboxDownloadResponse(_serialization.Model):
@@ -1348,6 +1298,56 @@ class ScalarSearchSpecValue(_serialization.Model):
13481298
"""Value."""
13491299

13501300

1301+
class SearchParams(_serialization.Model):
1302+
"""SearchParams.
1303+
1304+
:ivar parameters: Parameters.
1305+
:vartype parameters: list[str]
1306+
:ivar search: Search.
1307+
:vartype search: list[~_generated.models.SearchParamsSearchItem]
1308+
:ivar sort: Sort.
1309+
:vartype sort: list[~_generated.models.SortSpec]
1310+
:ivar distinct: Distinct.
1311+
:vartype distinct: bool
1312+
"""
1313+
1314+
_attribute_map = {
1315+
"parameters": {"key": "parameters", "type": "[str]"},
1316+
"search": {"key": "search", "type": "[SearchParamsSearchItem]"},
1317+
"sort": {"key": "sort", "type": "[SortSpec]"},
1318+
"distinct": {"key": "distinct", "type": "bool"},
1319+
}
1320+
1321+
def __init__(
1322+
self,
1323+
*,
1324+
parameters: Optional[List[str]] = None,
1325+
search: List["_models.SearchParamsSearchItem"] = [],
1326+
sort: List["_models.SortSpec"] = [],
1327+
distinct: bool = False,
1328+
**kwargs: Any,
1329+
) -> None:
1330+
"""
1331+
:keyword parameters: Parameters.
1332+
:paramtype parameters: list[str]
1333+
:keyword search: Search.
1334+
:paramtype search: list[~_generated.models.SearchParamsSearchItem]
1335+
:keyword sort: Sort.
1336+
:paramtype sort: list[~_generated.models.SortSpec]
1337+
:keyword distinct: Distinct.
1338+
:paramtype distinct: bool
1339+
"""
1340+
super().__init__(**kwargs)
1341+
self.parameters = parameters
1342+
self.search = search
1343+
self.sort = sort
1344+
self.distinct = distinct
1345+
1346+
1347+
class SearchParamsSearchItem(_serialization.Model):
1348+
"""SearchParamsSearchItem."""
1349+
1350+
13511351
class SetJobStatusReturn(_serialization.Model):
13521352
"""SetJobStatusReturn.
13531353

0 commit comments

Comments
 (0)