hyperstack 1.41.0a0__py3-none-any.whl → 1.42.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 +3 -1
- hyperstack/api/__init__.py +1 -0
- hyperstack/api/admin_api.py +297 -0
- hyperstack/api/clusters_api.py +271 -0
- hyperstack/api/firewall_attachment_api.py +7 -7
- hyperstack/api/firewalls_api.py +330 -330
- hyperstack/api/snapshots_api.py +160 -160
- hyperstack/api/virtual_machine_api.py +734 -734
- hyperstack/api/vnc_url_api.py +46 -46
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -1
- hyperstack/models/__init__.py +1 -0
- hyperstack/models/manual_reconciliation_model.py +95 -0
- {hyperstack-1.41.0a0.dist-info → hyperstack-1.42.0a0.dist-info}/METADATA +1 -1
- {hyperstack-1.41.0a0.dist-info → hyperstack-1.42.0a0.dist-info}/RECORD +17 -15
- {hyperstack-1.41.0a0.dist-info → hyperstack-1.42.0a0.dist-info}/WHEEL +0 -0
- {hyperstack-1.41.0a0.dist-info → hyperstack-1.42.0a0.dist-info}/top_level.txt +0 -0
hyperstack/api/vnc_url_api.py
CHANGED
|
@@ -42,7 +42,6 @@ class VncUrlApi:
|
|
|
42
42
|
def get_vnc_url(
|
|
43
43
|
self,
|
|
44
44
|
vm_id: StrictInt,
|
|
45
|
-
job_id: StrictInt,
|
|
46
45
|
_request_timeout: Union[
|
|
47
46
|
None,
|
|
48
47
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -55,15 +54,13 @@ class VncUrlApi:
|
|
|
55
54
|
_content_type: Optional[StrictStr] = None,
|
|
56
55
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
56
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
-
) ->
|
|
59
|
-
"""
|
|
57
|
+
) -> RequestConsole:
|
|
58
|
+
"""Request Instance Console
|
|
60
59
|
|
|
61
|
-
Retrieves the
|
|
60
|
+
Retrieves the path of the VNC console for the given virtual machine ID by providing the virtual machine ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-console-path).
|
|
62
61
|
|
|
63
62
|
:param vm_id: (required)
|
|
64
63
|
:type vm_id: int
|
|
65
|
-
:param job_id: (required)
|
|
66
|
-
:type job_id: int
|
|
67
64
|
:param _request_timeout: timeout setting for this request. If one
|
|
68
65
|
number provided, it will be total request
|
|
69
66
|
timeout. It can also be a pair (tuple) of
|
|
@@ -88,7 +85,6 @@ class VncUrlApi:
|
|
|
88
85
|
|
|
89
86
|
_param = self._get_vnc_url_serialize(
|
|
90
87
|
vm_id=vm_id,
|
|
91
|
-
job_id=job_id,
|
|
92
88
|
_request_auth=_request_auth,
|
|
93
89
|
_content_type=_content_type,
|
|
94
90
|
_headers=_headers,
|
|
@@ -96,7 +92,7 @@ class VncUrlApi:
|
|
|
96
92
|
)
|
|
97
93
|
|
|
98
94
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
-
'200': "
|
|
95
|
+
'200': "RequestConsole",
|
|
100
96
|
'400': "ErrorResponseModel",
|
|
101
97
|
'401': "ErrorResponseModel",
|
|
102
98
|
'404': "ErrorResponseModel",
|
|
@@ -117,7 +113,6 @@ class VncUrlApi:
|
|
|
117
113
|
def get_vnc_url_with_http_info(
|
|
118
114
|
self,
|
|
119
115
|
vm_id: StrictInt,
|
|
120
|
-
job_id: StrictInt,
|
|
121
116
|
_request_timeout: Union[
|
|
122
117
|
None,
|
|
123
118
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -130,15 +125,13 @@ class VncUrlApi:
|
|
|
130
125
|
_content_type: Optional[StrictStr] = None,
|
|
131
126
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
127
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
-
) -> ApiResponse[
|
|
134
|
-
"""
|
|
128
|
+
) -> ApiResponse[RequestConsole]:
|
|
129
|
+
"""Request Instance Console
|
|
135
130
|
|
|
136
|
-
Retrieves the
|
|
131
|
+
Retrieves the path of the VNC console for the given virtual machine ID by providing the virtual machine ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-console-path).
|
|
137
132
|
|
|
138
133
|
:param vm_id: (required)
|
|
139
134
|
:type vm_id: int
|
|
140
|
-
:param job_id: (required)
|
|
141
|
-
:type job_id: int
|
|
142
135
|
:param _request_timeout: timeout setting for this request. If one
|
|
143
136
|
number provided, it will be total request
|
|
144
137
|
timeout. It can also be a pair (tuple) of
|
|
@@ -163,7 +156,6 @@ class VncUrlApi:
|
|
|
163
156
|
|
|
164
157
|
_param = self._get_vnc_url_serialize(
|
|
165
158
|
vm_id=vm_id,
|
|
166
|
-
job_id=job_id,
|
|
167
159
|
_request_auth=_request_auth,
|
|
168
160
|
_content_type=_content_type,
|
|
169
161
|
_headers=_headers,
|
|
@@ -171,7 +163,7 @@ class VncUrlApi:
|
|
|
171
163
|
)
|
|
172
164
|
|
|
173
165
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
-
'200': "
|
|
166
|
+
'200': "RequestConsole",
|
|
175
167
|
'400': "ErrorResponseModel",
|
|
176
168
|
'401': "ErrorResponseModel",
|
|
177
169
|
'404': "ErrorResponseModel",
|
|
@@ -192,7 +184,6 @@ class VncUrlApi:
|
|
|
192
184
|
def get_vnc_url_without_preload_content(
|
|
193
185
|
self,
|
|
194
186
|
vm_id: StrictInt,
|
|
195
|
-
job_id: StrictInt,
|
|
196
187
|
_request_timeout: Union[
|
|
197
188
|
None,
|
|
198
189
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -206,14 +197,12 @@ class VncUrlApi:
|
|
|
206
197
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
207
198
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
208
199
|
) -> RESTResponseType:
|
|
209
|
-
"""
|
|
200
|
+
"""Request Instance Console
|
|
210
201
|
|
|
211
|
-
Retrieves the
|
|
202
|
+
Retrieves the path of the VNC console for the given virtual machine ID by providing the virtual machine ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-console-path).
|
|
212
203
|
|
|
213
204
|
:param vm_id: (required)
|
|
214
205
|
:type vm_id: int
|
|
215
|
-
:param job_id: (required)
|
|
216
|
-
:type job_id: int
|
|
217
206
|
:param _request_timeout: timeout setting for this request. If one
|
|
218
207
|
number provided, it will be total request
|
|
219
208
|
timeout. It can also be a pair (tuple) of
|
|
@@ -238,7 +227,6 @@ class VncUrlApi:
|
|
|
238
227
|
|
|
239
228
|
_param = self._get_vnc_url_serialize(
|
|
240
229
|
vm_id=vm_id,
|
|
241
|
-
job_id=job_id,
|
|
242
230
|
_request_auth=_request_auth,
|
|
243
231
|
_content_type=_content_type,
|
|
244
232
|
_headers=_headers,
|
|
@@ -246,7 +234,7 @@ class VncUrlApi:
|
|
|
246
234
|
)
|
|
247
235
|
|
|
248
236
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
249
|
-
'200': "
|
|
237
|
+
'200': "RequestConsole",
|
|
250
238
|
'400': "ErrorResponseModel",
|
|
251
239
|
'401': "ErrorResponseModel",
|
|
252
240
|
'404': "ErrorResponseModel",
|
|
@@ -262,7 +250,6 @@ class VncUrlApi:
|
|
|
262
250
|
def _get_vnc_url_serialize(
|
|
263
251
|
self,
|
|
264
252
|
vm_id,
|
|
265
|
-
job_id,
|
|
266
253
|
_request_auth,
|
|
267
254
|
_content_type,
|
|
268
255
|
_headers,
|
|
@@ -286,8 +273,6 @@ class VncUrlApi:
|
|
|
286
273
|
# process the path parameters
|
|
287
274
|
if vm_id is not None:
|
|
288
275
|
_path_params['vm_id'] = vm_id
|
|
289
|
-
if job_id is not None:
|
|
290
|
-
_path_params['job_id'] = job_id
|
|
291
276
|
# process the query parameters
|
|
292
277
|
# process the header parameters
|
|
293
278
|
# process the form parameters
|
|
@@ -310,7 +295,7 @@ class VncUrlApi:
|
|
|
310
295
|
|
|
311
296
|
return self.api_client.param_serialize(
|
|
312
297
|
method='GET',
|
|
313
|
-
resource_path='/core/virtual-machines/{vm_id}/console
|
|
298
|
+
resource_path='/core/virtual-machines/{vm_id}/request-console',
|
|
314
299
|
path_params=_path_params,
|
|
315
300
|
query_params=_query_params,
|
|
316
301
|
header_params=_header_params,
|
|
@@ -327,9 +312,10 @@ class VncUrlApi:
|
|
|
327
312
|
|
|
328
313
|
|
|
329
314
|
@validate_call
|
|
330
|
-
def
|
|
315
|
+
def get_vncurl(
|
|
331
316
|
self,
|
|
332
317
|
vm_id: StrictInt,
|
|
318
|
+
job_id: StrictInt,
|
|
333
319
|
_request_timeout: Union[
|
|
334
320
|
None,
|
|
335
321
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -342,13 +328,15 @@ class VncUrlApi:
|
|
|
342
328
|
_content_type: Optional[StrictStr] = None,
|
|
343
329
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
330
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
-
) ->
|
|
346
|
-
"""
|
|
331
|
+
) -> VNCURL:
|
|
332
|
+
"""Get VNC Console Link
|
|
347
333
|
|
|
348
|
-
Retrieves the
|
|
334
|
+
Retrieves the URL to access the VNC console for a specified virtual machine by providing the virtual machine ID and the job ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-vnc-url).
|
|
349
335
|
|
|
350
336
|
:param vm_id: (required)
|
|
351
337
|
:type vm_id: int
|
|
338
|
+
:param job_id: (required)
|
|
339
|
+
:type job_id: int
|
|
352
340
|
:param _request_timeout: timeout setting for this request. If one
|
|
353
341
|
number provided, it will be total request
|
|
354
342
|
timeout. It can also be a pair (tuple) of
|
|
@@ -371,8 +359,9 @@ class VncUrlApi:
|
|
|
371
359
|
:return: Returns the result object.
|
|
372
360
|
""" # noqa: E501
|
|
373
361
|
|
|
374
|
-
_param = self.
|
|
362
|
+
_param = self._get_vncurl_serialize(
|
|
375
363
|
vm_id=vm_id,
|
|
364
|
+
job_id=job_id,
|
|
376
365
|
_request_auth=_request_auth,
|
|
377
366
|
_content_type=_content_type,
|
|
378
367
|
_headers=_headers,
|
|
@@ -380,7 +369,7 @@ class VncUrlApi:
|
|
|
380
369
|
)
|
|
381
370
|
|
|
382
371
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
-
'200': "
|
|
372
|
+
'200': "VNCURL",
|
|
384
373
|
'400': "ErrorResponseModel",
|
|
385
374
|
'401': "ErrorResponseModel",
|
|
386
375
|
'404': "ErrorResponseModel",
|
|
@@ -398,9 +387,10 @@ class VncUrlApi:
|
|
|
398
387
|
|
|
399
388
|
|
|
400
389
|
@validate_call
|
|
401
|
-
def
|
|
390
|
+
def get_vncurl_with_http_info(
|
|
402
391
|
self,
|
|
403
392
|
vm_id: StrictInt,
|
|
393
|
+
job_id: StrictInt,
|
|
404
394
|
_request_timeout: Union[
|
|
405
395
|
None,
|
|
406
396
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -413,13 +403,15 @@ class VncUrlApi:
|
|
|
413
403
|
_content_type: Optional[StrictStr] = None,
|
|
414
404
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
415
405
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
416
|
-
) -> ApiResponse[
|
|
417
|
-
"""
|
|
406
|
+
) -> ApiResponse[VNCURL]:
|
|
407
|
+
"""Get VNC Console Link
|
|
418
408
|
|
|
419
|
-
Retrieves the
|
|
409
|
+
Retrieves the URL to access the VNC console for a specified virtual machine by providing the virtual machine ID and the job ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-vnc-url).
|
|
420
410
|
|
|
421
411
|
:param vm_id: (required)
|
|
422
412
|
:type vm_id: int
|
|
413
|
+
:param job_id: (required)
|
|
414
|
+
:type job_id: int
|
|
423
415
|
:param _request_timeout: timeout setting for this request. If one
|
|
424
416
|
number provided, it will be total request
|
|
425
417
|
timeout. It can also be a pair (tuple) of
|
|
@@ -442,8 +434,9 @@ class VncUrlApi:
|
|
|
442
434
|
:return: Returns the result object.
|
|
443
435
|
""" # noqa: E501
|
|
444
436
|
|
|
445
|
-
_param = self.
|
|
437
|
+
_param = self._get_vncurl_serialize(
|
|
446
438
|
vm_id=vm_id,
|
|
439
|
+
job_id=job_id,
|
|
447
440
|
_request_auth=_request_auth,
|
|
448
441
|
_content_type=_content_type,
|
|
449
442
|
_headers=_headers,
|
|
@@ -451,7 +444,7 @@ class VncUrlApi:
|
|
|
451
444
|
)
|
|
452
445
|
|
|
453
446
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
454
|
-
'200': "
|
|
447
|
+
'200': "VNCURL",
|
|
455
448
|
'400': "ErrorResponseModel",
|
|
456
449
|
'401': "ErrorResponseModel",
|
|
457
450
|
'404': "ErrorResponseModel",
|
|
@@ -469,9 +462,10 @@ class VncUrlApi:
|
|
|
469
462
|
|
|
470
463
|
|
|
471
464
|
@validate_call
|
|
472
|
-
def
|
|
465
|
+
def get_vncurl_without_preload_content(
|
|
473
466
|
self,
|
|
474
467
|
vm_id: StrictInt,
|
|
468
|
+
job_id: StrictInt,
|
|
475
469
|
_request_timeout: Union[
|
|
476
470
|
None,
|
|
477
471
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -485,12 +479,14 @@ class VncUrlApi:
|
|
|
485
479
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
486
480
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
487
481
|
) -> RESTResponseType:
|
|
488
|
-
"""
|
|
482
|
+
"""Get VNC Console Link
|
|
489
483
|
|
|
490
|
-
Retrieves the
|
|
484
|
+
Retrieves the URL to access the VNC console for a specified virtual machine by providing the virtual machine ID and the job ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/virtual-machines/vnc-console/retrieve-vnc-url).
|
|
491
485
|
|
|
492
486
|
:param vm_id: (required)
|
|
493
487
|
:type vm_id: int
|
|
488
|
+
:param job_id: (required)
|
|
489
|
+
:type job_id: int
|
|
494
490
|
:param _request_timeout: timeout setting for this request. If one
|
|
495
491
|
number provided, it will be total request
|
|
496
492
|
timeout. It can also be a pair (tuple) of
|
|
@@ -513,8 +509,9 @@ class VncUrlApi:
|
|
|
513
509
|
:return: Returns the result object.
|
|
514
510
|
""" # noqa: E501
|
|
515
511
|
|
|
516
|
-
_param = self.
|
|
512
|
+
_param = self._get_vncurl_serialize(
|
|
517
513
|
vm_id=vm_id,
|
|
514
|
+
job_id=job_id,
|
|
518
515
|
_request_auth=_request_auth,
|
|
519
516
|
_content_type=_content_type,
|
|
520
517
|
_headers=_headers,
|
|
@@ -522,7 +519,7 @@ class VncUrlApi:
|
|
|
522
519
|
)
|
|
523
520
|
|
|
524
521
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
525
|
-
'200': "
|
|
522
|
+
'200': "VNCURL",
|
|
526
523
|
'400': "ErrorResponseModel",
|
|
527
524
|
'401': "ErrorResponseModel",
|
|
528
525
|
'404': "ErrorResponseModel",
|
|
@@ -535,9 +532,10 @@ class VncUrlApi:
|
|
|
535
532
|
return response_data.response
|
|
536
533
|
|
|
537
534
|
|
|
538
|
-
def
|
|
535
|
+
def _get_vncurl_serialize(
|
|
539
536
|
self,
|
|
540
537
|
vm_id,
|
|
538
|
+
job_id,
|
|
541
539
|
_request_auth,
|
|
542
540
|
_content_type,
|
|
543
541
|
_headers,
|
|
@@ -561,6 +559,8 @@ class VncUrlApi:
|
|
|
561
559
|
# process the path parameters
|
|
562
560
|
if vm_id is not None:
|
|
563
561
|
_path_params['vm_id'] = vm_id
|
|
562
|
+
if job_id is not None:
|
|
563
|
+
_path_params['job_id'] = job_id
|
|
564
564
|
# process the query parameters
|
|
565
565
|
# process the header parameters
|
|
566
566
|
# process the form parameters
|
|
@@ -583,7 +583,7 @@ class VncUrlApi:
|
|
|
583
583
|
|
|
584
584
|
return self.api_client.param_serialize(
|
|
585
585
|
method='GET',
|
|
586
|
-
resource_path='/core/virtual-machines/{vm_id}/
|
|
586
|
+
resource_path='/core/virtual-machines/{vm_id}/console/{job_id}',
|
|
587
587
|
path_params=_path_params,
|
|
588
588
|
query_params=_query_params,
|
|
589
589
|
header_params=_header_params,
|
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.42.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.42.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
|
@@ -167,6 +167,7 @@ from .last_day_cost_response import LastDayCostResponse
|
|
|
167
167
|
from .logos import Logos
|
|
168
168
|
from .mfa_status_fields import MFAStatusFields
|
|
169
169
|
from .mfa_status_response import MFAStatusResponse
|
|
170
|
+
from .manual_reconciliation_model import ManualReconciliationModel
|
|
170
171
|
from .master_flavors_response import MasterFlavorsResponse
|
|
171
172
|
from .metric_item_fields import MetricItemFields
|
|
172
173
|
from .metrics_fields import MetricsFields
|
|
@@ -0,0 +1,95 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from ..models.cluster_fields import ClusterFields
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ManualReconciliationModel(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ManualReconciliationModel
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
cluster: Optional[ClusterFields] = None
|
|
31
|
+
message: Optional[StrictStr] = None
|
|
32
|
+
status: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["cluster", "message", "status"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ManualReconciliationModel from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of cluster
|
|
75
|
+
if self.cluster:
|
|
76
|
+
_dict['cluster'] = self.cluster.to_dict()
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of ManualReconciliationModel 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({
|
|
89
|
+
"cluster": ClusterFields.from_dict(obj["cluster"]) if obj.get("cluster") is not None else None,
|
|
90
|
+
"message": obj.get("message"),
|
|
91
|
+
"status": obj.get("status")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
hyperstack/__init__.py,sha256=
|
|
2
|
-
hyperstack/api_client.py,sha256=
|
|
1
|
+
hyperstack/__init__.py,sha256=wdomelLD3VcguJBBIOR4rthiqqcgzj0KNLmhX6YJLSs,24075
|
|
2
|
+
hyperstack/api_client.py,sha256=derl0-DbXUSz_WTnE1uCvjsIlyjlMy0Bk4jHhOiv5N8,27660
|
|
3
3
|
hyperstack/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
hyperstack/configuration.py,sha256=
|
|
4
|
+
hyperstack/configuration.py,sha256=q00wLH-TNLkYwVutjhRGBqx2cxtsq88ibBXg_DQ1IYg,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
|
|
8
|
-
hyperstack/api/__init__.py,sha256=
|
|
8
|
+
hyperstack/api/__init__.py,sha256=rZX6KVc0rVr6eNI5Iqs5Xv0TAzwSPD41AyUEG_Tu-U8,1990
|
|
9
|
+
hyperstack/api/admin_api.py,sha256=UysqdTNibJqSdIwUKb4HQdXEHPhKyrf0dczJIx0fcxc,11514
|
|
9
10
|
hyperstack/api/alive_api.py,sha256=Vk_uXVNJXZcd8hz3Lk6DCy--jOu9901r5-IVAxwP1dE,19468
|
|
10
11
|
hyperstack/api/api_key_api.py,sha256=Xt0fAER5nKgAH9wH2qt6tzRyiyLQ4Ym4a7iEDjQndzo,45330
|
|
11
12
|
hyperstack/api/assigning_member_role_api.py,sha256=dqfP49KEbwcDbPjxNP2UuqGvnFQrGJTILAZynWd4Lxs,24809
|
|
@@ -15,15 +16,15 @@ hyperstack/api/billing_api.py,sha256=XWJp-fxHUiCei3p57ykxzQFkHV_X8vC5_tw_xP77SCk
|
|
|
15
16
|
hyperstack/api/calculate_api.py,sha256=CgUXhQnmEsKnQWPxL19CrKOd1IBm_8rbQC2jz2zgVg8,12390
|
|
16
17
|
hyperstack/api/callbacks_api.py,sha256=Pro34L0KYy8EFDmu43ljoL7XdVQSIxq4FdNIEzBL4fA,73369
|
|
17
18
|
hyperstack/api/cluster_events_api.py,sha256=l5ooLmF7okg0e-lePL6hgl1KESF8eqOKu1TyM24jcQI,11569
|
|
18
|
-
hyperstack/api/clusters_api.py,sha256=
|
|
19
|
+
hyperstack/api/clusters_api.py,sha256=1UZjDjjeBjzK4FJRbCExC4NlYRib3EtIpf8xDimUPdE,162108
|
|
19
20
|
hyperstack/api/compliance_api.py,sha256=rRayiQrFHmuWh9WDw84x36919NXe-c3Kra5rb0_v_3s,45218
|
|
20
21
|
hyperstack/api/credit_api.py,sha256=3NXOb-gRVWTsA3Xdy55OGjnChfu4wfqHp-BQWiA0YfE,12641
|
|
21
22
|
hyperstack/api/customer_contract_api.py,sha256=ICk-Lv0XQzKDVR_XwPhzqFnAs-SvN771mtEsUAzuIsc,37874
|
|
22
23
|
hyperstack/api/dashboard_api.py,sha256=YnL6VOn5psDXGPxz8I6DibQjoxzYb5a2bDEFDHfE51w,11562
|
|
23
24
|
hyperstack/api/deployment_api.py,sha256=IFye7K6uqux81DzWzpaWIt3gV3OBsaer560Suoy-HUc,41782
|
|
24
25
|
hyperstack/api/environment_api.py,sha256=Arkr6rcEtC0TEV4RYIM3aeE69uZfzqT_VDMyFpeddr4,68712
|
|
25
|
-
hyperstack/api/firewall_attachment_api.py,sha256=
|
|
26
|
-
hyperstack/api/firewalls_api.py,sha256=
|
|
26
|
+
hyperstack/api/firewall_attachment_api.py,sha256=8FcOqHZr6R4rTwoviEIpjgrJhiQRQoklCDtXYfguSQ0,13782
|
|
27
|
+
hyperstack/api/firewalls_api.py,sha256=g3PzLRbR1JPFh31VfDeLHAnIVGJPe0ykqg4GaHGIb_c,73232
|
|
27
28
|
hyperstack/api/flavor_api.py,sha256=mCxNA9QRJCT_kxx2EEyehdDN0no7pj4qYikUa8ncbEg,12740
|
|
28
29
|
hyperstack/api/floating_ip_api.py,sha256=dVfyDOBzlI6NOaaxbjQdYp6DmdIO5rMyMucLyAOHjpA,24071
|
|
29
30
|
hyperstack/api/gpu_api.py,sha256=gvcdRksnLEBMZbHpyZVsXMVjI3WLX0WqQaCnmrt3z-o,11002
|
|
@@ -41,18 +42,18 @@ hyperstack/api/rbac_role_api.py,sha256=aBpnCrXJhqDMs3v7SLfaChZH1U-8zk7eOzEw8EiXl
|
|
|
41
42
|
hyperstack/api/region_api.py,sha256=GM5XVVGoWXaajJFUcnlhsHT8cWpHTCPdyfHtNsqQ1DE,11361
|
|
42
43
|
hyperstack/api/security_rules_api.py,sha256=iaOC_1UAIoGx1ZqSeyHUiSoJn4y13I8oDMEavcT6Aho,11370
|
|
43
44
|
hyperstack/api/snapshot_events_api.py,sha256=mEL4apdt15i3ck4m__u5SyqmSTnm7HDQNgvYDzgZVaE,11301
|
|
44
|
-
hyperstack/api/snapshots_api.py,sha256=
|
|
45
|
+
hyperstack/api/snapshots_api.py,sha256=zmnwXcvD87i_iHJitSWb8cFWe-H70OJeTdPi8UZjecw,67798
|
|
45
46
|
hyperstack/api/stock_api.py,sha256=LZgan7hNKBZZii_7g51YvT6HPFRHsPjfQ2yIGoiAtBY,11463
|
|
46
47
|
hyperstack/api/template_api.py,sha256=wzLcHNuDOt6hjUyAWMVyvRD6-ZA8BpuzKVx8d1Q0o-M,59203
|
|
47
48
|
hyperstack/api/user_api.py,sha256=uDUzegs78xUL9-6IJVOYVOdw4O_WDmzoL3QUpMtPBvQ,33457
|
|
48
49
|
hyperstack/api/user_detail_choice_api.py,sha256=8m-A5GGwv6aXV0VX-bdTPFkVqeCHtOUQXM31G93APRQ,11585
|
|
49
50
|
hyperstack/api/user_permission_api.py,sha256=0EhSfoDdLwuNmtstKOD3aXSZ5AadlEaV-QoaBn4-vQk,22604
|
|
50
|
-
hyperstack/api/virtual_machine_api.py,sha256=
|
|
51
|
+
hyperstack/api/virtual_machine_api.py,sha256=p0vZR4LDRjebxtcHNXZKUnCREmU3zkhAGfdjIY0G0A8,232312
|
|
51
52
|
hyperstack/api/virtual_machine_events_api.py,sha256=SJbKS7K8pWF1mJNP5_t5vXwMHOum3mFCZyczyAmwYG0,12629
|
|
52
|
-
hyperstack/api/vnc_url_api.py,sha256=
|
|
53
|
+
hyperstack/api/vnc_url_api.py,sha256=qsP4EfXR3OAnrg4YwL0TwFo6_3LlpmOt_IGmQCTIA1A,23480
|
|
53
54
|
hyperstack/api/volume_api.py,sha256=1W_HOK7s3R4RQHjBL49NbmylEG68gjDWVsKpEQtdmwE,79340
|
|
54
55
|
hyperstack/api/volume_attachment_api.py,sha256=daxX8YuYnNs6kJr0ft5mFWAo4Kk1hdJGWWTVSnWY9Ec,37642
|
|
55
|
-
hyperstack/models/__init__.py,sha256=
|
|
56
|
+
hyperstack/models/__init__.py,sha256=X43mXHjMh9J61ZljCVOsf1oXrOOOczUCtG6LU4bg2zM,19482
|
|
56
57
|
hyperstack/models/access_token_field.py,sha256=Ka4AWik_Y7Y4yv0s2-YHiP7rqItOtg18er7yUFRqbPY,2797
|
|
57
58
|
hyperstack/models/add_user_info_success_response_model.py,sha256=T2XP_tWo5rVzrbOXd8CEpa1ZDf2vz3W4Ni7dNBBx6TY,3300
|
|
58
59
|
hyperstack/models/allocated_gpu_count_graph.py,sha256=ANyWOWNFfH_caDmjfDrHA0mpD5lJjMhkoJZ9DVq-H60,2902
|
|
@@ -204,6 +205,7 @@ hyperstack/models/lable_resonse.py,sha256=3JDImstWKyYY0Ac7AfnI0jA1kX2JGNAFJSHNDh
|
|
|
204
205
|
hyperstack/models/last_day_cost_fields.py,sha256=RRle0aaz2RsFUq-PTYuDTe-wDUVTAl8STmy_AV50svY,3247
|
|
205
206
|
hyperstack/models/last_day_cost_response.py,sha256=-7uX1o6_Gkb0m8fh2A8A1fGncDCts_M59cBSy8qxKg4,3261
|
|
206
207
|
hyperstack/models/logos.py,sha256=gE64wCFqubrUidbybxdSdrMweqty3BdFNy3oAlI1uAc,2987
|
|
208
|
+
hyperstack/models/manual_reconciliation_model.py,sha256=zS8y3V1SIbfNs90qAQZEPFmfxj26U8VRzPY2f4_U9Ns,3281
|
|
207
209
|
hyperstack/models/master_flavors_response.py,sha256=-SwTClRBBRGm5RU-BuWLGM8kEiHYd9fMngh7di9OF8g,3494
|
|
208
210
|
hyperstack/models/metric_item_fields.py,sha256=SbGq3V4jNlvPo3WZRp5nVUJ7Ii56bH1E_a5HMU-q1ZM,2964
|
|
209
211
|
hyperstack/models/metrics_fields.py,sha256=3eVZ3LtXWr9wzDmd9euHIbkGMMrQZpatHeIpCndjxG8,5032
|
|
@@ -343,7 +345,7 @@ hyperstack/models/volume_types.py,sha256=jMN2S8p-Yv8sw_wWYRmfIXLmtXDwSC0xc3Gt_SN
|
|
|
343
345
|
hyperstack/models/volumes.py,sha256=-zTxq9C_spyDF882oDIFcJnrTEM5A2aYQojmVUaHBq0,3694
|
|
344
346
|
hyperstack/models/volumes_fields.py,sha256=5c5YBJBmFbTSI_O00V9enZ_zEeRh4hZHtlf3hTH-Ios,4932
|
|
345
347
|
hyperstack/models/workload_billing_history_response.py,sha256=mXMmbg5JxL0oOdZ0rUuBlKxbSxPf8MhN1WluraZoyVU,3544
|
|
346
|
-
hyperstack-1.
|
|
347
|
-
hyperstack-1.
|
|
348
|
-
hyperstack-1.
|
|
349
|
-
hyperstack-1.
|
|
348
|
+
hyperstack-1.42.0a0.dist-info/METADATA,sha256=Kb2ta6x5DII_ZFYP1uWJ1VC1aONCAZyt1HAzB9YLS04,918
|
|
349
|
+
hyperstack-1.42.0a0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
350
|
+
hyperstack-1.42.0a0.dist-info/top_level.txt,sha256=njn3-XmjCMziM6_3QadnDQbqsVh2KYw4J1IysqyY0HI,11
|
|
351
|
+
hyperstack-1.42.0a0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|