yellowdog-sdk 8.1.7__py3-none-any.whl → 8.1.9__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.
- yellowdog_client/_version.py +1 -1
- yellowdog_client/model/__init__.py +6 -0
- yellowdog_client/model/provider_node_summary.py +12 -0
- yellowdog_client/model/provider_region_node_summary.py +10 -0
- yellowdog_client/model/work_requirement_search.py +18 -0
- yellowdog_client/scheduler/work_client.py +13 -1
- yellowdog_client/scheduler/work_client_impl.py +11 -1
- yellowdog_client/scheduler/work_service_proxy.py +6 -2
- {yellowdog_sdk-8.1.7.dist-info → yellowdog_sdk-8.1.9.dist-info}/METADATA +1 -1
- {yellowdog_sdk-8.1.7.dist-info → yellowdog_sdk-8.1.9.dist-info}/RECORD +13 -10
- {yellowdog_sdk-8.1.7.dist-info → yellowdog_sdk-8.1.9.dist-info}/WHEEL +1 -1
- {yellowdog_sdk-8.1.7.dist-info → yellowdog_sdk-8.1.9.dist-info}/LICENSE +0 -0
- {yellowdog_sdk-8.1.7.dist-info → yellowdog_sdk-8.1.9.dist-info}/top_level.txt +0 -0
yellowdog_client/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
__version__ = '8.1.
|
|
2
|
+
__version__ = '8.1.9' # YEL-12856
|
|
@@ -215,6 +215,8 @@ from .permission import Permission
|
|
|
215
215
|
from .permission_detail import PermissionDetail
|
|
216
216
|
from .price import Price
|
|
217
217
|
from .processor_architecture import ProcessorArchitecture
|
|
218
|
+
from .provider_node_summary import ProviderNodeSummary
|
|
219
|
+
from .provider_region_node_summary import ProviderRegionNodeSummary
|
|
218
220
|
from .provision_template_worker_pool_request import ProvisionTemplateWorkerPoolRequest
|
|
219
221
|
from .provisioned_worker_pool import ProvisionedWorkerPool
|
|
220
222
|
from .provisioned_worker_pool_properties import ProvisionedWorkerPoolProperties
|
|
@@ -273,6 +275,7 @@ from .user_portal_context import UserPortalContext
|
|
|
273
275
|
from .user_search import UserSearch
|
|
274
276
|
from .waterfall_provision_strategy import WaterfallProvisionStrategy
|
|
275
277
|
from .work_requirement import WorkRequirement
|
|
278
|
+
from .work_requirement_search import WorkRequirementSearch
|
|
276
279
|
from .work_requirement_status import WorkRequirementStatus
|
|
277
280
|
from .work_requirement_summary import WorkRequirementSummary
|
|
278
281
|
from .worker import Worker
|
|
@@ -504,6 +507,8 @@ __all__ = [
|
|
|
504
507
|
"PermissionDetail",
|
|
505
508
|
"Price",
|
|
506
509
|
"ProcessorArchitecture",
|
|
510
|
+
"ProviderNodeSummary",
|
|
511
|
+
"ProviderRegionNodeSummary",
|
|
507
512
|
"ProvisionTemplateWorkerPoolRequest",
|
|
508
513
|
"ProvisionedWorkerPool",
|
|
509
514
|
"ProvisionedWorkerPoolProperties",
|
|
@@ -562,6 +567,7 @@ __all__ = [
|
|
|
562
567
|
"UserSearch",
|
|
563
568
|
"WaterfallProvisionStrategy",
|
|
564
569
|
"WorkRequirement",
|
|
570
|
+
"WorkRequirementSearch",
|
|
565
571
|
"WorkRequirementStatus",
|
|
566
572
|
"WorkRequirementSummary",
|
|
567
573
|
"Worker",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from .cloud_provider import CloudProvider
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@dataclass
|
|
8
|
+
class ProviderNodeSummary:
|
|
9
|
+
"""A summary of a group of nodes."""
|
|
10
|
+
provider: Optional[CloudProvider] = None
|
|
11
|
+
totalNodes: Optional[int] = None
|
|
12
|
+
workingNodes: Optional[int] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from .instant_range import InstantRange
|
|
5
|
+
from .sort_direction import SortDirection
|
|
6
|
+
from .work_requirement_status import WorkRequirementStatus
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class WorkRequirementSearch:
|
|
11
|
+
namespace: Optional[str] = None
|
|
12
|
+
name: Optional[str] = None
|
|
13
|
+
tag: Optional[str] = None
|
|
14
|
+
statuses: Optional[List[WorkRequirementStatus]] = None
|
|
15
|
+
isHealthy: Optional[bool] = None
|
|
16
|
+
createdTime: Optional[InstantRange] = None
|
|
17
|
+
sortField: Optional[str] = None
|
|
18
|
+
sortDirection: Optional[SortDirection] = None
|
|
@@ -6,7 +6,7 @@ from typing import List
|
|
|
6
6
|
from .work_requirement_helper import WorkRequirementHelper
|
|
7
7
|
from yellowdog_client.common import Closeable, SearchClient
|
|
8
8
|
from yellowdog_client.common.server_sent_events import SubscriptionEventListener
|
|
9
|
-
from yellowdog_client.model import Slice, SliceReference, Task, TaskGroup, TaskSearch, WorkRequirement, WorkRequirementSummary
|
|
9
|
+
from yellowdog_client.model import Slice, SliceReference, Task, TaskGroup, TaskSearch, WorkRequirement, WorkRequirementSearch, WorkRequirementSummary
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class WorkClient(ABC, Closeable):
|
|
@@ -197,6 +197,18 @@ class WorkClient(ABC, Closeable):
|
|
|
197
197
|
Returns summaries of all existing work requirements within the system for the requesting user.
|
|
198
198
|
|
|
199
199
|
:return: a list of work requirement summaries
|
|
200
|
+
@deprecated use {@link #getWorkRequirements(WorkRequirementSearch) instead to search tasks.
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
pass
|
|
204
|
+
|
|
205
|
+
@abstractmethod
|
|
206
|
+
def get_work_requirements(self, search: WorkRequirementSearch) -> SearchClient[WorkRequirementSummary]:
|
|
207
|
+
"""
|
|
208
|
+
Returns a SearchClient that offers the ability to search work requirements.
|
|
209
|
+
|
|
210
|
+
:param search: the search
|
|
211
|
+
:return: the search client
|
|
200
212
|
"""
|
|
201
213
|
|
|
202
214
|
pass
|
|
@@ -12,12 +12,14 @@ from yellowdog_client.model import TaskSearch
|
|
|
12
12
|
from yellowdog_client.model import WorkRequirement
|
|
13
13
|
from yellowdog_client.model import WorkRequirementStatus
|
|
14
14
|
from yellowdog_client.model import WorkRequirementSummary
|
|
15
|
+
from yellowdog_client.model import WorkRequirementSearch
|
|
15
16
|
from .work_client import WorkClient
|
|
16
17
|
from .work_requirement_helper import WorkRequirementHelper
|
|
17
18
|
from .work_service_proxy import WorkServiceProxy
|
|
18
19
|
from yellowdog_client.common import SearchClient
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
|
|
21
23
|
class WorkClientImpl(WorkClient):
|
|
22
24
|
def __init__(self, service_proxy: WorkServiceProxy) -> None:
|
|
23
25
|
self.__service_proxy = service_proxy
|
|
@@ -71,7 +73,15 @@ class WorkClientImpl(WorkClient):
|
|
|
71
73
|
return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.CANCELLING)
|
|
72
74
|
|
|
73
75
|
def find_all_work_requirements(self) -> List[WorkRequirementSummary]:
|
|
74
|
-
|
|
76
|
+
search = WorkRequirementSearch()
|
|
77
|
+
return paginate(lambda sr: self._get_work_requirements_slice(search, sr))
|
|
78
|
+
|
|
79
|
+
def get_work_requirements(self, search: WorkRequirementSearch) -> SearchClient[WorkRequirementSummary]:
|
|
80
|
+
get_next_slice_function = lambda slice_reference: self._get_work_requirements_slice(search, slice_reference)
|
|
81
|
+
return SearchClient(get_next_slice_function)
|
|
82
|
+
|
|
83
|
+
def _get_work_requirements_slice(self, search: WorkRequirementSearch, slice_reference: SliceReference) -> Slice[WorkRequirementSummary]:
|
|
84
|
+
return self.__service_proxy.find_work_requirements(search, slice_reference)
|
|
75
85
|
|
|
76
86
|
def add_work_requirement_listener(self, work_requirement: WorkRequirement, listener: SubscriptionEventListener[WorkRequirement]) -> None:
|
|
77
87
|
self._check_has_id(work_requirement)
|
|
@@ -4,6 +4,8 @@ from yellowdog_client.common import Proxy
|
|
|
4
4
|
from yellowdog_client.model import WorkRequirement, WorkRequirementStatus, WorkRequirementSummary, Task, \
|
|
5
5
|
TaskSearch, SliceReference, Slice
|
|
6
6
|
|
|
7
|
+
from yellowdog_client.model import WorkRequirementSearch
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
class WorkServiceProxy:
|
|
9
11
|
def __init__(self, proxy: Proxy) -> None:
|
|
@@ -26,8 +28,10 @@ class WorkServiceProxy:
|
|
|
26
28
|
url = "requirements/%s/transition/%s" % (requirement_id, str(next_status))
|
|
27
29
|
return self._proxy.put(WorkRequirement, url=url)
|
|
28
30
|
|
|
29
|
-
def
|
|
30
|
-
|
|
31
|
+
def find_work_requirements(self, search: WorkRequirementSearch, slice_reference: SliceReference) -> Slice[WorkRequirementSummary]:
|
|
32
|
+
params = self._proxy.to_params(search, slice_reference)
|
|
33
|
+
params["sliced"] = "true"
|
|
34
|
+
return self._proxy.get(Slice[WorkRequirementSummary], "requirements", params)
|
|
31
35
|
|
|
32
36
|
def stream_work_requirement_updates(self, requirement_id: str):
|
|
33
37
|
return self._proxy.stream(f"requirements/{requirement_id}/updates")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
yellowdog_client/__init__.py,sha256=xHGTw5UbjkeEl_hC8_gJCacfji6462qJWD1nvJdFssE,13162
|
|
3
|
-
yellowdog_client/_version.py,sha256=
|
|
3
|
+
yellowdog_client/_version.py,sha256=7oZ5haqHFA1WNA5I-pSeMOkupCNRF0JDvfTxfBHZmoQ,35
|
|
4
4
|
yellowdog_client/client_collection.py,sha256=VSEzjf6iR1qCQ0YGLyDq_Kgvw8r832QDwTp6-MLB4Vs,388
|
|
5
5
|
yellowdog_client/platform_client.py,sha256=h_9sd35e0GMdVGjSjG0KGcG3w1qLGY1Vf1U1gSor-HE,7052
|
|
6
6
|
yellowdog_client/account/__init__.py,sha256=wx5GbsoODMdXbOmRoNZu5VYgDJX-RqsFb9ph14HXoV4,235
|
|
@@ -50,7 +50,7 @@ yellowdog_client/images/images_service_proxy.py,sha256=eyP4u6FoIH1WJvNM_m8tacTCs
|
|
|
50
50
|
yellowdog_client/images/page.py,sha256=UIvlxvzdcfnKvbcq2Cn6IB7ZtQMc3dzcBTUfElvVPwQ,391
|
|
51
51
|
yellowdog_client/images/pageable.py,sha256=msD8uGGJ2F5jEqTNDYaFrh6z6drlxOXZ1AmB0T3edM0,296
|
|
52
52
|
yellowdog_client/images/sort.py,sha256=YS05DlIRg1Cm3QLBi6KFjFdB3g-b3WrqFFitlMJUEMM,167
|
|
53
|
-
yellowdog_client/model/__init__.py,sha256=
|
|
53
|
+
yellowdog_client/model/__init__.py,sha256=klJsMejlPvrWun1-wE-kigPjOwgnDeTrQe-Lv57eEIk,24040
|
|
54
54
|
yellowdog_client/model/access_delegate.py,sha256=gZYX7Hqw_eBzBIHzbxyZfrhko0xZIsPCsf4gSzFalwc,568
|
|
55
55
|
yellowdog_client/model/account.py,sha256=r_-7J-JjjMcQPZzaQ4_o9y6XY7-GMPRLWt9mGOucYU0,394
|
|
56
56
|
yellowdog_client/model/account_allowance.py,sha256=c-MkSSRLB5Y5TMDZl5h5fipj4vzLLlO_AQXPeRJ0AYw,1021
|
|
@@ -269,6 +269,8 @@ yellowdog_client/model/permission.py,sha256=3V-0Ba97BSTjpEcpCQtfTPdeK8GSh7_hvo0X
|
|
|
269
269
|
yellowdog_client/model/permission_detail.py,sha256=ukTbqQgmU782PZJ7i0H2KAojgmRG4flzwR2ywZICOOQ,207
|
|
270
270
|
yellowdog_client/model/price.py,sha256=kPZw5VGPg5vKRXL5brX8eZrH_GePvlBhdfMsm5fF6Dc,194
|
|
271
271
|
yellowdog_client/model/processor_architecture.py,sha256=hkbyplz2R5SeVtINaB3CcU86yR64elm5qi9W48LHVms,157
|
|
272
|
+
yellowdog_client/model/provider_node_summary.py,sha256=maYsTKxTR7jNjZDr_BNs23rV91k_WL44Q3BVXGdKFSk,307
|
|
273
|
+
yellowdog_client/model/provider_region_node_summary.py,sha256=n2VHXgPassz9zRrLoyGXOnpvO1oLnUE-ctfGkqkSQ4k,258
|
|
272
274
|
yellowdog_client/model/provision_template_worker_pool_request.py,sha256=FEGUv-882NQJOF8KH22wQatzHwiz9_TPSUBWWSE2H-E,416
|
|
273
275
|
yellowdog_client/model/provisioned_worker_pool.py,sha256=U00_pczMkTsu9QhioeRUub0srMJLW3ntGbTnYjLXVTA,1083
|
|
274
276
|
yellowdog_client/model/provisioned_worker_pool_properties.py,sha256=ObTIEl06JBevzfW8metBmX2UlrjCBnKUTVvW2-F_Hbs,1481
|
|
@@ -327,6 +329,7 @@ yellowdog_client/model/user_portal_context.py,sha256=ad0GuMXA9hKobFXf4in91xcXkiP
|
|
|
327
329
|
yellowdog_client/model/user_search.py,sha256=XHEx0_yIqZnvi5A0zgvAnEbZ3oBASjqcWgM9GroVZn0,285
|
|
328
330
|
yellowdog_client/model/waterfall_provision_strategy.py,sha256=1mAIACbWcVrsy3Bjulgh3TaPx83WoqRM443-jQ9FgaQ,727
|
|
329
331
|
yellowdog_client/model/work_requirement.py,sha256=4-kqhjS33HEjf62Z_GjcgVxHZ4Xa5c54TR1DIDgYPuY,1714
|
|
332
|
+
yellowdog_client/model/work_requirement_search.py,sha256=4qh3tWWF4C5UOC7XUjSN3Zylw3Cr1j3mn38QXZcXIyg,578
|
|
330
333
|
yellowdog_client/model/work_requirement_status.py,sha256=w_XCB-SDBJQjHnkM28UivdA53MVaAlDk0PzUcZyZYmk,1301
|
|
331
334
|
yellowdog_client/model/work_requirement_summary.py,sha256=jEvsqI6IBykpP5_LAyoTiS5elHXfaQJ2Zj1FOwxQtMU,1374
|
|
332
335
|
yellowdog_client/model/worker.py,sha256=KqUNIYwy9F-R4eY3Vk2JkZIyhERE-2CxmQe-6JgkI5Q,964
|
|
@@ -421,10 +424,10 @@ yellowdog_client/object_store/utils/memory_mapped_file_writter.py,sha256=8l9E_m8
|
|
|
421
424
|
yellowdog_client/scheduler/__init__.py,sha256=ZORtc_LUBoTcplpoDhCHZNannI3qjeohghNcoBYU3ts,927
|
|
422
425
|
yellowdog_client/scheduler/predicated_work_subscription_event_listener.py,sha256=mLfaVRmIMtQbj9u6d8O_B-VaZxOy5l1kuGCfTsS_xPU,2056
|
|
423
426
|
yellowdog_client/scheduler/predicated_worker_pool_subscription_event_listener.py,sha256=z7tCniTF8WL6HSV7QcMOWFvC9EGSRopBGLODFOQinTA,2080
|
|
424
|
-
yellowdog_client/scheduler/work_client.py,sha256=
|
|
425
|
-
yellowdog_client/scheduler/work_client_impl.py,sha256=
|
|
427
|
+
yellowdog_client/scheduler/work_client.py,sha256=Z0bz-SvjMiTDQ-fhGW3dSHTQrgipORJqPpDRDYiw98g,12792
|
|
428
|
+
yellowdog_client/scheduler/work_client_impl.py,sha256=Pi8r7A8nvi6NUZUHlXXyV1IMxi3H4SaBNjvV1oHM3FU,7273
|
|
426
429
|
yellowdog_client/scheduler/work_requirement_helper.py,sha256=vQMoI9emTMKLLmZSil3IGNUtxUl50MFuITJTv5Okvlo,4167
|
|
427
|
-
yellowdog_client/scheduler/work_service_proxy.py,sha256=
|
|
430
|
+
yellowdog_client/scheduler/work_service_proxy.py,sha256=ds0qiYHiOq9hdInjt1ynWE4GtifZlJEeh5HVDbKtTGc,2920
|
|
428
431
|
yellowdog_client/scheduler/worker_pool_client.py,sha256=CDJKKpAy91VNn8udCQ5gFO4FSm-vqj8tZ7KbM-4Grc4,15021
|
|
429
432
|
yellowdog_client/scheduler/worker_pool_client_impl.py,sha256=dSuPBDMioNz4DUa-YuJ9o4see2QV4NwPNMnV9OBni6Y,8371
|
|
430
433
|
yellowdog_client/scheduler/worker_pool_helper.py,sha256=TZWm4x5S4atmjvZjgt7xhx8hcsnGI087WJrqllJDK-U,1340
|
|
@@ -433,8 +436,8 @@ yellowdog_client/usage/__init__.py,sha256=XQwRJqTdxKZa1QUTsxBEL0TqQJeQHGyPklFeqc
|
|
|
433
436
|
yellowdog_client/usage/allowances_client.py,sha256=H6n63jXjT4OwuWJgFUXSjSmvGTZz9uspy3kj3upinaA,1337
|
|
434
437
|
yellowdog_client/usage/allowances_client_impl.py,sha256=nQPnSzJKhL3WvyCn5fmiDkwE84xZryH9YvV5Z1GjU4M,2061
|
|
435
438
|
yellowdog_client/usage/allowances_service_proxy.py,sha256=uO6LWnpjIzUcZTGdOxPXn7SyYX7NMRqO5KUiHUGr490,1320
|
|
436
|
-
yellowdog_sdk-8.1.
|
|
437
|
-
yellowdog_sdk-8.1.
|
|
438
|
-
yellowdog_sdk-8.1.
|
|
439
|
-
yellowdog_sdk-8.1.
|
|
440
|
-
yellowdog_sdk-8.1.
|
|
439
|
+
yellowdog_sdk-8.1.9.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
440
|
+
yellowdog_sdk-8.1.9.dist-info/METADATA,sha256=-58o2-n0D2AxPqTCsT_FfE7f-SN5-2EB1mreVZBC5s4,3044
|
|
441
|
+
yellowdog_sdk-8.1.9.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
|
|
442
|
+
yellowdog_sdk-8.1.9.dist-info/top_level.txt,sha256=6PH16DcoqpYHhQ5A0UJOjf0tg-1rTrNC9C2CLqCMuFo,26
|
|
443
|
+
yellowdog_sdk-8.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|