hyperstack 1.42.0a0__py3-none-any.whl → 1.43.0a0__py3-none-any.whl
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.
- hyperstack/__init__.py +2 -1
- hyperstack/api/clusters_api.py +317 -0
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -1
- hyperstack/models/__init__.py +1 -0
- hyperstack/models/cluster_fields.py +4 -2
- hyperstack/models/cluster_node_group_fields.py +5 -1
- hyperstack/models/create_cluster_node_group_payload.py +16 -3
- hyperstack/models/update_cluster_node_group_payload.py +90 -0
- {hyperstack-1.42.0a0.dist-info → hyperstack-1.43.0a0.dist-info}/METADATA +1 -1
- {hyperstack-1.42.0a0.dist-info → hyperstack-1.43.0a0.dist-info}/RECORD +13 -12
- {hyperstack-1.42.0a0.dist-info → hyperstack-1.43.0a0.dist-info}/WHEEL +0 -0
- {hyperstack-1.42.0a0.dist-info → hyperstack-1.43.0a0.dist-info}/top_level.txt +0 -0
hyperstack/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "v1.
|
|
17
|
+
__version__ = "v1.43.0-alpha"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from .api.calculate_api import CalculateApi
|
|
@@ -341,6 +341,7 @@ from .models.template_fields import TemplateFields
|
|
|
341
341
|
from .models.templates import Templates
|
|
342
342
|
from .models.token_based_billing_history_response import TokenBasedBillingHistoryResponse
|
|
343
343
|
from .models.uris import URIs
|
|
344
|
+
from .models.update_cluster_node_group_payload import UpdateClusterNodeGroupPayload
|
|
344
345
|
from .models.update_environment import UpdateEnvironment
|
|
345
346
|
from .models.update_keypair_name import UpdateKeypairName
|
|
346
347
|
from .models.update_keypair_name_response import UpdateKeypairNameResponse
|
hyperstack/api/clusters_api.py
CHANGED
|
@@ -33,6 +33,7 @@ from ..models.manual_reconciliation_model import ManualReconciliationModel
|
|
|
33
33
|
from ..models.master_flavors_response import MasterFlavorsResponse
|
|
34
34
|
from ..models.name_available_model import NameAvailableModel
|
|
35
35
|
from ..models.response_model import ResponseModel
|
|
36
|
+
from ..models.update_cluster_node_group_payload import UpdateClusterNodeGroupPayload
|
|
36
37
|
|
|
37
38
|
from ..api_client import ApiClient, RequestSerialized
|
|
38
39
|
from ..api_response import ApiResponse
|
|
@@ -4266,3 +4267,319 @@ class ClustersApi:
|
|
|
4266
4267
|
)
|
|
4267
4268
|
|
|
4268
4269
|
|
|
4270
|
+
|
|
4271
|
+
|
|
4272
|
+
@validate_call
|
|
4273
|
+
def update_a_node_group(
|
|
4274
|
+
self,
|
|
4275
|
+
cluster_id: StrictInt,
|
|
4276
|
+
node_group_id: StrictInt,
|
|
4277
|
+
payload: UpdateClusterNodeGroupPayload,
|
|
4278
|
+
_request_timeout: Union[
|
|
4279
|
+
None,
|
|
4280
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4281
|
+
Tuple[
|
|
4282
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4283
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4284
|
+
]
|
|
4285
|
+
] = None,
|
|
4286
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4287
|
+
_content_type: Optional[StrictStr] = None,
|
|
4288
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4289
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4290
|
+
) -> ClusterNodeGroupsCreateResponse:
|
|
4291
|
+
"""Update a node group in a cluster
|
|
4292
|
+
|
|
4293
|
+
|
|
4294
|
+
:param cluster_id: (required)
|
|
4295
|
+
:type cluster_id: int
|
|
4296
|
+
:param node_group_id: (required)
|
|
4297
|
+
:type node_group_id: int
|
|
4298
|
+
:param payload: (required)
|
|
4299
|
+
:type payload: UpdateClusterNodeGroupPayload
|
|
4300
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4301
|
+
number provided, it will be total request
|
|
4302
|
+
timeout. It can also be a pair (tuple) of
|
|
4303
|
+
(connection, read) timeouts.
|
|
4304
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4305
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4306
|
+
request; this effectively ignores the
|
|
4307
|
+
authentication in the spec for a single request.
|
|
4308
|
+
:type _request_auth: dict, optional
|
|
4309
|
+
:param _content_type: force content-type for the request.
|
|
4310
|
+
:type _content_type: str, Optional
|
|
4311
|
+
:param _headers: set to override the headers for a single
|
|
4312
|
+
request; this effectively ignores the headers
|
|
4313
|
+
in the spec for a single request.
|
|
4314
|
+
:type _headers: dict, optional
|
|
4315
|
+
:param _host_index: set to override the host_index for a single
|
|
4316
|
+
request; this effectively ignores the host_index
|
|
4317
|
+
in the spec for a single request.
|
|
4318
|
+
:type _host_index: int, optional
|
|
4319
|
+
:return: Returns the result object.
|
|
4320
|
+
""" # noqa: E501
|
|
4321
|
+
|
|
4322
|
+
_param = self._update_a_node_group_serialize(
|
|
4323
|
+
cluster_id=cluster_id,
|
|
4324
|
+
node_group_id=node_group_id,
|
|
4325
|
+
payload=payload,
|
|
4326
|
+
_request_auth=_request_auth,
|
|
4327
|
+
_content_type=_content_type,
|
|
4328
|
+
_headers=_headers,
|
|
4329
|
+
_host_index=_host_index
|
|
4330
|
+
)
|
|
4331
|
+
|
|
4332
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4333
|
+
'200': "ClusterNodeGroupsCreateResponse",
|
|
4334
|
+
'400': "ErrorResponseModel",
|
|
4335
|
+
'401': "ErrorResponseModel",
|
|
4336
|
+
'404': "ErrorResponseModel",
|
|
4337
|
+
'409': "ErrorResponseModel",
|
|
4338
|
+
'500': None,
|
|
4339
|
+
}
|
|
4340
|
+
response_data = self.api_client.call_api(
|
|
4341
|
+
*_param,
|
|
4342
|
+
_request_timeout=_request_timeout
|
|
4343
|
+
)
|
|
4344
|
+
response_data.read()
|
|
4345
|
+
return self.api_client.response_deserialize(
|
|
4346
|
+
response_data=response_data,
|
|
4347
|
+
response_types_map=_response_types_map,
|
|
4348
|
+
).data
|
|
4349
|
+
|
|
4350
|
+
|
|
4351
|
+
@validate_call
|
|
4352
|
+
def update_a_node_group_with_http_info(
|
|
4353
|
+
self,
|
|
4354
|
+
cluster_id: StrictInt,
|
|
4355
|
+
node_group_id: StrictInt,
|
|
4356
|
+
payload: UpdateClusterNodeGroupPayload,
|
|
4357
|
+
_request_timeout: Union[
|
|
4358
|
+
None,
|
|
4359
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4360
|
+
Tuple[
|
|
4361
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4362
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4363
|
+
]
|
|
4364
|
+
] = None,
|
|
4365
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4366
|
+
_content_type: Optional[StrictStr] = None,
|
|
4367
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4368
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4369
|
+
) -> ApiResponse[ClusterNodeGroupsCreateResponse]:
|
|
4370
|
+
"""Update a node group in a cluster
|
|
4371
|
+
|
|
4372
|
+
|
|
4373
|
+
:param cluster_id: (required)
|
|
4374
|
+
:type cluster_id: int
|
|
4375
|
+
:param node_group_id: (required)
|
|
4376
|
+
:type node_group_id: int
|
|
4377
|
+
:param payload: (required)
|
|
4378
|
+
:type payload: UpdateClusterNodeGroupPayload
|
|
4379
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4380
|
+
number provided, it will be total request
|
|
4381
|
+
timeout. It can also be a pair (tuple) of
|
|
4382
|
+
(connection, read) timeouts.
|
|
4383
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4384
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4385
|
+
request; this effectively ignores the
|
|
4386
|
+
authentication in the spec for a single request.
|
|
4387
|
+
:type _request_auth: dict, optional
|
|
4388
|
+
:param _content_type: force content-type for the request.
|
|
4389
|
+
:type _content_type: str, Optional
|
|
4390
|
+
:param _headers: set to override the headers for a single
|
|
4391
|
+
request; this effectively ignores the headers
|
|
4392
|
+
in the spec for a single request.
|
|
4393
|
+
:type _headers: dict, optional
|
|
4394
|
+
:param _host_index: set to override the host_index for a single
|
|
4395
|
+
request; this effectively ignores the host_index
|
|
4396
|
+
in the spec for a single request.
|
|
4397
|
+
:type _host_index: int, optional
|
|
4398
|
+
:return: Returns the result object.
|
|
4399
|
+
""" # noqa: E501
|
|
4400
|
+
|
|
4401
|
+
_param = self._update_a_node_group_serialize(
|
|
4402
|
+
cluster_id=cluster_id,
|
|
4403
|
+
node_group_id=node_group_id,
|
|
4404
|
+
payload=payload,
|
|
4405
|
+
_request_auth=_request_auth,
|
|
4406
|
+
_content_type=_content_type,
|
|
4407
|
+
_headers=_headers,
|
|
4408
|
+
_host_index=_host_index
|
|
4409
|
+
)
|
|
4410
|
+
|
|
4411
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4412
|
+
'200': "ClusterNodeGroupsCreateResponse",
|
|
4413
|
+
'400': "ErrorResponseModel",
|
|
4414
|
+
'401': "ErrorResponseModel",
|
|
4415
|
+
'404': "ErrorResponseModel",
|
|
4416
|
+
'409': "ErrorResponseModel",
|
|
4417
|
+
'500': None,
|
|
4418
|
+
}
|
|
4419
|
+
response_data = self.api_client.call_api(
|
|
4420
|
+
*_param,
|
|
4421
|
+
_request_timeout=_request_timeout
|
|
4422
|
+
)
|
|
4423
|
+
response_data.read()
|
|
4424
|
+
return self.api_client.response_deserialize(
|
|
4425
|
+
response_data=response_data,
|
|
4426
|
+
response_types_map=_response_types_map,
|
|
4427
|
+
)
|
|
4428
|
+
|
|
4429
|
+
|
|
4430
|
+
@validate_call
|
|
4431
|
+
def update_a_node_group_without_preload_content(
|
|
4432
|
+
self,
|
|
4433
|
+
cluster_id: StrictInt,
|
|
4434
|
+
node_group_id: StrictInt,
|
|
4435
|
+
payload: UpdateClusterNodeGroupPayload,
|
|
4436
|
+
_request_timeout: Union[
|
|
4437
|
+
None,
|
|
4438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4439
|
+
Tuple[
|
|
4440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4442
|
+
]
|
|
4443
|
+
] = None,
|
|
4444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4445
|
+
_content_type: Optional[StrictStr] = None,
|
|
4446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4448
|
+
) -> RESTResponseType:
|
|
4449
|
+
"""Update a node group in a cluster
|
|
4450
|
+
|
|
4451
|
+
|
|
4452
|
+
:param cluster_id: (required)
|
|
4453
|
+
:type cluster_id: int
|
|
4454
|
+
:param node_group_id: (required)
|
|
4455
|
+
:type node_group_id: int
|
|
4456
|
+
:param payload: (required)
|
|
4457
|
+
:type payload: UpdateClusterNodeGroupPayload
|
|
4458
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4459
|
+
number provided, it will be total request
|
|
4460
|
+
timeout. It can also be a pair (tuple) of
|
|
4461
|
+
(connection, read) timeouts.
|
|
4462
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4463
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4464
|
+
request; this effectively ignores the
|
|
4465
|
+
authentication in the spec for a single request.
|
|
4466
|
+
:type _request_auth: dict, optional
|
|
4467
|
+
:param _content_type: force content-type for the request.
|
|
4468
|
+
:type _content_type: str, Optional
|
|
4469
|
+
:param _headers: set to override the headers for a single
|
|
4470
|
+
request; this effectively ignores the headers
|
|
4471
|
+
in the spec for a single request.
|
|
4472
|
+
:type _headers: dict, optional
|
|
4473
|
+
:param _host_index: set to override the host_index for a single
|
|
4474
|
+
request; this effectively ignores the host_index
|
|
4475
|
+
in the spec for a single request.
|
|
4476
|
+
:type _host_index: int, optional
|
|
4477
|
+
:return: Returns the result object.
|
|
4478
|
+
""" # noqa: E501
|
|
4479
|
+
|
|
4480
|
+
_param = self._update_a_node_group_serialize(
|
|
4481
|
+
cluster_id=cluster_id,
|
|
4482
|
+
node_group_id=node_group_id,
|
|
4483
|
+
payload=payload,
|
|
4484
|
+
_request_auth=_request_auth,
|
|
4485
|
+
_content_type=_content_type,
|
|
4486
|
+
_headers=_headers,
|
|
4487
|
+
_host_index=_host_index
|
|
4488
|
+
)
|
|
4489
|
+
|
|
4490
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4491
|
+
'200': "ClusterNodeGroupsCreateResponse",
|
|
4492
|
+
'400': "ErrorResponseModel",
|
|
4493
|
+
'401': "ErrorResponseModel",
|
|
4494
|
+
'404': "ErrorResponseModel",
|
|
4495
|
+
'409': "ErrorResponseModel",
|
|
4496
|
+
'500': None,
|
|
4497
|
+
}
|
|
4498
|
+
response_data = self.api_client.call_api(
|
|
4499
|
+
*_param,
|
|
4500
|
+
_request_timeout=_request_timeout
|
|
4501
|
+
)
|
|
4502
|
+
return response_data.response
|
|
4503
|
+
|
|
4504
|
+
|
|
4505
|
+
def _update_a_node_group_serialize(
|
|
4506
|
+
self,
|
|
4507
|
+
cluster_id,
|
|
4508
|
+
node_group_id,
|
|
4509
|
+
payload,
|
|
4510
|
+
_request_auth,
|
|
4511
|
+
_content_type,
|
|
4512
|
+
_headers,
|
|
4513
|
+
_host_index,
|
|
4514
|
+
) -> RequestSerialized:
|
|
4515
|
+
|
|
4516
|
+
_host = None
|
|
4517
|
+
|
|
4518
|
+
_collection_formats: Dict[str, str] = {
|
|
4519
|
+
}
|
|
4520
|
+
|
|
4521
|
+
_path_params: Dict[str, str] = {}
|
|
4522
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4523
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4524
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4525
|
+
_files: Dict[
|
|
4526
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4527
|
+
] = {}
|
|
4528
|
+
_body_params: Optional[bytes] = None
|
|
4529
|
+
|
|
4530
|
+
# process the path parameters
|
|
4531
|
+
if cluster_id is not None:
|
|
4532
|
+
_path_params['cluster_id'] = cluster_id
|
|
4533
|
+
if node_group_id is not None:
|
|
4534
|
+
_path_params['node_group_id'] = node_group_id
|
|
4535
|
+
# process the query parameters
|
|
4536
|
+
# process the header parameters
|
|
4537
|
+
# process the form parameters
|
|
4538
|
+
# process the body parameter
|
|
4539
|
+
if payload is not None:
|
|
4540
|
+
_body_params = payload
|
|
4541
|
+
|
|
4542
|
+
|
|
4543
|
+
# set the HTTP header `Accept`
|
|
4544
|
+
if 'Accept' not in _header_params:
|
|
4545
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4546
|
+
[
|
|
4547
|
+
'application/json'
|
|
4548
|
+
]
|
|
4549
|
+
)
|
|
4550
|
+
|
|
4551
|
+
# set the HTTP header `Content-Type`
|
|
4552
|
+
if _content_type:
|
|
4553
|
+
_header_params['Content-Type'] = _content_type
|
|
4554
|
+
else:
|
|
4555
|
+
_default_content_type = (
|
|
4556
|
+
self.api_client.select_header_content_type(
|
|
4557
|
+
[
|
|
4558
|
+
'application/json'
|
|
4559
|
+
]
|
|
4560
|
+
)
|
|
4561
|
+
)
|
|
4562
|
+
if _default_content_type is not None:
|
|
4563
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4564
|
+
|
|
4565
|
+
# authentication setting
|
|
4566
|
+
_auth_settings: List[str] = [
|
|
4567
|
+
'apiKey'
|
|
4568
|
+
]
|
|
4569
|
+
|
|
4570
|
+
return self.api_client.param_serialize(
|
|
4571
|
+
method='PATCH',
|
|
4572
|
+
resource_path='/core/clusters/{cluster_id}/node-groups/{node_group_id}',
|
|
4573
|
+
path_params=_path_params,
|
|
4574
|
+
query_params=_query_params,
|
|
4575
|
+
header_params=_header_params,
|
|
4576
|
+
body=_body_params,
|
|
4577
|
+
post_params=_form_params,
|
|
4578
|
+
files=_files,
|
|
4579
|
+
auth_settings=_auth_settings,
|
|
4580
|
+
collection_formats=_collection_formats,
|
|
4581
|
+
_host=_host,
|
|
4582
|
+
_request_auth=_request_auth
|
|
4583
|
+
)
|
|
4584
|
+
|
|
4585
|
+
|
hyperstack/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/v1.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v1.43.0-alpha/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
hyperstack/configuration.py
CHANGED
|
@@ -524,7 +524,7 @@ conf = hyperstack.Configuration(
|
|
|
524
524
|
"OS: {env}\n"\
|
|
525
525
|
"Python Version: {pyversion}\n"\
|
|
526
526
|
"Version of the API: 1.0\n"\
|
|
527
|
-
"SDK Package Version: v1.
|
|
527
|
+
"SDK Package Version: v1.43.0-alpha".\
|
|
528
528
|
format(env=sys.platform, pyversion=sys.version)
|
|
529
529
|
|
|
530
530
|
def get_host_settings(self) -> List[HostSetting]:
|
hyperstack/models/__init__.py
CHANGED
|
@@ -278,6 +278,7 @@ from .template_fields import TemplateFields
|
|
|
278
278
|
from .templates import Templates
|
|
279
279
|
from .token_based_billing_history_response import TokenBasedBillingHistoryResponse
|
|
280
280
|
from .uris import URIs
|
|
281
|
+
from .update_cluster_node_group_payload import UpdateClusterNodeGroupPayload
|
|
281
282
|
from .update_environment import UpdateEnvironment
|
|
282
283
|
from .update_keypair_name import UpdateKeypairName
|
|
283
284
|
from .update_keypair_name_response import UpdateKeypairNameResponse
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from ..models.cluster_flavor_fields import ClusterFlavorFields
|
|
24
24
|
from ..models.cluster_node_fields import ClusterNodeFields
|
|
@@ -34,6 +34,7 @@ class ClusterFields(BaseModel):
|
|
|
34
34
|
created_at: Optional[datetime] = None
|
|
35
35
|
environment_name: Optional[StrictStr] = None
|
|
36
36
|
id: Optional[StrictInt] = None
|
|
37
|
+
is_reconciling: Optional[StrictBool] = None
|
|
37
38
|
keypair_name: Optional[StrictStr] = None
|
|
38
39
|
kube_config: Optional[StrictStr] = None
|
|
39
40
|
kubernetes_version: Optional[StrictStr] = None
|
|
@@ -43,7 +44,7 @@ class ClusterFields(BaseModel):
|
|
|
43
44
|
nodes: Optional[List[ClusterNodeFields]] = None
|
|
44
45
|
status: Optional[StrictStr] = None
|
|
45
46
|
status_reason: Optional[StrictStr] = None
|
|
46
|
-
__properties: ClassVar[List[str]] = ["api_address", "created_at", "environment_name", "id", "keypair_name", "kube_config", "kubernetes_version", "master_flavor", "name", "node_groups", "nodes", "status", "status_reason"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["api_address", "created_at", "environment_name", "id", "is_reconciling", "keypair_name", "kube_config", "kubernetes_version", "master_flavor", "name", "node_groups", "nodes", "status", "status_reason"]
|
|
47
48
|
|
|
48
49
|
model_config = ConfigDict(
|
|
49
50
|
populate_by_name=True,
|
|
@@ -117,6 +118,7 @@ class ClusterFields(BaseModel):
|
|
|
117
118
|
"created_at": obj.get("created_at"),
|
|
118
119
|
"environment_name": obj.get("environment_name"),
|
|
119
120
|
"id": obj.get("id"),
|
|
121
|
+
"is_reconciling": obj.get("is_reconciling"),
|
|
120
122
|
"keypair_name": obj.get("keypair_name"),
|
|
121
123
|
"kube_config": obj.get("kube_config"),
|
|
122
124
|
"kubernetes_version": obj.get("kubernetes_version"),
|
|
@@ -32,10 +32,12 @@ class ClusterNodeGroupFields(BaseModel):
|
|
|
32
32
|
created_at: Optional[datetime] = None
|
|
33
33
|
flavor: Optional[ClusterFlavorFields] = None
|
|
34
34
|
id: Optional[StrictInt] = None
|
|
35
|
+
max_count: Optional[StrictInt] = None
|
|
36
|
+
min_count: Optional[StrictInt] = None
|
|
35
37
|
name: Optional[StrictStr] = None
|
|
36
38
|
role: Optional[StrictStr] = None
|
|
37
39
|
updated_at: Optional[datetime] = None
|
|
38
|
-
__properties: ClassVar[List[str]] = ["count", "created_at", "flavor", "id", "name", "role", "updated_at"]
|
|
40
|
+
__properties: ClassVar[List[str]] = ["count", "created_at", "flavor", "id", "max_count", "min_count", "name", "role", "updated_at"]
|
|
39
41
|
|
|
40
42
|
model_config = ConfigDict(
|
|
41
43
|
populate_by_name=True,
|
|
@@ -95,6 +97,8 @@ class ClusterNodeGroupFields(BaseModel):
|
|
|
95
97
|
"created_at": obj.get("created_at"),
|
|
96
98
|
"flavor": ClusterFlavorFields.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None,
|
|
97
99
|
"id": obj.get("id"),
|
|
100
|
+
"max_count": obj.get("max_count"),
|
|
101
|
+
"min_count": obj.get("min_count"),
|
|
98
102
|
"name": obj.get("name"),
|
|
99
103
|
"role": obj.get("role"),
|
|
100
104
|
"updated_at": obj.get("updated_at")
|
|
@@ -17,7 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Optional, Set
|
|
@@ -29,8 +29,18 @@ class CreateClusterNodeGroupPayload(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
count: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
31
31
|
flavor_name: StrictStr
|
|
32
|
+
max_count: Optional[Annotated[int, Field(le=20, strict=True)]] = None
|
|
33
|
+
min_count: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
34
|
name: Annotated[str, Field(strict=True, max_length=20)]
|
|
33
|
-
|
|
35
|
+
role: StrictStr
|
|
36
|
+
__properties: ClassVar[List[str]] = ["count", "flavor_name", "max_count", "min_count", "name", "role"]
|
|
37
|
+
|
|
38
|
+
@field_validator('role')
|
|
39
|
+
def role_validate_enum(cls, value):
|
|
40
|
+
"""Validates the enum"""
|
|
41
|
+
if value not in set(['worker']):
|
|
42
|
+
raise ValueError("must be one of enum values ('worker')")
|
|
43
|
+
return value
|
|
34
44
|
|
|
35
45
|
model_config = ConfigDict(
|
|
36
46
|
populate_by_name=True,
|
|
@@ -85,7 +95,10 @@ class CreateClusterNodeGroupPayload(BaseModel):
|
|
|
85
95
|
_obj = cls.model_validate({
|
|
86
96
|
"count": obj.get("count"),
|
|
87
97
|
"flavor_name": obj.get("flavor_name"),
|
|
88
|
-
"
|
|
98
|
+
"max_count": obj.get("max_count"),
|
|
99
|
+
"min_count": obj.get("min_count"),
|
|
100
|
+
"name": obj.get("name"),
|
|
101
|
+
"role": obj.get("role") if obj.get("role") is not None else 'worker'
|
|
89
102
|
})
|
|
90
103
|
return _obj
|
|
91
104
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Infrahub-API
|
|
5
|
+
|
|
6
|
+
Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class UpdateClusterNodeGroupPayload(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UpdateClusterNodeGroupPayload
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
max_count: Optional[Annotated[int, Field(le=20, strict=True)]] = None
|
|
31
|
+
min_count: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["max_count", "min_count"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
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 UpdateClusterNodeGroupPayload 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
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of UpdateClusterNodeGroupPayload from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"max_count": obj.get("max_count"),
|
|
86
|
+
"min_count": obj.get("min_count")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
hyperstack/__init__.py,sha256=
|
|
2
|
-
hyperstack/api_client.py,sha256=
|
|
1
|
+
hyperstack/__init__.py,sha256=ibFI4IsrXOryKg4i0kwYJkMx5GvsaQntdHc7KygWzJM,24159
|
|
2
|
+
hyperstack/api_client.py,sha256=RRsgxHJ1CtdoQzlZLeNtrLFMl8ayyklvv1e3Dy0DB14,27660
|
|
3
3
|
hyperstack/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
hyperstack/configuration.py,sha256=
|
|
4
|
+
hyperstack/configuration.py,sha256=8tl-7ljjlKSygzDT3LavECbkwVnbsuNr8U7Cz4UhuSg,18804
|
|
5
5
|
hyperstack/exceptions.py,sha256=WNUju20ADFYpDuZnq5o9FKSoa9N5nsCkMPNaK_VUrNM,6230
|
|
6
6
|
hyperstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
hyperstack/rest.py,sha256=ewQJgH66o4QmU-YgavYnTiOvGqjLOHbd43ENkvfdsLA,9656
|
|
@@ -16,7 +16,7 @@ hyperstack/api/billing_api.py,sha256=XWJp-fxHUiCei3p57ykxzQFkHV_X8vC5_tw_xP77SCk
|
|
|
16
16
|
hyperstack/api/calculate_api.py,sha256=CgUXhQnmEsKnQWPxL19CrKOd1IBm_8rbQC2jz2zgVg8,12390
|
|
17
17
|
hyperstack/api/callbacks_api.py,sha256=Pro34L0KYy8EFDmu43ljoL7XdVQSIxq4FdNIEzBL4fA,73369
|
|
18
18
|
hyperstack/api/cluster_events_api.py,sha256=l5ooLmF7okg0e-lePL6hgl1KESF8eqOKu1TyM24jcQI,11569
|
|
19
|
-
hyperstack/api/clusters_api.py,sha256=
|
|
19
|
+
hyperstack/api/clusters_api.py,sha256=1NuCGoTv26RhBOgnNCaeeDDZdqQt0qTgT9U8G2KxZ3E,174244
|
|
20
20
|
hyperstack/api/compliance_api.py,sha256=rRayiQrFHmuWh9WDw84x36919NXe-c3Kra5rb0_v_3s,45218
|
|
21
21
|
hyperstack/api/credit_api.py,sha256=3NXOb-gRVWTsA3Xdy55OGjnChfu4wfqHp-BQWiA0YfE,12641
|
|
22
22
|
hyperstack/api/customer_contract_api.py,sha256=ICk-Lv0XQzKDVR_XwPhzqFnAs-SvN771mtEsUAzuIsc,37874
|
|
@@ -53,7 +53,7 @@ hyperstack/api/virtual_machine_events_api.py,sha256=SJbKS7K8pWF1mJNP5_t5vXwMHOum
|
|
|
53
53
|
hyperstack/api/vnc_url_api.py,sha256=qsP4EfXR3OAnrg4YwL0TwFo6_3LlpmOt_IGmQCTIA1A,23480
|
|
54
54
|
hyperstack/api/volume_api.py,sha256=1W_HOK7s3R4RQHjBL49NbmylEG68gjDWVsKpEQtdmwE,79340
|
|
55
55
|
hyperstack/api/volume_attachment_api.py,sha256=daxX8YuYnNs6kJr0ft5mFWAo4Kk1hdJGWWTVSnWY9Ec,37642
|
|
56
|
-
hyperstack/models/__init__.py,sha256=
|
|
56
|
+
hyperstack/models/__init__.py,sha256=bDZzVjOFR1hAaVWrOxOeJoowCLVySgXgRhKB3AYZWt4,19559
|
|
57
57
|
hyperstack/models/access_token_field.py,sha256=Ka4AWik_Y7Y4yv0s2-YHiP7rqItOtg18er7yUFRqbPY,2797
|
|
58
58
|
hyperstack/models/add_user_info_success_response_model.py,sha256=T2XP_tWo5rVzrbOXd8CEpa1ZDf2vz3W4Ni7dNBBx6TY,3300
|
|
59
59
|
hyperstack/models/allocated_gpu_count_graph.py,sha256=ANyWOWNFfH_caDmjfDrHA0mpD5lJjMhkoJZ9DVq-H60,2902
|
|
@@ -86,11 +86,11 @@ hyperstack/models/billing_metrices_fields.py,sha256=dyW4xCML3gmDHqX1T4coZA4qMtSn
|
|
|
86
86
|
hyperstack/models/billing_metrices_response.py,sha256=SXgHPHFOZxBbuQzSf6Q9XJKUe17K7C1jn5zHUc2TcEA,3474
|
|
87
87
|
hyperstack/models/cluster_events.py,sha256=ot3KXNR7biAwMRQ9o5KVN2ztn8l1-zhB8IFuyyD-je4,3546
|
|
88
88
|
hyperstack/models/cluster_events_fields.py,sha256=uvBaXGWuLf22ObK1wxjayigoc_Af_sUkBmKDJQS2rYU,3537
|
|
89
|
-
hyperstack/models/cluster_fields.py,sha256=
|
|
89
|
+
hyperstack/models/cluster_fields.py,sha256=wRTGO0_lsNTwStGCQ1jx-8uzMNn6Nb4ntLLWwd-4a6o,5592
|
|
90
90
|
hyperstack/models/cluster_flavor_fields.py,sha256=MKuXs_3VwsaLp6MabFZVv00S3zfWwp3o6s-hXdXAuzM,4078
|
|
91
91
|
hyperstack/models/cluster_list_response.py,sha256=gVXvJ67ppKtPCNpUj58cMXf8pzWOIEhDuC8M6vKKwco,3473
|
|
92
92
|
hyperstack/models/cluster_node_fields.py,sha256=6TlPGSe7rOOuaZ_hZ5EuoU4AG5ZCGgR44dzrVKvftHo,4241
|
|
93
|
-
hyperstack/models/cluster_node_group_fields.py,sha256=
|
|
93
|
+
hyperstack/models/cluster_node_group_fields.py,sha256=O5LqrFPlNDOVK6LUZcJoTlCumeM4zJdRKhZDQ4GMChE,3880
|
|
94
94
|
hyperstack/models/cluster_node_groups_create_response.py,sha256=U_Jdm2H9Ad-3w8Xwk7Mgj8Z5Va5rHen08C-1hOpANvQ,3945
|
|
95
95
|
hyperstack/models/cluster_node_groups_get_response.py,sha256=Ymgk08Zoaax9IKv3NT9muDwQB93V7fPCQdkxQZIk1Mc,3371
|
|
96
96
|
hyperstack/models/cluster_node_groups_list_response.py,sha256=0HlGahePKIHH4H9pfa0WpkTwzmneSp1eHRKwkDcl-_U,3587
|
|
@@ -112,7 +112,7 @@ hyperstack/models/contract_gpu_allocation_graph_response.py,sha256=A0IvCcO_Y0YBC
|
|
|
112
112
|
hyperstack/models/contract_instance_fields.py,sha256=gKe5JLZRUPlxS5EJdV7g7Yf2Wc79Aj49QQF8dCxZyvQ,3948
|
|
113
113
|
hyperstack/models/contract_instances_response.py,sha256=TjtLyhyb1dFozY_pxh9oebOkXyMfQNEjYdqpbaihg7Q,3546
|
|
114
114
|
hyperstack/models/create_cluster_node_fields.py,sha256=3W3cUqYt_GMOHOcI_tA0LIB4QQoeN1i25e_xQyi3XtY,3387
|
|
115
|
-
hyperstack/models/create_cluster_node_group_payload.py,sha256=
|
|
115
|
+
hyperstack/models/create_cluster_node_group_payload.py,sha256=TfGID_gyFRArp7b-G4OfenfOVzA8jcyLdA_MIn7Q1lw,3726
|
|
116
116
|
hyperstack/models/create_cluster_payload.py,sha256=rfA9sveLRxNA3kqXLfZkP_gW85-AgceD28A1yPz4-fw,4873
|
|
117
117
|
hyperstack/models/create_environment.py,sha256=0XC6qjSys2j_yGCXbUjDe6ZyPDmVuTkmeEkEZSkW32M,3172
|
|
118
118
|
hyperstack/models/create_firewall_payload.py,sha256=x7UpYOUdIf7Zs6A4ro4Yd8wkJSq5zq_lHFliS_66CP4,3151
|
|
@@ -317,6 +317,7 @@ hyperstack/models/template.py,sha256=1coIi7viOGzAac_XV104P3gRG30yyjI6F40h1dlTOus
|
|
|
317
317
|
hyperstack/models/template_fields.py,sha256=bfy0INCdb7x6DnG2W7_68OFHZYjI4A4GoDw53bV4yKI,3296
|
|
318
318
|
hyperstack/models/templates.py,sha256=XVBWBBJLiGOkFhRa7eue9S5q2QISh5JlHAnEx8P0tEw,3449
|
|
319
319
|
hyperstack/models/token_based_billing_history_response.py,sha256=aSmUkPTBMU0-J_YcCh23C2Q_LvIyBWEDIRObKQoM2gk,3669
|
|
320
|
+
hyperstack/models/update_cluster_node_group_payload.py,sha256=Yp42MQjA4t_Rjfu4CY57yWwKCROxJZGsX-pU6_Vc7Ms,3038
|
|
320
321
|
hyperstack/models/update_environment.py,sha256=u2PW9cpazAU64TLcmAGYrXpy6rSFPQ0oyBvjxsMiJ10,2874
|
|
321
322
|
hyperstack/models/update_keypair_name.py,sha256=uZoIuZMuiSBj8P4XmcO31h-lvipYUCkpd91-CBisbqU,2864
|
|
322
323
|
hyperstack/models/update_keypair_name_response.py,sha256=CP5Fef7kM8Fi5zDIlBYFKSktjzFstV5AgQjM_vMAniw,3294
|
|
@@ -345,7 +346,7 @@ hyperstack/models/volume_types.py,sha256=jMN2S8p-Yv8sw_wWYRmfIXLmtXDwSC0xc3Gt_SN
|
|
|
345
346
|
hyperstack/models/volumes.py,sha256=-zTxq9C_spyDF882oDIFcJnrTEM5A2aYQojmVUaHBq0,3694
|
|
346
347
|
hyperstack/models/volumes_fields.py,sha256=5c5YBJBmFbTSI_O00V9enZ_zEeRh4hZHtlf3hTH-Ios,4932
|
|
347
348
|
hyperstack/models/workload_billing_history_response.py,sha256=mXMmbg5JxL0oOdZ0rUuBlKxbSxPf8MhN1WluraZoyVU,3544
|
|
348
|
-
hyperstack-1.
|
|
349
|
-
hyperstack-1.
|
|
350
|
-
hyperstack-1.
|
|
351
|
-
hyperstack-1.
|
|
349
|
+
hyperstack-1.43.0a0.dist-info/METADATA,sha256=e2MH7tCsV1gJXcl4ZKVh8_rk1Gx4F8KbJAwXpW1AOKE,918
|
|
350
|
+
hyperstack-1.43.0a0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
351
|
+
hyperstack-1.43.0a0.dist-info/top_level.txt,sha256=njn3-XmjCMziM6_3QadnDQbqsVh2KYw4J1IysqyY0HI,11
|
|
352
|
+
hyperstack-1.43.0a0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|