graphscope-flex 0.27.0__5-py2.py3-none-any.whl → 0.28.0__5-py2.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.
- graphscope/flex/rest/__init__.py +6 -1
- graphscope/flex/rest/api/deployment_api.py +793 -3
- graphscope/flex/rest/api/job_api.py +57 -10
- graphscope/flex/rest/models/__init__.py +6 -1
- graphscope/flex/rest/models/base_edge_type_vertex_type_pair_relations_inner.py +4 -1
- graphscope/flex/rest/models/create_edge_type.py +1 -1
- graphscope/flex/rest/models/dataloading_mr_job_config.py +88 -0
- graphscope/flex/rest/models/edge_mapping.py +2 -2
- graphscope/flex/rest/models/get_edge_type.py +1 -1
- graphscope/flex/rest/models/get_pod_log_response.py +88 -0
- graphscope/flex/rest/models/get_resource_usage_response.py +105 -0
- graphscope/flex/rest/models/get_storage_usage_response.py +88 -0
- graphscope/flex/rest/models/get_vertex_type.py +1 -1
- graphscope/flex/rest/models/pod_status.py +108 -0
- graphscope/flex/rest/models/resource_usage.py +92 -0
- graphscope/flex/rest/models/running_deployment_info.py +2 -2
- graphscope/flex/rest/models/running_deployment_status.py +24 -5
- graphscope/flex/rest/models/vertex_mapping.py +2 -2
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/METADATA +1 -1
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/RECORD +22 -17
- graphscope/flex/rest/models/running_deployment_status_nodes_inner.py +0 -124
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/WHEEL +0 -0
- {graphscope_flex-0.27.0.dist-info → graphscope_flex-0.28.0.dist-info}/top_level.txt +0 -0
@@ -17,6 +17,10 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
17
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
18
|
from typing_extensions import Annotated
|
19
19
|
|
20
|
+
from pydantic import StrictBool, StrictStr
|
21
|
+
from graphscope.flex.rest.models.get_pod_log_response import GetPodLogResponse
|
22
|
+
from graphscope.flex.rest.models.get_resource_usage_response import GetResourceUsageResponse
|
23
|
+
from graphscope.flex.rest.models.get_storage_usage_response import GetStorageUsageResponse
|
20
24
|
from graphscope.flex.rest.models.running_deployment_info import RunningDeploymentInfo
|
21
25
|
from graphscope.flex.rest.models.running_deployment_status import RunningDeploymentStatus
|
22
26
|
|
@@ -283,6 +287,547 @@ class DeploymentApi:
|
|
283
287
|
|
284
288
|
|
285
289
|
|
290
|
+
@validate_call
|
291
|
+
def get_deployment_pod_log(
|
292
|
+
self,
|
293
|
+
pod_name: StrictStr,
|
294
|
+
component: StrictStr,
|
295
|
+
from_cache: StrictBool,
|
296
|
+
_request_timeout: Union[
|
297
|
+
None,
|
298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
299
|
+
Tuple[
|
300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
301
|
+
Annotated[StrictFloat, Field(gt=0)]
|
302
|
+
]
|
303
|
+
] = None,
|
304
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
305
|
+
_content_type: Optional[StrictStr] = None,
|
306
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
307
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
308
|
+
) -> GetPodLogResponse:
|
309
|
+
"""get_deployment_pod_log
|
310
|
+
|
311
|
+
[Deprecated] Get kubernetes pod's log
|
312
|
+
|
313
|
+
:param pod_name: (required)
|
314
|
+
:type pod_name: str
|
315
|
+
:param component: (required)
|
316
|
+
:type component: str
|
317
|
+
:param from_cache: (required)
|
318
|
+
:type from_cache: bool
|
319
|
+
:param _request_timeout: timeout setting for this request. If one
|
320
|
+
number provided, it will be total request
|
321
|
+
timeout. It can also be a pair (tuple) of
|
322
|
+
(connection, read) timeouts.
|
323
|
+
:type _request_timeout: int, tuple(int, int), optional
|
324
|
+
:param _request_auth: set to override the auth_settings for an a single
|
325
|
+
request; this effectively ignores the
|
326
|
+
authentication in the spec for a single request.
|
327
|
+
:type _request_auth: dict, optional
|
328
|
+
:param _content_type: force content-type for the request.
|
329
|
+
:type _content_type: str, Optional
|
330
|
+
:param _headers: set to override the headers for a single
|
331
|
+
request; this effectively ignores the headers
|
332
|
+
in the spec for a single request.
|
333
|
+
:type _headers: dict, optional
|
334
|
+
:param _host_index: set to override the host_index for a single
|
335
|
+
request; this effectively ignores the host_index
|
336
|
+
in the spec for a single request.
|
337
|
+
:type _host_index: int, optional
|
338
|
+
:return: Returns the result object.
|
339
|
+
""" # noqa: E501
|
340
|
+
|
341
|
+
_param = self._get_deployment_pod_log_serialize(
|
342
|
+
pod_name=pod_name,
|
343
|
+
component=component,
|
344
|
+
from_cache=from_cache,
|
345
|
+
_request_auth=_request_auth,
|
346
|
+
_content_type=_content_type,
|
347
|
+
_headers=_headers,
|
348
|
+
_host_index=_host_index
|
349
|
+
)
|
350
|
+
|
351
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
352
|
+
'200': "GetPodLogResponse",
|
353
|
+
'500': "Error",
|
354
|
+
}
|
355
|
+
response_data = self.api_client.call_api(
|
356
|
+
*_param,
|
357
|
+
_request_timeout=_request_timeout
|
358
|
+
)
|
359
|
+
response_data.read()
|
360
|
+
return self.api_client.response_deserialize(
|
361
|
+
response_data=response_data,
|
362
|
+
response_types_map=_response_types_map,
|
363
|
+
).data
|
364
|
+
|
365
|
+
|
366
|
+
@validate_call
|
367
|
+
def get_deployment_pod_log_with_http_info(
|
368
|
+
self,
|
369
|
+
pod_name: StrictStr,
|
370
|
+
component: StrictStr,
|
371
|
+
from_cache: StrictBool,
|
372
|
+
_request_timeout: Union[
|
373
|
+
None,
|
374
|
+
Annotated[StrictFloat, Field(gt=0)],
|
375
|
+
Tuple[
|
376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
377
|
+
Annotated[StrictFloat, Field(gt=0)]
|
378
|
+
]
|
379
|
+
] = None,
|
380
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
381
|
+
_content_type: Optional[StrictStr] = None,
|
382
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
383
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
384
|
+
) -> ApiResponse[GetPodLogResponse]:
|
385
|
+
"""get_deployment_pod_log
|
386
|
+
|
387
|
+
[Deprecated] Get kubernetes pod's log
|
388
|
+
|
389
|
+
:param pod_name: (required)
|
390
|
+
:type pod_name: str
|
391
|
+
:param component: (required)
|
392
|
+
:type component: str
|
393
|
+
:param from_cache: (required)
|
394
|
+
:type from_cache: bool
|
395
|
+
:param _request_timeout: timeout setting for this request. If one
|
396
|
+
number provided, it will be total request
|
397
|
+
timeout. It can also be a pair (tuple) of
|
398
|
+
(connection, read) timeouts.
|
399
|
+
:type _request_timeout: int, tuple(int, int), optional
|
400
|
+
:param _request_auth: set to override the auth_settings for an a single
|
401
|
+
request; this effectively ignores the
|
402
|
+
authentication in the spec for a single request.
|
403
|
+
:type _request_auth: dict, optional
|
404
|
+
:param _content_type: force content-type for the request.
|
405
|
+
:type _content_type: str, Optional
|
406
|
+
:param _headers: set to override the headers for a single
|
407
|
+
request; this effectively ignores the headers
|
408
|
+
in the spec for a single request.
|
409
|
+
:type _headers: dict, optional
|
410
|
+
:param _host_index: set to override the host_index for a single
|
411
|
+
request; this effectively ignores the host_index
|
412
|
+
in the spec for a single request.
|
413
|
+
:type _host_index: int, optional
|
414
|
+
:return: Returns the result object.
|
415
|
+
""" # noqa: E501
|
416
|
+
|
417
|
+
_param = self._get_deployment_pod_log_serialize(
|
418
|
+
pod_name=pod_name,
|
419
|
+
component=component,
|
420
|
+
from_cache=from_cache,
|
421
|
+
_request_auth=_request_auth,
|
422
|
+
_content_type=_content_type,
|
423
|
+
_headers=_headers,
|
424
|
+
_host_index=_host_index
|
425
|
+
)
|
426
|
+
|
427
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
428
|
+
'200': "GetPodLogResponse",
|
429
|
+
'500': "Error",
|
430
|
+
}
|
431
|
+
response_data = self.api_client.call_api(
|
432
|
+
*_param,
|
433
|
+
_request_timeout=_request_timeout
|
434
|
+
)
|
435
|
+
response_data.read()
|
436
|
+
return self.api_client.response_deserialize(
|
437
|
+
response_data=response_data,
|
438
|
+
response_types_map=_response_types_map,
|
439
|
+
)
|
440
|
+
|
441
|
+
|
442
|
+
@validate_call
|
443
|
+
def get_deployment_pod_log_without_preload_content(
|
444
|
+
self,
|
445
|
+
pod_name: StrictStr,
|
446
|
+
component: StrictStr,
|
447
|
+
from_cache: StrictBool,
|
448
|
+
_request_timeout: Union[
|
449
|
+
None,
|
450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
451
|
+
Tuple[
|
452
|
+
Annotated[StrictFloat, Field(gt=0)],
|
453
|
+
Annotated[StrictFloat, Field(gt=0)]
|
454
|
+
]
|
455
|
+
] = None,
|
456
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
457
|
+
_content_type: Optional[StrictStr] = None,
|
458
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
459
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
460
|
+
) -> RESTResponseType:
|
461
|
+
"""get_deployment_pod_log
|
462
|
+
|
463
|
+
[Deprecated] Get kubernetes pod's log
|
464
|
+
|
465
|
+
:param pod_name: (required)
|
466
|
+
:type pod_name: str
|
467
|
+
:param component: (required)
|
468
|
+
:type component: str
|
469
|
+
:param from_cache: (required)
|
470
|
+
:type from_cache: bool
|
471
|
+
:param _request_timeout: timeout setting for this request. If one
|
472
|
+
number provided, it will be total request
|
473
|
+
timeout. It can also be a pair (tuple) of
|
474
|
+
(connection, read) timeouts.
|
475
|
+
:type _request_timeout: int, tuple(int, int), optional
|
476
|
+
:param _request_auth: set to override the auth_settings for an a single
|
477
|
+
request; this effectively ignores the
|
478
|
+
authentication in the spec for a single request.
|
479
|
+
:type _request_auth: dict, optional
|
480
|
+
:param _content_type: force content-type for the request.
|
481
|
+
:type _content_type: str, Optional
|
482
|
+
:param _headers: set to override the headers for a single
|
483
|
+
request; this effectively ignores the headers
|
484
|
+
in the spec for a single request.
|
485
|
+
:type _headers: dict, optional
|
486
|
+
:param _host_index: set to override the host_index for a single
|
487
|
+
request; this effectively ignores the host_index
|
488
|
+
in the spec for a single request.
|
489
|
+
:type _host_index: int, optional
|
490
|
+
:return: Returns the result object.
|
491
|
+
""" # noqa: E501
|
492
|
+
|
493
|
+
_param = self._get_deployment_pod_log_serialize(
|
494
|
+
pod_name=pod_name,
|
495
|
+
component=component,
|
496
|
+
from_cache=from_cache,
|
497
|
+
_request_auth=_request_auth,
|
498
|
+
_content_type=_content_type,
|
499
|
+
_headers=_headers,
|
500
|
+
_host_index=_host_index
|
501
|
+
)
|
502
|
+
|
503
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
504
|
+
'200': "GetPodLogResponse",
|
505
|
+
'500': "Error",
|
506
|
+
}
|
507
|
+
response_data = self.api_client.call_api(
|
508
|
+
*_param,
|
509
|
+
_request_timeout=_request_timeout
|
510
|
+
)
|
511
|
+
return response_data.response
|
512
|
+
|
513
|
+
|
514
|
+
def _get_deployment_pod_log_serialize(
|
515
|
+
self,
|
516
|
+
pod_name,
|
517
|
+
component,
|
518
|
+
from_cache,
|
519
|
+
_request_auth,
|
520
|
+
_content_type,
|
521
|
+
_headers,
|
522
|
+
_host_index,
|
523
|
+
) -> RequestSerialized:
|
524
|
+
|
525
|
+
_host = None
|
526
|
+
|
527
|
+
_collection_formats: Dict[str, str] = {
|
528
|
+
}
|
529
|
+
|
530
|
+
_path_params: Dict[str, str] = {}
|
531
|
+
_query_params: List[Tuple[str, str]] = []
|
532
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
533
|
+
_form_params: List[Tuple[str, str]] = []
|
534
|
+
_files: Dict[str, str] = {}
|
535
|
+
_body_params: Optional[bytes] = None
|
536
|
+
|
537
|
+
# process the path parameters
|
538
|
+
# process the query parameters
|
539
|
+
if pod_name is not None:
|
540
|
+
|
541
|
+
_query_params.append(('pod_name', pod_name))
|
542
|
+
|
543
|
+
if component is not None:
|
544
|
+
|
545
|
+
_query_params.append(('component', component))
|
546
|
+
|
547
|
+
if from_cache is not None:
|
548
|
+
|
549
|
+
_query_params.append(('from_cache', from_cache))
|
550
|
+
|
551
|
+
# process the header parameters
|
552
|
+
# process the form parameters
|
553
|
+
# process the body parameter
|
554
|
+
|
555
|
+
|
556
|
+
# set the HTTP header `Accept`
|
557
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
558
|
+
[
|
559
|
+
'application/json'
|
560
|
+
]
|
561
|
+
)
|
562
|
+
|
563
|
+
|
564
|
+
# authentication setting
|
565
|
+
_auth_settings: List[str] = [
|
566
|
+
]
|
567
|
+
|
568
|
+
return self.api_client.param_serialize(
|
569
|
+
method='GET',
|
570
|
+
resource_path='/api/v1/deployment/log',
|
571
|
+
path_params=_path_params,
|
572
|
+
query_params=_query_params,
|
573
|
+
header_params=_header_params,
|
574
|
+
body=_body_params,
|
575
|
+
post_params=_form_params,
|
576
|
+
files=_files,
|
577
|
+
auth_settings=_auth_settings,
|
578
|
+
collection_formats=_collection_formats,
|
579
|
+
_host=_host,
|
580
|
+
_request_auth=_request_auth
|
581
|
+
)
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
@validate_call
|
587
|
+
def get_deployment_resource_usage(
|
588
|
+
self,
|
589
|
+
_request_timeout: Union[
|
590
|
+
None,
|
591
|
+
Annotated[StrictFloat, Field(gt=0)],
|
592
|
+
Tuple[
|
593
|
+
Annotated[StrictFloat, Field(gt=0)],
|
594
|
+
Annotated[StrictFloat, Field(gt=0)]
|
595
|
+
]
|
596
|
+
] = None,
|
597
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
598
|
+
_content_type: Optional[StrictStr] = None,
|
599
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
600
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
601
|
+
) -> GetResourceUsageResponse:
|
602
|
+
"""get_deployment_resource_usage
|
603
|
+
|
604
|
+
[Deprecated] Get resource usage(cpu/memory) of cluster
|
605
|
+
|
606
|
+
:param _request_timeout: timeout setting for this request. If one
|
607
|
+
number provided, it will be total request
|
608
|
+
timeout. It can also be a pair (tuple) of
|
609
|
+
(connection, read) timeouts.
|
610
|
+
:type _request_timeout: int, tuple(int, int), optional
|
611
|
+
:param _request_auth: set to override the auth_settings for an a single
|
612
|
+
request; this effectively ignores the
|
613
|
+
authentication in the spec for a single request.
|
614
|
+
:type _request_auth: dict, optional
|
615
|
+
:param _content_type: force content-type for the request.
|
616
|
+
:type _content_type: str, Optional
|
617
|
+
:param _headers: set to override the headers for a single
|
618
|
+
request; this effectively ignores the headers
|
619
|
+
in the spec for a single request.
|
620
|
+
:type _headers: dict, optional
|
621
|
+
:param _host_index: set to override the host_index for a single
|
622
|
+
request; this effectively ignores the host_index
|
623
|
+
in the spec for a single request.
|
624
|
+
:type _host_index: int, optional
|
625
|
+
:return: Returns the result object.
|
626
|
+
""" # noqa: E501
|
627
|
+
|
628
|
+
_param = self._get_deployment_resource_usage_serialize(
|
629
|
+
_request_auth=_request_auth,
|
630
|
+
_content_type=_content_type,
|
631
|
+
_headers=_headers,
|
632
|
+
_host_index=_host_index
|
633
|
+
)
|
634
|
+
|
635
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
636
|
+
'200': "GetResourceUsageResponse",
|
637
|
+
'500': "Error",
|
638
|
+
}
|
639
|
+
response_data = self.api_client.call_api(
|
640
|
+
*_param,
|
641
|
+
_request_timeout=_request_timeout
|
642
|
+
)
|
643
|
+
response_data.read()
|
644
|
+
return self.api_client.response_deserialize(
|
645
|
+
response_data=response_data,
|
646
|
+
response_types_map=_response_types_map,
|
647
|
+
).data
|
648
|
+
|
649
|
+
|
650
|
+
@validate_call
|
651
|
+
def get_deployment_resource_usage_with_http_info(
|
652
|
+
self,
|
653
|
+
_request_timeout: Union[
|
654
|
+
None,
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
656
|
+
Tuple[
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
658
|
+
Annotated[StrictFloat, Field(gt=0)]
|
659
|
+
]
|
660
|
+
] = None,
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
665
|
+
) -> ApiResponse[GetResourceUsageResponse]:
|
666
|
+
"""get_deployment_resource_usage
|
667
|
+
|
668
|
+
[Deprecated] Get resource usage(cpu/memory) of cluster
|
669
|
+
|
670
|
+
:param _request_timeout: timeout setting for this request. If one
|
671
|
+
number provided, it will be total request
|
672
|
+
timeout. It can also be a pair (tuple) of
|
673
|
+
(connection, read) timeouts.
|
674
|
+
:type _request_timeout: int, tuple(int, int), optional
|
675
|
+
:param _request_auth: set to override the auth_settings for an a single
|
676
|
+
request; this effectively ignores the
|
677
|
+
authentication in the spec for a single request.
|
678
|
+
:type _request_auth: dict, optional
|
679
|
+
:param _content_type: force content-type for the request.
|
680
|
+
:type _content_type: str, Optional
|
681
|
+
:param _headers: set to override the headers for a single
|
682
|
+
request; this effectively ignores the headers
|
683
|
+
in the spec for a single request.
|
684
|
+
:type _headers: dict, optional
|
685
|
+
:param _host_index: set to override the host_index for a single
|
686
|
+
request; this effectively ignores the host_index
|
687
|
+
in the spec for a single request.
|
688
|
+
:type _host_index: int, optional
|
689
|
+
:return: Returns the result object.
|
690
|
+
""" # noqa: E501
|
691
|
+
|
692
|
+
_param = self._get_deployment_resource_usage_serialize(
|
693
|
+
_request_auth=_request_auth,
|
694
|
+
_content_type=_content_type,
|
695
|
+
_headers=_headers,
|
696
|
+
_host_index=_host_index
|
697
|
+
)
|
698
|
+
|
699
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
700
|
+
'200': "GetResourceUsageResponse",
|
701
|
+
'500': "Error",
|
702
|
+
}
|
703
|
+
response_data = self.api_client.call_api(
|
704
|
+
*_param,
|
705
|
+
_request_timeout=_request_timeout
|
706
|
+
)
|
707
|
+
response_data.read()
|
708
|
+
return self.api_client.response_deserialize(
|
709
|
+
response_data=response_data,
|
710
|
+
response_types_map=_response_types_map,
|
711
|
+
)
|
712
|
+
|
713
|
+
|
714
|
+
@validate_call
|
715
|
+
def get_deployment_resource_usage_without_preload_content(
|
716
|
+
self,
|
717
|
+
_request_timeout: Union[
|
718
|
+
None,
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
720
|
+
Tuple[
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
723
|
+
]
|
724
|
+
] = None,
|
725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
726
|
+
_content_type: Optional[StrictStr] = None,
|
727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
729
|
+
) -> RESTResponseType:
|
730
|
+
"""get_deployment_resource_usage
|
731
|
+
|
732
|
+
[Deprecated] Get resource usage(cpu/memory) of cluster
|
733
|
+
|
734
|
+
:param _request_timeout: timeout setting for this request. If one
|
735
|
+
number provided, it will be total request
|
736
|
+
timeout. It can also be a pair (tuple) of
|
737
|
+
(connection, read) timeouts.
|
738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
740
|
+
request; this effectively ignores the
|
741
|
+
authentication in the spec for a single request.
|
742
|
+
:type _request_auth: dict, optional
|
743
|
+
:param _content_type: force content-type for the request.
|
744
|
+
:type _content_type: str, Optional
|
745
|
+
:param _headers: set to override the headers for a single
|
746
|
+
request; this effectively ignores the headers
|
747
|
+
in the spec for a single request.
|
748
|
+
:type _headers: dict, optional
|
749
|
+
:param _host_index: set to override the host_index for a single
|
750
|
+
request; this effectively ignores the host_index
|
751
|
+
in the spec for a single request.
|
752
|
+
:type _host_index: int, optional
|
753
|
+
:return: Returns the result object.
|
754
|
+
""" # noqa: E501
|
755
|
+
|
756
|
+
_param = self._get_deployment_resource_usage_serialize(
|
757
|
+
_request_auth=_request_auth,
|
758
|
+
_content_type=_content_type,
|
759
|
+
_headers=_headers,
|
760
|
+
_host_index=_host_index
|
761
|
+
)
|
762
|
+
|
763
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
764
|
+
'200': "GetResourceUsageResponse",
|
765
|
+
'500': "Error",
|
766
|
+
}
|
767
|
+
response_data = self.api_client.call_api(
|
768
|
+
*_param,
|
769
|
+
_request_timeout=_request_timeout
|
770
|
+
)
|
771
|
+
return response_data.response
|
772
|
+
|
773
|
+
|
774
|
+
def _get_deployment_resource_usage_serialize(
|
775
|
+
self,
|
776
|
+
_request_auth,
|
777
|
+
_content_type,
|
778
|
+
_headers,
|
779
|
+
_host_index,
|
780
|
+
) -> RequestSerialized:
|
781
|
+
|
782
|
+
_host = None
|
783
|
+
|
784
|
+
_collection_formats: Dict[str, str] = {
|
785
|
+
}
|
786
|
+
|
787
|
+
_path_params: Dict[str, str] = {}
|
788
|
+
_query_params: List[Tuple[str, str]] = []
|
789
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
790
|
+
_form_params: List[Tuple[str, str]] = []
|
791
|
+
_files: Dict[str, str] = {}
|
792
|
+
_body_params: Optional[bytes] = None
|
793
|
+
|
794
|
+
# process the path parameters
|
795
|
+
# process the query parameters
|
796
|
+
# process the header parameters
|
797
|
+
# process the form parameters
|
798
|
+
# process the body parameter
|
799
|
+
|
800
|
+
|
801
|
+
# set the HTTP header `Accept`
|
802
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
803
|
+
[
|
804
|
+
'application/json'
|
805
|
+
]
|
806
|
+
)
|
807
|
+
|
808
|
+
|
809
|
+
# authentication setting
|
810
|
+
_auth_settings: List[str] = [
|
811
|
+
]
|
812
|
+
|
813
|
+
return self.api_client.param_serialize(
|
814
|
+
method='GET',
|
815
|
+
resource_path='/api/v1/deployment/resource/usage',
|
816
|
+
path_params=_path_params,
|
817
|
+
query_params=_query_params,
|
818
|
+
header_params=_header_params,
|
819
|
+
body=_body_params,
|
820
|
+
post_params=_form_params,
|
821
|
+
files=_files,
|
822
|
+
auth_settings=_auth_settings,
|
823
|
+
collection_formats=_collection_formats,
|
824
|
+
_host=_host,
|
825
|
+
_request_auth=_request_auth
|
826
|
+
)
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
286
831
|
@validate_call
|
287
832
|
def get_deployment_status(
|
288
833
|
self,
|
@@ -301,7 +846,7 @@ class DeploymentApi:
|
|
301
846
|
) -> RunningDeploymentStatus:
|
302
847
|
"""get_deployment_status
|
303
848
|
|
304
|
-
|
849
|
+
Get deployment status of cluster
|
305
850
|
|
306
851
|
:param _request_timeout: timeout setting for this request. If one
|
307
852
|
number provided, it will be total request
|
@@ -365,7 +910,7 @@ class DeploymentApi:
|
|
365
910
|
) -> ApiResponse[RunningDeploymentStatus]:
|
366
911
|
"""get_deployment_status
|
367
912
|
|
368
|
-
|
913
|
+
Get deployment status of cluster
|
369
914
|
|
370
915
|
:param _request_timeout: timeout setting for this request. If one
|
371
916
|
number provided, it will be total request
|
@@ -429,7 +974,7 @@ class DeploymentApi:
|
|
429
974
|
) -> RESTResponseType:
|
430
975
|
"""get_deployment_status
|
431
976
|
|
432
|
-
|
977
|
+
Get deployment status of cluster
|
433
978
|
|
434
979
|
:param _request_timeout: timeout setting for this request. If one
|
435
980
|
number provided, it will be total request
|
@@ -526,3 +1071,248 @@ class DeploymentApi:
|
|
526
1071
|
)
|
527
1072
|
|
528
1073
|
|
1074
|
+
|
1075
|
+
|
1076
|
+
@validate_call
|
1077
|
+
def get_storage_usage(
|
1078
|
+
self,
|
1079
|
+
_request_timeout: Union[
|
1080
|
+
None,
|
1081
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1082
|
+
Tuple[
|
1083
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1084
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1085
|
+
]
|
1086
|
+
] = None,
|
1087
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1088
|
+
_content_type: Optional[StrictStr] = None,
|
1089
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1090
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1091
|
+
) -> GetStorageUsageResponse:
|
1092
|
+
"""get_storage_usage
|
1093
|
+
|
1094
|
+
[Deprecated] Get storage usage of Groot
|
1095
|
+
|
1096
|
+
:param _request_timeout: timeout setting for this request. If one
|
1097
|
+
number provided, it will be total request
|
1098
|
+
timeout. It can also be a pair (tuple) of
|
1099
|
+
(connection, read) timeouts.
|
1100
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1101
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1102
|
+
request; this effectively ignores the
|
1103
|
+
authentication in the spec for a single request.
|
1104
|
+
:type _request_auth: dict, optional
|
1105
|
+
:param _content_type: force content-type for the request.
|
1106
|
+
:type _content_type: str, Optional
|
1107
|
+
:param _headers: set to override the headers for a single
|
1108
|
+
request; this effectively ignores the headers
|
1109
|
+
in the spec for a single request.
|
1110
|
+
:type _headers: dict, optional
|
1111
|
+
:param _host_index: set to override the host_index for a single
|
1112
|
+
request; this effectively ignores the host_index
|
1113
|
+
in the spec for a single request.
|
1114
|
+
:type _host_index: int, optional
|
1115
|
+
:return: Returns the result object.
|
1116
|
+
""" # noqa: E501
|
1117
|
+
|
1118
|
+
_param = self._get_storage_usage_serialize(
|
1119
|
+
_request_auth=_request_auth,
|
1120
|
+
_content_type=_content_type,
|
1121
|
+
_headers=_headers,
|
1122
|
+
_host_index=_host_index
|
1123
|
+
)
|
1124
|
+
|
1125
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1126
|
+
'200': "GetStorageUsageResponse",
|
1127
|
+
'500': "Error",
|
1128
|
+
}
|
1129
|
+
response_data = self.api_client.call_api(
|
1130
|
+
*_param,
|
1131
|
+
_request_timeout=_request_timeout
|
1132
|
+
)
|
1133
|
+
response_data.read()
|
1134
|
+
return self.api_client.response_deserialize(
|
1135
|
+
response_data=response_data,
|
1136
|
+
response_types_map=_response_types_map,
|
1137
|
+
).data
|
1138
|
+
|
1139
|
+
|
1140
|
+
@validate_call
|
1141
|
+
def get_storage_usage_with_http_info(
|
1142
|
+
self,
|
1143
|
+
_request_timeout: Union[
|
1144
|
+
None,
|
1145
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1146
|
+
Tuple[
|
1147
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1148
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1149
|
+
]
|
1150
|
+
] = None,
|
1151
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1152
|
+
_content_type: Optional[StrictStr] = None,
|
1153
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1154
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1155
|
+
) -> ApiResponse[GetStorageUsageResponse]:
|
1156
|
+
"""get_storage_usage
|
1157
|
+
|
1158
|
+
[Deprecated] Get storage usage of Groot
|
1159
|
+
|
1160
|
+
:param _request_timeout: timeout setting for this request. If one
|
1161
|
+
number provided, it will be total request
|
1162
|
+
timeout. It can also be a pair (tuple) of
|
1163
|
+
(connection, read) timeouts.
|
1164
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1165
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1166
|
+
request; this effectively ignores the
|
1167
|
+
authentication in the spec for a single request.
|
1168
|
+
:type _request_auth: dict, optional
|
1169
|
+
:param _content_type: force content-type for the request.
|
1170
|
+
:type _content_type: str, Optional
|
1171
|
+
:param _headers: set to override the headers for a single
|
1172
|
+
request; this effectively ignores the headers
|
1173
|
+
in the spec for a single request.
|
1174
|
+
:type _headers: dict, optional
|
1175
|
+
:param _host_index: set to override the host_index for a single
|
1176
|
+
request; this effectively ignores the host_index
|
1177
|
+
in the spec for a single request.
|
1178
|
+
:type _host_index: int, optional
|
1179
|
+
:return: Returns the result object.
|
1180
|
+
""" # noqa: E501
|
1181
|
+
|
1182
|
+
_param = self._get_storage_usage_serialize(
|
1183
|
+
_request_auth=_request_auth,
|
1184
|
+
_content_type=_content_type,
|
1185
|
+
_headers=_headers,
|
1186
|
+
_host_index=_host_index
|
1187
|
+
)
|
1188
|
+
|
1189
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1190
|
+
'200': "GetStorageUsageResponse",
|
1191
|
+
'500': "Error",
|
1192
|
+
}
|
1193
|
+
response_data = self.api_client.call_api(
|
1194
|
+
*_param,
|
1195
|
+
_request_timeout=_request_timeout
|
1196
|
+
)
|
1197
|
+
response_data.read()
|
1198
|
+
return self.api_client.response_deserialize(
|
1199
|
+
response_data=response_data,
|
1200
|
+
response_types_map=_response_types_map,
|
1201
|
+
)
|
1202
|
+
|
1203
|
+
|
1204
|
+
@validate_call
|
1205
|
+
def get_storage_usage_without_preload_content(
|
1206
|
+
self,
|
1207
|
+
_request_timeout: Union[
|
1208
|
+
None,
|
1209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1210
|
+
Tuple[
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1212
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1213
|
+
]
|
1214
|
+
] = None,
|
1215
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1216
|
+
_content_type: Optional[StrictStr] = None,
|
1217
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1218
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1219
|
+
) -> RESTResponseType:
|
1220
|
+
"""get_storage_usage
|
1221
|
+
|
1222
|
+
[Deprecated] Get storage usage of Groot
|
1223
|
+
|
1224
|
+
:param _request_timeout: timeout setting for this request. If one
|
1225
|
+
number provided, it will be total request
|
1226
|
+
timeout. It can also be a pair (tuple) of
|
1227
|
+
(connection, read) timeouts.
|
1228
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1229
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1230
|
+
request; this effectively ignores the
|
1231
|
+
authentication in the spec for a single request.
|
1232
|
+
:type _request_auth: dict, optional
|
1233
|
+
:param _content_type: force content-type for the request.
|
1234
|
+
:type _content_type: str, Optional
|
1235
|
+
:param _headers: set to override the headers for a single
|
1236
|
+
request; this effectively ignores the headers
|
1237
|
+
in the spec for a single request.
|
1238
|
+
:type _headers: dict, optional
|
1239
|
+
:param _host_index: set to override the host_index for a single
|
1240
|
+
request; this effectively ignores the host_index
|
1241
|
+
in the spec for a single request.
|
1242
|
+
:type _host_index: int, optional
|
1243
|
+
:return: Returns the result object.
|
1244
|
+
""" # noqa: E501
|
1245
|
+
|
1246
|
+
_param = self._get_storage_usage_serialize(
|
1247
|
+
_request_auth=_request_auth,
|
1248
|
+
_content_type=_content_type,
|
1249
|
+
_headers=_headers,
|
1250
|
+
_host_index=_host_index
|
1251
|
+
)
|
1252
|
+
|
1253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1254
|
+
'200': "GetStorageUsageResponse",
|
1255
|
+
'500': "Error",
|
1256
|
+
}
|
1257
|
+
response_data = self.api_client.call_api(
|
1258
|
+
*_param,
|
1259
|
+
_request_timeout=_request_timeout
|
1260
|
+
)
|
1261
|
+
return response_data.response
|
1262
|
+
|
1263
|
+
|
1264
|
+
def _get_storage_usage_serialize(
|
1265
|
+
self,
|
1266
|
+
_request_auth,
|
1267
|
+
_content_type,
|
1268
|
+
_headers,
|
1269
|
+
_host_index,
|
1270
|
+
) -> RequestSerialized:
|
1271
|
+
|
1272
|
+
_host = None
|
1273
|
+
|
1274
|
+
_collection_formats: Dict[str, str] = {
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
_path_params: Dict[str, str] = {}
|
1278
|
+
_query_params: List[Tuple[str, str]] = []
|
1279
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1280
|
+
_form_params: List[Tuple[str, str]] = []
|
1281
|
+
_files: Dict[str, str] = {}
|
1282
|
+
_body_params: Optional[bytes] = None
|
1283
|
+
|
1284
|
+
# process the path parameters
|
1285
|
+
# process the query parameters
|
1286
|
+
# process the header parameters
|
1287
|
+
# process the form parameters
|
1288
|
+
# process the body parameter
|
1289
|
+
|
1290
|
+
|
1291
|
+
# set the HTTP header `Accept`
|
1292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1293
|
+
[
|
1294
|
+
'application/json'
|
1295
|
+
]
|
1296
|
+
)
|
1297
|
+
|
1298
|
+
|
1299
|
+
# authentication setting
|
1300
|
+
_auth_settings: List[str] = [
|
1301
|
+
]
|
1302
|
+
|
1303
|
+
return self.api_client.param_serialize(
|
1304
|
+
method='GET',
|
1305
|
+
resource_path='/api/v1/deployment/storage/usage',
|
1306
|
+
path_params=_path_params,
|
1307
|
+
query_params=_query_params,
|
1308
|
+
header_params=_header_params,
|
1309
|
+
body=_body_params,
|
1310
|
+
post_params=_form_params,
|
1311
|
+
files=_files,
|
1312
|
+
auth_settings=_auth_settings,
|
1313
|
+
collection_formats=_collection_formats,
|
1314
|
+
_host=_host,
|
1315
|
+
_request_auth=_request_auth
|
1316
|
+
)
|
1317
|
+
|
1318
|
+
|