Skip to content

Commit 84e88b3

Browse files
committed
[QI2-1397] Pop batch job with id
1 parent ec88924 commit 84e88b3

File tree

4 files changed

+44
-21
lines changed

4 files changed

+44
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ All URIs are relative to _http://localhost_
9090
| _BatchJobsApi_ | [**peek_batch_job_batch_jobs_peek_patch**](compute_api_client/docs/BatchJobsApi.md#peek_batch_job_batch_jobs_peek_patch) | **PATCH** /batch_jobs/peek | Peek batch job |
9191
| _BatchJobsApi_ | [**pop_batch_job_batch_jobs_pop_patch**](compute_api_client/docs/BatchJobsApi.md#pop_batch_job_batch_jobs_pop_patch) | **PATCH** /batch_jobs/pop | Take batch job |
9292
| _BatchJobsApi_ | [**read_batch_jobs_batch_jobs_get**](compute_api_client/docs/BatchJobsApi.md#read_batch_jobs_batch_jobs_get) | **GET** /batch_jobs | List batch jobs |
93-
| _BatchJobsApi_ | [**unpop_batch_job_batch_jobs_unpop_patch**](compute_api_client/docs/BatchJobsApi.md#unpop_batch_job_batch_jobs_unpop_patch) | **PATCH** /batch_jobs/unpop | Take batch job |
93+
| _BatchJobsApi_ | [**unpop_batch_job_batch_jobs_id_unpop_patch**](compute_api_client/docs/BatchJobsApi.md#unpop_batch_job_batch_jobs_id_unpop_patch) | **PATCH** /batch_jobs/{id}/unpop | Take batch job |
9494
| _CommitsApi_ | [**compile_commit_commits_id_compile_post**](compute_api_client/docs/CommitsApi.md#compile_commit_commits_id_compile_post) | **POST** /commits/{id}/compile | Compile file in a commit |
9595
| _CommitsApi_ | [**create_commit_commits_post**](compute_api_client/docs/CommitsApi.md#create_commit_commits_post) | **POST** /commits | Create commit |
9696
| _CommitsApi_ | [**delete_commit_commits_id_delete**](compute_api_client/docs/CommitsApi.md#delete_commit_commits_id_delete) | **DELETE** /commits/{id} | Destroy commit |
@@ -228,7 +228,7 @@ Authentication schemes defined for the API: <a id="user_bearer"></a>
228228

229229
- **Type**: OAuth
230230
- **Flow**: accessCode
231-
- **Authorization URL**: https://quantum-inspire-staging.eu.auth0.com/authorize
231+
- **Authorization URL**: https://auth.qi2.quantum-inspire.com/realms/oidc_development/protocol/openid-connect/auth
232232
- **Scopes**: N/A
233233

234234
<a id="backend"></a>

compute_api_client/api/batch_jobs_api.py

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,8 +1975,9 @@ def _read_batch_jobs_batch_jobs_get_serialize(
19751975

19761976

19771977
@validate_call
1978-
async def unpop_batch_job_batch_jobs_unpop_patch(
1978+
async def unpop_batch_job_batch_jobs_id_unpop_patch(
19791979
self,
1980+
id: StrictInt,
19801981
_request_timeout: Union[
19811982
None,
19821983
Annotated[StrictFloat, Field(gt=0)],
@@ -1994,6 +1995,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch(
19941995
19951996
Unclaim batch job.
19961997
1998+
:param id: (required)
1999+
:type id: int
19972000
:param _request_timeout: timeout setting for this request. If one
19982001
number provided, it will be total request
19992002
timeout. It can also be a pair (tuple) of
@@ -2016,7 +2019,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch(
20162019
:return: Returns the result object.
20172020
""" # noqa: E501
20182021

2019-
_param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2022+
_param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2023+
id=id,
20202024
_request_auth=_request_auth,
20212025
_content_type=_content_type,
20222026
_headers=_headers,
@@ -2025,7 +2029,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch(
20252029

20262030
_response_types_map: Dict[str, Optional[str]] = {
20272031
'200': "BatchJob",
2028-
'404': "HTTPNotFoundError"
2032+
'404': "HTTPNotFoundError",
2033+
'422': "HTTPValidationError"
20292034

20302035
}
20312036
response_data = await self.api_client.call_api(
@@ -2040,8 +2045,9 @@ async def unpop_batch_job_batch_jobs_unpop_patch(
20402045

20412046

20422047
@validate_call
2043-
async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
2048+
async def unpop_batch_job_batch_jobs_id_unpop_patch_with_http_info(
20442049
self,
2050+
id: StrictInt,
20452051
_request_timeout: Union[
20462052
None,
20472053
Annotated[StrictFloat, Field(gt=0)],
@@ -2059,6 +2065,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
20592065
20602066
Unclaim batch job.
20612067
2068+
:param id: (required)
2069+
:type id: int
20622070
:param _request_timeout: timeout setting for this request. If one
20632071
number provided, it will be total request
20642072
timeout. It can also be a pair (tuple) of
@@ -2081,7 +2089,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
20812089
:return: Returns the result object.
20822090
""" # noqa: E501
20832091

2084-
_param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2092+
_param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2093+
id=id,
20852094
_request_auth=_request_auth,
20862095
_content_type=_content_type,
20872096
_headers=_headers,
@@ -2090,7 +2099,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
20902099

20912100
_response_types_map: Dict[str, Optional[str]] = {
20922101
'200': "BatchJob",
2093-
'404': "HTTPNotFoundError"
2102+
'404': "HTTPNotFoundError",
2103+
'422': "HTTPValidationError"
20942104

20952105
}
20962106
response_data = await self.api_client.call_api(
@@ -2105,8 +2115,9 @@ async def unpop_batch_job_batch_jobs_unpop_patch_with_http_info(
21052115

21062116

21072117
@validate_call
2108-
async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
2118+
async def unpop_batch_job_batch_jobs_id_unpop_patch_without_preload_content(
21092119
self,
2120+
id: StrictInt,
21102121
_request_timeout: Union[
21112122
None,
21122123
Annotated[StrictFloat, Field(gt=0)],
@@ -2124,6 +2135,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
21242135
21252136
Unclaim batch job.
21262137
2138+
:param id: (required)
2139+
:type id: int
21272140
:param _request_timeout: timeout setting for this request. If one
21282141
number provided, it will be total request
21292142
timeout. It can also be a pair (tuple) of
@@ -2146,7 +2159,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
21462159
:return: Returns the result object.
21472160
""" # noqa: E501
21482161

2149-
_param = self._unpop_batch_job_batch_jobs_unpop_patch_serialize(
2162+
_param = self._unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
2163+
id=id,
21502164
_request_auth=_request_auth,
21512165
_content_type=_content_type,
21522166
_headers=_headers,
@@ -2155,7 +2169,8 @@ async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
21552169

21562170
_response_types_map: Dict[str, Optional[str]] = {
21572171
'200': "BatchJob",
2158-
'404': "HTTPNotFoundError"
2172+
'404': "HTTPNotFoundError",
2173+
'422': "HTTPValidationError"
21592174

21602175
}
21612176
response_data = await self.api_client.call_api(
@@ -2165,8 +2180,9 @@ async def unpop_batch_job_batch_jobs_unpop_patch_without_preload_content(
21652180
return response_data.response
21662181

21672182

2168-
def _unpop_batch_job_batch_jobs_unpop_patch_serialize(
2183+
def _unpop_batch_job_batch_jobs_id_unpop_patch_serialize(
21692184
self,
2185+
id,
21702186
_request_auth,
21712187
_content_type,
21722188
_headers,
@@ -2187,6 +2203,8 @@ def _unpop_batch_job_batch_jobs_unpop_patch_serialize(
21872203
_body_params: Optional[bytes] = None
21882204

21892205
# process the path parameters
2206+
if id is not None:
2207+
_path_params['id'] = id
21902208
# process the query parameters
21912209
# process the header parameters
21922210
# process the form parameters
@@ -2208,7 +2226,7 @@ def _unpop_batch_job_batch_jobs_unpop_patch_serialize(
22082226

22092227
return self.api_client.param_serialize(
22102228
method='PATCH',
2211-
resource_path='/batch_jobs/unpop',
2229+
resource_path='/batch_jobs/{id}/unpop',
22122230
path_params=_path_params,
22132231
query_params=_query_params,
22142232
header_params=_header_params,

compute_api_client/docs/BatchJobsApi.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010
[**peek_batch_job_batch_jobs_peek_patch**](BatchJobsApi.md#peek_batch_job_batch_jobs_peek_patch) | **PATCH** /batch_jobs/peek | Peek batch job
1111
[**pop_batch_job_batch_jobs_pop_patch**](BatchJobsApi.md#pop_batch_job_batch_jobs_pop_patch) | **PATCH** /batch_jobs/pop | Take batch job
1212
[**read_batch_jobs_batch_jobs_get**](BatchJobsApi.md#read_batch_jobs_batch_jobs_get) | **GET** /batch_jobs | List batch jobs
13-
[**unpop_batch_job_batch_jobs_unpop_patch**](BatchJobsApi.md#unpop_batch_job_batch_jobs_unpop_patch) | **PATCH** /batch_jobs/unpop | Take batch job
13+
[**unpop_batch_job_batch_jobs_id_unpop_patch**](BatchJobsApi.md#unpop_batch_job_batch_jobs_id_unpop_patch) | **PATCH** /batch_jobs/{id}/unpop | Take batch job
1414

1515

1616
# **create_batch_job_batch_jobs_post**
@@ -511,8 +511,8 @@ Name | Type | Description | Notes
511511

512512
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
513513

514-
# **unpop_batch_job_batch_jobs_unpop_patch**
515-
> BatchJob unpop_batch_job_batch_jobs_unpop_patch()
514+
# **unpop_batch_job_batch_jobs_id_unpop_patch**
515+
> BatchJob unpop_batch_job_batch_jobs_id_unpop_patch(id)
516516
517517
Take batch job
518518

@@ -550,20 +550,24 @@ configuration.api_key['backend'] = os.environ["API_KEY"]
550550
async with compute_api_client.ApiClient(configuration) as api_client:
551551
# Create an instance of the API class
552552
api_instance = compute_api_client.BatchJobsApi(api_client)
553+
id = 56 # int |
553554

554555
try:
555556
# Take batch job
556-
api_response = await api_instance.unpop_batch_job_batch_jobs_unpop_patch()
557-
print("The response of BatchJobsApi->unpop_batch_job_batch_jobs_unpop_patch:\n")
557+
api_response = await api_instance.unpop_batch_job_batch_jobs_id_unpop_patch(id)
558+
print("The response of BatchJobsApi->unpop_batch_job_batch_jobs_id_unpop_patch:\n")
558559
pprint(api_response)
559560
except Exception as e:
560-
print("Exception when calling BatchJobsApi->unpop_batch_job_batch_jobs_unpop_patch: %s\n" % e)
561+
print("Exception when calling BatchJobsApi->unpop_batch_job_batch_jobs_id_unpop_patch: %s\n" % e)
561562
```
562563

563564

564565

565566
### Parameters
566-
This endpoint does not need any parameter.
567+
568+
Name | Type | Description | Notes
569+
------------- | ------------- | ------------- | -------------
570+
**id** | **int**| |
567571

568572
### Return type
569573

@@ -583,6 +587,7 @@ This endpoint does not need any parameter.
583587
|-------------|-------------|------------------|
584588
**200** | Successful Response | - |
585589
**404** | Not Found | - |
590+
**422** | Validation Error | - |
586591

587592
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
588593

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "qi-compute-api-client"
3-
version = "0.47.0"
3+
version = "0.48.0"
44
description = "An API client for the Compute Job Manager of Quantum Inspire."
55
license = "Apache-2.0"
66
authors = ["Quantum Inspire <[email protected]>"]

0 commit comments

Comments
 (0)