stackit-git 0.5.1__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stackit_git-0.5.1 → stackit_git-0.7.0}/PKG-INFO +1 -1
- {stackit_git-0.5.1 → stackit_git-0.7.0}/pyproject.toml +1 -1
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/__init__.py +10 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/api/default_api.py +259 -20
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/__init__.py +4 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/create_instance_payload.py +3 -13
- stackit_git-0.7.0/src/stackit/git/models/instance_flavor.py +37 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/list_flavors.py +1 -1
- stackit_git-0.7.0/src/stackit/git/models/list_runner_labels.py +99 -0
- stackit_git-0.7.0/src/stackit/git/models/patch_instance_payload.py +89 -0
- stackit_git-0.7.0/src/stackit/git/models/runner_label.py +86 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/LICENSE.md +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/NOTICE.txt +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/README.md +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/api/__init__.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/api_client.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/api_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/configuration.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/exceptions.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/flavor.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/generic_error_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/instance.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/internal_server_error_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/list_instances.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/patch_operation.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/unauthorized_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/py.typed +0 -0
- {stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/rest.py +0 -0
|
@@ -33,10 +33,14 @@ __all__ = [
|
|
|
33
33
|
"Flavor",
|
|
34
34
|
"GenericErrorResponse",
|
|
35
35
|
"Instance",
|
|
36
|
+
"InstanceFlavor",
|
|
36
37
|
"InternalServerErrorResponse",
|
|
37
38
|
"ListFlavors",
|
|
38
39
|
"ListInstances",
|
|
40
|
+
"ListRunnerLabels",
|
|
41
|
+
"PatchInstancePayload",
|
|
39
42
|
"PatchOperation",
|
|
43
|
+
"RunnerLabel",
|
|
40
44
|
"UnauthorizedResponse",
|
|
41
45
|
]
|
|
42
46
|
|
|
@@ -63,12 +67,18 @@ from stackit.git.models.generic_error_response import (
|
|
|
63
67
|
GenericErrorResponse as GenericErrorResponse,
|
|
64
68
|
)
|
|
65
69
|
from stackit.git.models.instance import Instance as Instance
|
|
70
|
+
from stackit.git.models.instance_flavor import InstanceFlavor as InstanceFlavor
|
|
66
71
|
from stackit.git.models.internal_server_error_response import (
|
|
67
72
|
InternalServerErrorResponse as InternalServerErrorResponse,
|
|
68
73
|
)
|
|
69
74
|
from stackit.git.models.list_flavors import ListFlavors as ListFlavors
|
|
70
75
|
from stackit.git.models.list_instances import ListInstances as ListInstances
|
|
76
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels as ListRunnerLabels
|
|
77
|
+
from stackit.git.models.patch_instance_payload import (
|
|
78
|
+
PatchInstancePayload as PatchInstancePayload,
|
|
79
|
+
)
|
|
71
80
|
from stackit.git.models.patch_operation import PatchOperation as PatchOperation
|
|
81
|
+
from stackit.git.models.runner_label import RunnerLabel as RunnerLabel
|
|
72
82
|
from stackit.git.models.unauthorized_response import (
|
|
73
83
|
UnauthorizedResponse as UnauthorizedResponse,
|
|
74
84
|
)
|
|
@@ -30,7 +30,8 @@ from stackit.git.models.create_instance_payload import CreateInstancePayload
|
|
|
30
30
|
from stackit.git.models.instance import Instance
|
|
31
31
|
from stackit.git.models.list_flavors import ListFlavors
|
|
32
32
|
from stackit.git.models.list_instances import ListInstances
|
|
33
|
-
from stackit.git.models.
|
|
33
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels
|
|
34
|
+
from stackit.git.models.patch_instance_payload import PatchInstancePayload
|
|
34
35
|
from stackit.git.rest import RESTResponseType
|
|
35
36
|
|
|
36
37
|
|
|
@@ -1302,6 +1303,244 @@ class DefaultApi:
|
|
|
1302
1303
|
_request_auth=_request_auth,
|
|
1303
1304
|
)
|
|
1304
1305
|
|
|
1306
|
+
@validate_call
|
|
1307
|
+
def list_runner_labels(
|
|
1308
|
+
self,
|
|
1309
|
+
project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="Project identifier.")],
|
|
1310
|
+
_request_timeout: Union[
|
|
1311
|
+
None,
|
|
1312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1313
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1314
|
+
] = None,
|
|
1315
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1316
|
+
_content_type: Optional[StrictStr] = None,
|
|
1317
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1318
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1319
|
+
) -> ListRunnerLabels:
|
|
1320
|
+
"""Returns the details for the given STACKIT Git RunnerLabels.
|
|
1321
|
+
|
|
1322
|
+
Type of runners we can use for running jobs.
|
|
1323
|
+
|
|
1324
|
+
:param project_id: Project identifier. (required)
|
|
1325
|
+
:type project_id: str
|
|
1326
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1327
|
+
number provided, it will be total request
|
|
1328
|
+
timeout. It can also be a pair (tuple) of
|
|
1329
|
+
(connection, read) timeouts.
|
|
1330
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1331
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1332
|
+
request; this effectively ignores the
|
|
1333
|
+
authentication in the spec for a single request.
|
|
1334
|
+
:type _request_auth: dict, optional
|
|
1335
|
+
:param _content_type: force content-type for the request.
|
|
1336
|
+
:type _content_type: str, Optional
|
|
1337
|
+
:param _headers: set to override the headers for a single
|
|
1338
|
+
request; this effectively ignores the headers
|
|
1339
|
+
in the spec for a single request.
|
|
1340
|
+
:type _headers: dict, optional
|
|
1341
|
+
:param _host_index: set to override the host_index for a single
|
|
1342
|
+
request; this effectively ignores the host_index
|
|
1343
|
+
in the spec for a single request.
|
|
1344
|
+
:type _host_index: int, optional
|
|
1345
|
+
:return: Returns the result object.
|
|
1346
|
+
""" # noqa: E501
|
|
1347
|
+
|
|
1348
|
+
_param = self._list_runner_labels_serialize(
|
|
1349
|
+
project_id=project_id,
|
|
1350
|
+
_request_auth=_request_auth,
|
|
1351
|
+
_content_type=_content_type,
|
|
1352
|
+
_headers=_headers,
|
|
1353
|
+
_host_index=_host_index,
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1357
|
+
"200": "ListRunnerLabels",
|
|
1358
|
+
"400": "GenericErrorResponse",
|
|
1359
|
+
"401": "UnauthorizedResponse",
|
|
1360
|
+
"404": None,
|
|
1361
|
+
"500": "GenericErrorResponse",
|
|
1362
|
+
}
|
|
1363
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1364
|
+
response_data.read()
|
|
1365
|
+
return self.api_client.response_deserialize(
|
|
1366
|
+
response_data=response_data,
|
|
1367
|
+
response_types_map=_response_types_map,
|
|
1368
|
+
).data
|
|
1369
|
+
|
|
1370
|
+
@validate_call
|
|
1371
|
+
def list_runner_labels_with_http_info(
|
|
1372
|
+
self,
|
|
1373
|
+
project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="Project identifier.")],
|
|
1374
|
+
_request_timeout: Union[
|
|
1375
|
+
None,
|
|
1376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1377
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1378
|
+
] = None,
|
|
1379
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1380
|
+
_content_type: Optional[StrictStr] = None,
|
|
1381
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1382
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1383
|
+
) -> ApiResponse[ListRunnerLabels]:
|
|
1384
|
+
"""Returns the details for the given STACKIT Git RunnerLabels.
|
|
1385
|
+
|
|
1386
|
+
Type of runners we can use for running jobs.
|
|
1387
|
+
|
|
1388
|
+
:param project_id: Project identifier. (required)
|
|
1389
|
+
:type project_id: str
|
|
1390
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1391
|
+
number provided, it will be total request
|
|
1392
|
+
timeout. It can also be a pair (tuple) of
|
|
1393
|
+
(connection, read) timeouts.
|
|
1394
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1395
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1396
|
+
request; this effectively ignores the
|
|
1397
|
+
authentication in the spec for a single request.
|
|
1398
|
+
:type _request_auth: dict, optional
|
|
1399
|
+
:param _content_type: force content-type for the request.
|
|
1400
|
+
:type _content_type: str, Optional
|
|
1401
|
+
:param _headers: set to override the headers for a single
|
|
1402
|
+
request; this effectively ignores the headers
|
|
1403
|
+
in the spec for a single request.
|
|
1404
|
+
:type _headers: dict, optional
|
|
1405
|
+
:param _host_index: set to override the host_index for a single
|
|
1406
|
+
request; this effectively ignores the host_index
|
|
1407
|
+
in the spec for a single request.
|
|
1408
|
+
:type _host_index: int, optional
|
|
1409
|
+
:return: Returns the result object.
|
|
1410
|
+
""" # noqa: E501
|
|
1411
|
+
|
|
1412
|
+
_param = self._list_runner_labels_serialize(
|
|
1413
|
+
project_id=project_id,
|
|
1414
|
+
_request_auth=_request_auth,
|
|
1415
|
+
_content_type=_content_type,
|
|
1416
|
+
_headers=_headers,
|
|
1417
|
+
_host_index=_host_index,
|
|
1418
|
+
)
|
|
1419
|
+
|
|
1420
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1421
|
+
"200": "ListRunnerLabels",
|
|
1422
|
+
"400": "GenericErrorResponse",
|
|
1423
|
+
"401": "UnauthorizedResponse",
|
|
1424
|
+
"404": None,
|
|
1425
|
+
"500": "GenericErrorResponse",
|
|
1426
|
+
}
|
|
1427
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1428
|
+
response_data.read()
|
|
1429
|
+
return self.api_client.response_deserialize(
|
|
1430
|
+
response_data=response_data,
|
|
1431
|
+
response_types_map=_response_types_map,
|
|
1432
|
+
)
|
|
1433
|
+
|
|
1434
|
+
@validate_call
|
|
1435
|
+
def list_runner_labels_without_preload_content(
|
|
1436
|
+
self,
|
|
1437
|
+
project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36, description="Project identifier.")],
|
|
1438
|
+
_request_timeout: Union[
|
|
1439
|
+
None,
|
|
1440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1441
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1442
|
+
] = None,
|
|
1443
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1444
|
+
_content_type: Optional[StrictStr] = None,
|
|
1445
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1446
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1447
|
+
) -> RESTResponseType:
|
|
1448
|
+
"""Returns the details for the given STACKIT Git RunnerLabels.
|
|
1449
|
+
|
|
1450
|
+
Type of runners we can use for running jobs.
|
|
1451
|
+
|
|
1452
|
+
:param project_id: Project identifier. (required)
|
|
1453
|
+
:type project_id: str
|
|
1454
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1455
|
+
number provided, it will be total request
|
|
1456
|
+
timeout. It can also be a pair (tuple) of
|
|
1457
|
+
(connection, read) timeouts.
|
|
1458
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1459
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1460
|
+
request; this effectively ignores the
|
|
1461
|
+
authentication in the spec for a single request.
|
|
1462
|
+
:type _request_auth: dict, optional
|
|
1463
|
+
:param _content_type: force content-type for the request.
|
|
1464
|
+
:type _content_type: str, Optional
|
|
1465
|
+
:param _headers: set to override the headers for a single
|
|
1466
|
+
request; this effectively ignores the headers
|
|
1467
|
+
in the spec for a single request.
|
|
1468
|
+
:type _headers: dict, optional
|
|
1469
|
+
:param _host_index: set to override the host_index for a single
|
|
1470
|
+
request; this effectively ignores the host_index
|
|
1471
|
+
in the spec for a single request.
|
|
1472
|
+
:type _host_index: int, optional
|
|
1473
|
+
:return: Returns the result object.
|
|
1474
|
+
""" # noqa: E501
|
|
1475
|
+
|
|
1476
|
+
_param = self._list_runner_labels_serialize(
|
|
1477
|
+
project_id=project_id,
|
|
1478
|
+
_request_auth=_request_auth,
|
|
1479
|
+
_content_type=_content_type,
|
|
1480
|
+
_headers=_headers,
|
|
1481
|
+
_host_index=_host_index,
|
|
1482
|
+
)
|
|
1483
|
+
|
|
1484
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1485
|
+
"200": "ListRunnerLabels",
|
|
1486
|
+
"400": "GenericErrorResponse",
|
|
1487
|
+
"401": "UnauthorizedResponse",
|
|
1488
|
+
"404": None,
|
|
1489
|
+
"500": "GenericErrorResponse",
|
|
1490
|
+
}
|
|
1491
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1492
|
+
return response_data.response
|
|
1493
|
+
|
|
1494
|
+
def _list_runner_labels_serialize(
|
|
1495
|
+
self,
|
|
1496
|
+
project_id,
|
|
1497
|
+
_request_auth,
|
|
1498
|
+
_content_type,
|
|
1499
|
+
_headers,
|
|
1500
|
+
_host_index,
|
|
1501
|
+
) -> RequestSerialized:
|
|
1502
|
+
|
|
1503
|
+
_host = None
|
|
1504
|
+
|
|
1505
|
+
_collection_formats: Dict[str, str] = {}
|
|
1506
|
+
|
|
1507
|
+
_path_params: Dict[str, str] = {}
|
|
1508
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1509
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1510
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1511
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1512
|
+
_body_params: Optional[bytes] = None
|
|
1513
|
+
|
|
1514
|
+
# process the path parameters
|
|
1515
|
+
if project_id is not None:
|
|
1516
|
+
_path_params["projectId"] = project_id
|
|
1517
|
+
# process the query parameters
|
|
1518
|
+
# process the header parameters
|
|
1519
|
+
# process the form parameters
|
|
1520
|
+
# process the body parameter
|
|
1521
|
+
|
|
1522
|
+
# set the HTTP header `Accept`
|
|
1523
|
+
if "Accept" not in _header_params:
|
|
1524
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1525
|
+
|
|
1526
|
+
# authentication setting
|
|
1527
|
+
_auth_settings: List[str] = []
|
|
1528
|
+
|
|
1529
|
+
return self.api_client.param_serialize(
|
|
1530
|
+
method="GET",
|
|
1531
|
+
resource_path="/v1beta/projects/{projectId}/runner-labels",
|
|
1532
|
+
path_params=_path_params,
|
|
1533
|
+
query_params=_query_params,
|
|
1534
|
+
header_params=_header_params,
|
|
1535
|
+
body=_body_params,
|
|
1536
|
+
post_params=_form_params,
|
|
1537
|
+
files=_files,
|
|
1538
|
+
auth_settings=_auth_settings,
|
|
1539
|
+
collection_formats=_collection_formats,
|
|
1540
|
+
_host=_host,
|
|
1541
|
+
_request_auth=_request_auth,
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1305
1544
|
@validate_call
|
|
1306
1545
|
def patch_instance(
|
|
1307
1546
|
self,
|
|
@@ -1309,7 +1548,7 @@ class DefaultApi:
|
|
|
1309
1548
|
instance_id: Annotated[
|
|
1310
1549
|
str, Field(min_length=36, strict=True, max_length=36, description="Instance identifier.")
|
|
1311
1550
|
],
|
|
1312
|
-
|
|
1551
|
+
patch_instance_payload: PatchInstancePayload,
|
|
1313
1552
|
_request_timeout: Union[
|
|
1314
1553
|
None,
|
|
1315
1554
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1328,8 +1567,8 @@ class DefaultApi:
|
|
|
1328
1567
|
:type project_id: str
|
|
1329
1568
|
:param instance_id: Instance identifier. (required)
|
|
1330
1569
|
:type instance_id: str
|
|
1331
|
-
:param
|
|
1332
|
-
:type
|
|
1570
|
+
:param patch_instance_payload: (required)
|
|
1571
|
+
:type patch_instance_payload: PatchInstancePayload
|
|
1333
1572
|
:param _request_timeout: timeout setting for this request. If one
|
|
1334
1573
|
number provided, it will be total request
|
|
1335
1574
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1355,7 +1594,7 @@ class DefaultApi:
|
|
|
1355
1594
|
_param = self._patch_instance_serialize(
|
|
1356
1595
|
project_id=project_id,
|
|
1357
1596
|
instance_id=instance_id,
|
|
1358
|
-
|
|
1597
|
+
patch_instance_payload=patch_instance_payload,
|
|
1359
1598
|
_request_auth=_request_auth,
|
|
1360
1599
|
_content_type=_content_type,
|
|
1361
1600
|
_headers=_headers,
|
|
@@ -1385,7 +1624,7 @@ class DefaultApi:
|
|
|
1385
1624
|
instance_id: Annotated[
|
|
1386
1625
|
str, Field(min_length=36, strict=True, max_length=36, description="Instance identifier.")
|
|
1387
1626
|
],
|
|
1388
|
-
|
|
1627
|
+
patch_instance_payload: PatchInstancePayload,
|
|
1389
1628
|
_request_timeout: Union[
|
|
1390
1629
|
None,
|
|
1391
1630
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1404,8 +1643,8 @@ class DefaultApi:
|
|
|
1404
1643
|
:type project_id: str
|
|
1405
1644
|
:param instance_id: Instance identifier. (required)
|
|
1406
1645
|
:type instance_id: str
|
|
1407
|
-
:param
|
|
1408
|
-
:type
|
|
1646
|
+
:param patch_instance_payload: (required)
|
|
1647
|
+
:type patch_instance_payload: PatchInstancePayload
|
|
1409
1648
|
:param _request_timeout: timeout setting for this request. If one
|
|
1410
1649
|
number provided, it will be total request
|
|
1411
1650
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1431,7 +1670,7 @@ class DefaultApi:
|
|
|
1431
1670
|
_param = self._patch_instance_serialize(
|
|
1432
1671
|
project_id=project_id,
|
|
1433
1672
|
instance_id=instance_id,
|
|
1434
|
-
|
|
1673
|
+
patch_instance_payload=patch_instance_payload,
|
|
1435
1674
|
_request_auth=_request_auth,
|
|
1436
1675
|
_content_type=_content_type,
|
|
1437
1676
|
_headers=_headers,
|
|
@@ -1461,7 +1700,7 @@ class DefaultApi:
|
|
|
1461
1700
|
instance_id: Annotated[
|
|
1462
1701
|
str, Field(min_length=36, strict=True, max_length=36, description="Instance identifier.")
|
|
1463
1702
|
],
|
|
1464
|
-
|
|
1703
|
+
patch_instance_payload: PatchInstancePayload,
|
|
1465
1704
|
_request_timeout: Union[
|
|
1466
1705
|
None,
|
|
1467
1706
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1480,8 +1719,8 @@ class DefaultApi:
|
|
|
1480
1719
|
:type project_id: str
|
|
1481
1720
|
:param instance_id: Instance identifier. (required)
|
|
1482
1721
|
:type instance_id: str
|
|
1483
|
-
:param
|
|
1484
|
-
:type
|
|
1722
|
+
:param patch_instance_payload: (required)
|
|
1723
|
+
:type patch_instance_payload: PatchInstancePayload
|
|
1485
1724
|
:param _request_timeout: timeout setting for this request. If one
|
|
1486
1725
|
number provided, it will be total request
|
|
1487
1726
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1507,7 +1746,7 @@ class DefaultApi:
|
|
|
1507
1746
|
_param = self._patch_instance_serialize(
|
|
1508
1747
|
project_id=project_id,
|
|
1509
1748
|
instance_id=instance_id,
|
|
1510
|
-
|
|
1749
|
+
patch_instance_payload=patch_instance_payload,
|
|
1511
1750
|
_request_auth=_request_auth,
|
|
1512
1751
|
_content_type=_content_type,
|
|
1513
1752
|
_headers=_headers,
|
|
@@ -1530,7 +1769,7 @@ class DefaultApi:
|
|
|
1530
1769
|
self,
|
|
1531
1770
|
project_id,
|
|
1532
1771
|
instance_id,
|
|
1533
|
-
|
|
1772
|
+
patch_instance_payload,
|
|
1534
1773
|
_request_auth,
|
|
1535
1774
|
_content_type,
|
|
1536
1775
|
_headers,
|
|
@@ -1539,9 +1778,7 @@ class DefaultApi:
|
|
|
1539
1778
|
|
|
1540
1779
|
_host = None
|
|
1541
1780
|
|
|
1542
|
-
_collection_formats: Dict[str, str] = {
|
|
1543
|
-
"PatchOperation": "",
|
|
1544
|
-
}
|
|
1781
|
+
_collection_formats: Dict[str, str] = {}
|
|
1545
1782
|
|
|
1546
1783
|
_path_params: Dict[str, str] = {}
|
|
1547
1784
|
_query_params: List[Tuple[str, str]] = []
|
|
@@ -1559,8 +1796,8 @@ class DefaultApi:
|
|
|
1559
1796
|
# process the header parameters
|
|
1560
1797
|
# process the form parameters
|
|
1561
1798
|
# process the body parameter
|
|
1562
|
-
if
|
|
1563
|
-
_body_params =
|
|
1799
|
+
if patch_instance_payload is not None:
|
|
1800
|
+
_body_params = patch_instance_payload
|
|
1564
1801
|
|
|
1565
1802
|
# set the HTTP header `Accept`
|
|
1566
1803
|
if "Accept" not in _header_params:
|
|
@@ -1570,7 +1807,9 @@ class DefaultApi:
|
|
|
1570
1807
|
if _content_type:
|
|
1571
1808
|
_header_params["Content-Type"] = _content_type
|
|
1572
1809
|
else:
|
|
1573
|
-
_default_content_type = self.api_client.select_header_content_type(
|
|
1810
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1811
|
+
["application/json", "application/json-patch+json"]
|
|
1812
|
+
)
|
|
1574
1813
|
if _default_content_type is not None:
|
|
1575
1814
|
_header_params["Content-Type"] = _default_content_type
|
|
1576
1815
|
|
|
@@ -19,10 +19,14 @@ from stackit.git.models.create_instance_payload import CreateInstancePayload
|
|
|
19
19
|
from stackit.git.models.flavor import Flavor
|
|
20
20
|
from stackit.git.models.generic_error_response import GenericErrorResponse
|
|
21
21
|
from stackit.git.models.instance import Instance
|
|
22
|
+
from stackit.git.models.instance_flavor import InstanceFlavor
|
|
22
23
|
from stackit.git.models.internal_server_error_response import (
|
|
23
24
|
InternalServerErrorResponse,
|
|
24
25
|
)
|
|
25
26
|
from stackit.git.models.list_flavors import ListFlavors
|
|
26
27
|
from stackit.git.models.list_instances import ListInstances
|
|
28
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels
|
|
29
|
+
from stackit.git.models.patch_instance_payload import PatchInstancePayload
|
|
27
30
|
from stackit.git.models.patch_operation import PatchOperation
|
|
31
|
+
from stackit.git.models.runner_label import RunnerLabel
|
|
28
32
|
from stackit.git.models.unauthorized_response import UnauthorizedResponse
|
|
@@ -22,6 +22,8 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
|
22
22
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
23
|
from typing_extensions import Annotated, Self
|
|
24
24
|
|
|
25
|
+
from stackit.git.models.instance_flavor import InstanceFlavor
|
|
26
|
+
|
|
25
27
|
|
|
26
28
|
class CreateInstancePayload(BaseModel):
|
|
27
29
|
"""
|
|
@@ -31,24 +33,12 @@ class CreateInstancePayload(BaseModel):
|
|
|
31
33
|
acl: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(
|
|
32
34
|
default=None, description="A list of CIDR network addresses that are allowed to access the instance."
|
|
33
35
|
)
|
|
34
|
-
flavor: Optional[
|
|
35
|
-
default=None, description="Desired instance flavor. Must be one of the defined enum values"
|
|
36
|
-
)
|
|
36
|
+
flavor: Optional[InstanceFlavor] = None
|
|
37
37
|
name: Annotated[str, Field(min_length=5, strict=True, max_length=32)] = Field(
|
|
38
38
|
description="A user chosen name to distinguish multiple STACKIT Git instances."
|
|
39
39
|
)
|
|
40
40
|
__properties: ClassVar[List[str]] = ["acl", "flavor", "name"]
|
|
41
41
|
|
|
42
|
-
@field_validator("flavor")
|
|
43
|
-
def flavor_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value is None:
|
|
46
|
-
return value
|
|
47
|
-
|
|
48
|
-
if value not in set(["git-10", "git-100"]):
|
|
49
|
-
raise ValueError("must be one of enum values ('git-10', 'git-100')")
|
|
50
|
-
return value
|
|
51
|
-
|
|
52
42
|
@field_validator("name")
|
|
53
43
|
def name_validate_regular_expression(cls, value):
|
|
54
44
|
"""Validates the regular expression"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
|
|
20
|
+
from typing_extensions import Self
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class InstanceFlavor(str, Enum):
|
|
24
|
+
"""
|
|
25
|
+
Desired instance flavor. Must be one of the defined enum values.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
allowed enum values
|
|
30
|
+
"""
|
|
31
|
+
GIT_MINUS_10 = "git-10"
|
|
32
|
+
GIT_MINUS_100 = "git-100"
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of InstanceFlavor from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.git.models.runner_label import RunnerLabel
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListRunnerLabels(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A list of STACKIT Git RunnerLabels.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
runner_labels: List[RunnerLabel] = Field(alias="runner-labels")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["runner-labels"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ListRunnerLabels from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in runner_labels (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.runner_labels:
|
|
75
|
+
for _item in self.runner_labels:
|
|
76
|
+
if _item:
|
|
77
|
+
_items.append(_item.to_dict())
|
|
78
|
+
_dict["runner-labels"] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListRunnerLabels from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate(
|
|
91
|
+
{
|
|
92
|
+
"runner-labels": (
|
|
93
|
+
[RunnerLabel.from_dict(_item) for _item in obj["runner-labels"]]
|
|
94
|
+
if obj.get("runner-labels") is not None
|
|
95
|
+
else None
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
return _obj
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PatchInstancePayload(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Properties to patch on an instance. All fields are optional.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
acl: Optional[Annotated[List[StrictStr], Field(max_length=50)]] = Field(
|
|
31
|
+
default=None, description="A list of CIDR network addresses that are allowed to access the instance."
|
|
32
|
+
)
|
|
33
|
+
__properties: ClassVar[List[str]] = ["acl"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PatchInstancePayload from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# set to None if acl (nullable) is None
|
|
73
|
+
# and model_fields_set contains the field
|
|
74
|
+
if self.acl is None and "acl" in self.model_fields_set:
|
|
75
|
+
_dict["acl"] = None
|
|
76
|
+
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of PatchInstancePayload from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({"acl": obj.get("acl")})
|
|
89
|
+
return _obj
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class RunnerLabel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Describes a STACKIT Git RunnerLabel.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
description: StrictStr = Field(description="RunnerLabel description.")
|
|
31
|
+
id: Annotated[str, Field(strict=True, max_length=36)] = Field(description="RunnerLabel id.")
|
|
32
|
+
label: Annotated[str, Field(strict=True, max_length=64)] = Field(description="RunnerLabel label.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["description", "id", "label"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of RunnerLabel from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of RunnerLabel from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate(
|
|
84
|
+
{"description": obj.get("description"), "id": obj.get("id"), "label": obj.get("label")}
|
|
85
|
+
)
|
|
86
|
+
return _obj
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_git-0.5.1 → stackit_git-0.7.0}/src/stackit/git/models/internal_server_error_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|