yellowdog-sdk 11.2.1__py3-none-any.whl → 11.5.0__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.
@@ -1 +1 @@
1
- __version__ = '11.2.1' # YEL-13933
1
+ __version__ = '11.5.0' # YEL-13767 v2
@@ -86,6 +86,10 @@ class AccountClient(ABC, Closeable):
86
86
  def get_group_applications(self, group_id: str) -> SearchClient[Application]:
87
87
  pass
88
88
 
89
+ @abstractmethod
90
+ def get_group_roles(self, group_id: str) -> SearchClient[Role]:
91
+ pass
92
+
89
93
  @abstractmethod
90
94
  def get_groups(self, search: GroupSearch) -> SearchClient[GroupSummary]:
91
95
  pass
@@ -93,6 +93,12 @@ class AccountClientImpl(AccountClient):
93
93
 
94
94
  return SearchClient(get_next_slice_function)
95
95
 
96
+ def get_group_roles(self, group_id: str) -> SearchClient[Role]:
97
+ def get_next_slice_function(slice_reference: SliceReference) -> Slice[Role]:
98
+ return self.__service_proxy.list_group_roles(group_id, slice_reference)
99
+
100
+ return SearchClient(get_next_slice_function)
101
+
96
102
  def get_groups(self, search: GroupSearch) -> SearchClient[GroupSummary]:
97
103
  def get_next_slice_function(slice_reference: SliceReference) -> Slice[GroupSummary]:
98
104
  return self.__service_proxy.search_groups(search, slice_reference)
@@ -92,6 +92,12 @@ class AccountServiceProxy:
92
92
  self.proxy.to_params(slice_reference)
93
93
  )
94
94
 
95
+ def list_group_roles(self, group_id: str, slice_reference: SliceReference) -> Slice[Role]:
96
+ return self.proxy.get(
97
+ Slice[Role], "groups/%s/roles" % group_id,
98
+ self.proxy.to_params(slice_reference)
99
+ )
100
+
95
101
  def search_groups(self, search: GroupSearch, slice_reference: SliceReference) -> Slice[GroupSummary]:
96
102
  return self.proxy.get(
97
103
  Slice[GroupSummary], "groups",
@@ -47,8 +47,8 @@ class Permission(Enum):
47
47
  OBJECT_STORAGE_CONFIGURATION_WRITE = "OBJECT_STORAGE_CONFIGURATION_WRITE", "Write Object Storage Configurations", PermissionScope.GLOBAL_ONLY, OBJECT_STORAGE_CONFIGURATION_READ
48
48
  OBJECT_READ = "OBJECT_READ", "Read Objects", PermissionScope.GLOBAL_ONLY, OBJECT_STORAGE_CONFIGURATION_READ
49
49
  OBJECT_WRITE = "OBJECT_WRITE", "Write Objects", PermissionScope.GLOBAL_ONLY, OBJECT_READ
50
- METRICS_READ = "METRICS_READ", "Read Metrics", PermissionScope.GLOBAL_ONLY, None
51
- METRICS_WRITE = "METRICS_WRITE", "Write Metrics", PermissionScope.GLOBAL_ONLY, METRICS_READ
50
+ METRICS_READ = "METRICS_READ", "Read Metrics", PermissionScope.NAMESPACED_OR_GLOBAL, None
51
+ METRICS_WRITE = "METRICS_WRITE", "Write Metrics", PermissionScope.NAMESPACED_OR_GLOBAL, METRICS_READ
52
52
  LOG_READ = "LOG_READ", "Read Logs", PermissionScope.GLOBAL_ONLY, None
53
53
  COMPUTE_USAGE_READ = "COMPUTE_USAGE_READ", "Read Compute Usage Data", PermissionScope.GLOBAL_ONLY, None
54
54
 
@@ -8,33 +8,36 @@ class TaskGroupStatus(Enum):
8
8
  The status of the task group provides an aggregated view of the statuses of tasks within the task group.
9
9
  """
10
10
 
11
- PENDING = "PENDING", False, False
11
+ PENDING = "PENDING", False, False, False
12
12
  """The task group is awaiting resources required to execute tasks."""
13
- RUNNING = "RUNNING", False, False
13
+ RUNNING = "RUNNING", False, False, True
14
14
  """The task group has sufficient resources to execute tasks."""
15
- HELD = "HELD", False, False
15
+ HELD = "HELD", False, False, False
16
16
  """
17
17
  The task group parent work requirement has been held by the user such that no further tasks are executed.
18
18
  Resources (e.g. Workers) will be released.
19
19
  The task group will remain in HELD state until the user reactivates the parent work requirement.
20
20
  """
21
21
 
22
- COMPLETED = "COMPLETED", False, True
22
+ FINISHING = "FINISHING", True, False, True
23
+ """The task group is waiting for all tasks to finish, no further tasks can be added."""
24
+ COMPLETED = "COMPLETED", False, True, False
23
25
  """All tasks within the task group have been completed."""
24
- FAILING = "FAILING", True, False
26
+ FAILING = "FAILING", True, False, False
25
27
  """At least one task in the task group has failed and the task group is in the process of discarding any outstanding tasks."""
26
- FAILED = "FAILED", False, True
28
+ FAILED = "FAILED", False, True, False
27
29
  """All tasks within the task group have been finished but at least one has failed."""
28
- CANCELLING = "CANCELLING", True, False
30
+ CANCELLING = "CANCELLING", True, False, False
29
31
  """The parent work requirement is in the process of being cancelled, no further tasks will be executed."""
30
- CANCELLED = "CANCELLED", False, True
32
+ CANCELLED = "CANCELLED", False, True, False
31
33
  """The parent work requirement has been cancelled, no tasks are currently being executed or will be executed."""
32
34
 
33
- def __new__(cls, value, finishing: bool, finished: bool):
35
+ def __new__(cls, value, finishing: bool, finished: bool, active: bool):
34
36
  obj = object.__new__(cls)
35
37
  obj._value_ = value
36
38
  obj.finishing = finishing
37
39
  obj.finished = finished
40
+ obj.active = active
38
41
  return obj
39
42
 
40
43
  def __str__(self) -> str:
@@ -1,11 +1,12 @@
1
1
  from dataclasses import dataclass
2
- from typing import Dict, Optional
2
+ from typing import Dict, List, Optional
3
3
 
4
4
  from .sort_direction import SortDirection
5
5
 
6
6
 
7
7
  @dataclass
8
8
  class TrackSearch:
9
+ namespaces: Optional[List[str]] = None
9
10
  tags: Optional[Dict[str, str]] = None
10
11
  sortField: Optional[str] = None
11
12
  sortDirection: Optional[SortDirection] = None
@@ -16,6 +16,8 @@ class WorkRequirementStatus(Enum):
16
16
  Task group resources (e.g. Workers) will be released.
17
17
  """
18
18
 
19
+ FINISHING = "FINISHING", False
20
+ """The work requirement is waiting for all tasks to finish, no further tasks can be added."""
19
21
  COMPLETED = "COMPLETED", True
20
22
  """All task groups in the work requirement have been completed."""
21
23
  FAILED = "FAILED", True
@@ -112,6 +112,28 @@ class WorkClient(ABC, Closeable):
112
112
 
113
113
  pass
114
114
 
115
+ @abstractmethod
116
+ def finish_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
117
+ """
118
+ Instructs the Scheduler not to accept further tasks for the supplied work requirement and to finish it after all tasks are finished.
119
+
120
+ :param work_requirement: the work requirement to finish
121
+ :return: the latest state of the work requirement after the finish instruction was submitted
122
+ """
123
+
124
+ pass
125
+
126
+ @abstractmethod
127
+ def finish_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
128
+ """
129
+ Instructs the Scheduler not to accept further tasks for the supplied work requirement and to finish it after all tasks are finished.
130
+
131
+ :param work_requirement_id: the ID of the work requirement to finish
132
+ :return: the latest state of the work requirement after the finish instruction was submitted
133
+ """
134
+
135
+ pass
136
+
115
137
  @abstractmethod
116
138
  def cancel_work_requirement(self, work_requirement: WorkRequirement, abort: Optional[bool] = None) -> WorkRequirement:
117
139
  """
@@ -66,6 +66,12 @@ class WorkClientImpl(WorkClient):
66
66
  def start_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
67
67
  return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.RUNNING, False)
68
68
 
69
+ def finish_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
70
+ return self.finish_work_requirement_by_id(work_requirement.id)
71
+
72
+ def finish_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
73
+ return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.FINISHING, False)
74
+
69
75
  def cancel_work_requirement(self, work_requirement: WorkRequirement, abort: bool = False) -> WorkRequirement:
70
76
  return self.cancel_work_requirement_by_id(work_requirement.id, abort)
71
77
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yellowdog-sdk
3
- Version: 11.2.1
3
+ Version: 11.5.0
4
4
  Summary: SDK for the YellowDog Platform
5
5
  Author-email: YellowDog Limited <support@yellowdog.co>
6
6
  Project-URL: Homepage, https://yellowdog.co
@@ -1,12 +1,12 @@
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=thvfsFUg-4Bm-dWp0rSHQDrFJ6bXS5Xy2YgLQ_toO7A,35
3
+ yellowdog_client/_version.py,sha256=0vB6AL4_ez5iHWIek9s7kfz6FF5OxESZLYuu8Ie703Y,38
4
4
  yellowdog_client/client_collection.py,sha256=VSEzjf6iR1qCQ0YGLyDq_Kgvw8r832QDwTp6-MLB4Vs,388
5
5
  yellowdog_client/platform_client.py,sha256=yCzKsOQKllnfzwP9bG-JGtvOdvY7EaEQzFsgX3ERzVY,7476
6
6
  yellowdog_client/account/__init__.py,sha256=DiLL3uSMyVlAKWsncX0k5Ioc2hw87HQoEkSYO0ro0fg,456
7
- yellowdog_client/account/account_client.py,sha256=VhF22v5kRZ1OjWc9bwG8Ra4bWxMgKxOD6Yf3eQVEv70,3427
8
- yellowdog_client/account/account_client_impl.py,sha256=AK49lLrB0uJetJdyQCP3mfPRhwTdRMc_ZlB6Fb_5Bcc,6057
9
- yellowdog_client/account/account_service_proxy.py,sha256=BfJqnKKBJNCjt__LPSN0ZvPNnOViTi0gvzRzulIwwdc,5437
7
+ yellowdog_client/account/account_client.py,sha256=lt32hszRysBpOK4tWMw6sY98EVNIgQILn4zaW28LFmA,3529
8
+ yellowdog_client/account/account_client_impl.py,sha256=zEr_5_j94TxlYjQ6yGJ2nrHKi63lcg4_UYneBIJ4BqY,6349
9
+ yellowdog_client/account/account_service_proxy.py,sha256=b8HJXDxQ7dIysBbVCv0i3Dj4Vbsqxi38cqtwBEGIQrM,5679
10
10
  yellowdog_client/account/keyring_client.py,sha256=IFogh3LNNtL0cSbvbaEuhJ41UhtJbItyxm0AEnAaFMk,1125
11
11
  yellowdog_client/account/keyring_client_impl.py,sha256=s_IltFtozR7lYdR9XNEZVj885pgJ0DoInv0B24GtblI,1665
12
12
  yellowdog_client/account/keyring_service_proxy.py,sha256=8oK6lK3FxHOIbq--qcKSAd5bqkPGMN023CrX_Q8RKeI,1220
@@ -281,7 +281,7 @@ yellowdog_client/model/oci_instances_compute_source.py,sha256=p94ErZj4SKyWjs19Ne
281
281
  yellowdog_client/model/oci_namespace_storage_configuration.py,sha256=YsbDhzC_FT1rQMeHEuYFpfZJSuiQKOwdGs72ksdF69g,408
282
282
  yellowdog_client/model/okta_account_authentication_properties.py,sha256=geKiNqQfYaW__U10FjNeNS83Ro54ZdBxo15qj0yWqyw,328
283
283
  yellowdog_client/model/operating_system_licence.py,sha256=nYL3U4d8pE1qtQlBrBPxJx7fUq6FWMAj--9lbya-Srs,347
284
- yellowdog_client/model/permission.py,sha256=IctnnmKiIzd846ZQNl2UTVkhRcfDPHjhR0pcPOehYkI,5891
284
+ yellowdog_client/model/permission.py,sha256=nUDtrWO_QBigOYs4l0CIzewyJiZz0D6Tgo6TJC_R89A,5909
285
285
  yellowdog_client/model/permission_detail.py,sha256=5X8bDfPJCKler68wyRAIcLkkAvhu_899CV7Xa3DfJ50,298
286
286
  yellowdog_client/model/permission_scope.py,sha256=PoRpCEQ233Xqgyf55JJNXtghQeefVhX47uPpGG8GmMg,191
287
287
  yellowdog_client/model/price.py,sha256=kPZw5VGPg5vKRXL5brX8eZrH_GePvlBhdfMsm5fF6Dc,194
@@ -330,7 +330,7 @@ yellowdog_client/model/task_error.py,sha256=9aW_ZJ0WkQjUSbpasXBtc0Wj4iu4-70Mf3jt
330
330
  yellowdog_client/model/task_error_matcher.py,sha256=idOfRZllKDlqe8Wq2GMjEaYhLLrAmd7Hai5Dr5BJMd0,291
331
331
  yellowdog_client/model/task_error_type.py,sha256=3JDxDu8_f_eQdoB_Y1xuVW4N_leSoJAGn5OjcU4X3e0,701
332
332
  yellowdog_client/model/task_group.py,sha256=29t6oxZda_P0VtnUlzQn0o8An38cD0B4jbwGiVKIqCE,2321
333
- yellowdog_client/model/task_group_status.py,sha256=7wAEOvZzq07P_0vTP0NejmDLS-MifGWO5WLlu_5OdZg,1722
333
+ yellowdog_client/model/task_group_status.py,sha256=dNFk111vk3iTOW0mPjRwUrTn_5yTbgngmJ8Rc8jlElM,1958
334
334
  yellowdog_client/model/task_input.py,sha256=d3U32xhgHdEWtSu5uSjjsLniD9dXoNeIVsyl1BeZqlw,1975
335
335
  yellowdog_client/model/task_input_source.py,sha256=Zr_p6dT0WMdMCcS2boGxPunFIa8CJB9hFguJwV85-IA,423
336
336
  yellowdog_client/model/task_input_verification.py,sha256=NYWsdtW4anEjGlqeta3mDpDPL9XmQj-0QBvb1n41svM,477
@@ -341,7 +341,7 @@ yellowdog_client/model/task_search.py,sha256=2FakY4abnkclo6orZXJYtNI76vRxB8kSJY7
341
341
  yellowdog_client/model/task_status.py,sha256=aN5icJ39UULR8pZhuLtK-8lYS1ajAUwyiQyZ_KImymI,1554
342
342
  yellowdog_client/model/task_summary.py,sha256=GN__WCspp6rDcE627KsnFTruIt4r4XiP-8RQ7DhTMfI,294
343
343
  yellowdog_client/model/track.py,sha256=GnAlxEIrwQ9qQycTOX4TmkyemNiboZ-3JwGFkzWSLx8,286
344
- yellowdog_client/model/track_search.py,sha256=t0D9V5QZHA8hWT_DMnb3Hbtrz2USHfg2I1_sPr1rUek,271
344
+ yellowdog_client/model/track_search.py,sha256=z-t8uQBgoku4G14hpkIKRd7x5cElCNonEU3AfiuytZc,320
345
345
  yellowdog_client/model/transfer_status_response.py,sha256=wE2-4kdyRtxPHAoaUqH69J33AsNIhKLV11rDiMbCNYM,341
346
346
  yellowdog_client/model/transfer_summary_response.py,sha256=doUaSzP5zgvFL-21DgLnt_6DkGYGzCfUCAjbRK_KHC0,409
347
347
  yellowdog_client/model/update_application_request.py,sha256=WYmSU3FvmUKOkWOEU7KHGIvw5GpU9nRKvN__l5sVTVA,176
@@ -357,7 +357,7 @@ yellowdog_client/model/waterfall_provision_strategy.py,sha256=1mAIACbWcVrsy3Bjul
357
357
  yellowdog_client/model/work_requirement.py,sha256=4-kqhjS33HEjf62Z_GjcgVxHZ4Xa5c54TR1DIDgYPuY,1714
358
358
  yellowdog_client/model/work_requirement_dashboard_summary.py,sha256=BeiBs92lS1InDuYc4yt5uuWKhoNqlfdXkk3PmyinIuc,273
359
359
  yellowdog_client/model/work_requirement_search.py,sha256=xQ6U7v7O0udd2LB79DjLzX4DqpuifIwzip7Uv17jU7Y,621
360
- yellowdog_client/model/work_requirement_status.py,sha256=w_XCB-SDBJQjHnkM28UivdA53MVaAlDk0PzUcZyZYmk,1301
360
+ yellowdog_client/model/work_requirement_status.py,sha256=JXFDJLakCmpUwv1R6j97lfU_YN7Ppb4YRvhYtWqclkA,1434
361
361
  yellowdog_client/model/work_requirement_summary.py,sha256=jEvsqI6IBykpP5_LAyoTiS5elHXfaQJ2Zj1FOwxQtMU,1374
362
362
  yellowdog_client/model/worker.py,sha256=KqUNIYwy9F-R4eY3Vk2JkZIyhERE-2CxmQe-6JgkI5Q,964
363
363
  yellowdog_client/model/worker_action.py,sha256=58HCgRGrOVIsz3aKPdwGrY51w5LQQwFlVPKBQ6808Wg,520
@@ -453,8 +453,8 @@ yellowdog_client/object_store/utils/memory_mapped_file_writter.py,sha256=8l9E_m8
453
453
  yellowdog_client/scheduler/__init__.py,sha256=ZORtc_LUBoTcplpoDhCHZNannI3qjeohghNcoBYU3ts,927
454
454
  yellowdog_client/scheduler/predicated_work_subscription_event_listener.py,sha256=mLfaVRmIMtQbj9u6d8O_B-VaZxOy5l1kuGCfTsS_xPU,2056
455
455
  yellowdog_client/scheduler/predicated_worker_pool_subscription_event_listener.py,sha256=z7tCniTF8WL6HSV7QcMOWFvC9EGSRopBGLODFOQinTA,2080
456
- yellowdog_client/scheduler/work_client.py,sha256=_IRRPJLyTI2b8Y65weEEp_o2_GHy_FJAS1OMftuwSso,13035
457
- yellowdog_client/scheduler/work_client_impl.py,sha256=33O8T25bV-zHx3R3gSQ047NGuSmpWESn7sCaZmqgLFo,7343
456
+ yellowdog_client/scheduler/work_client.py,sha256=psfLSrJoJSNtj3tGD7lRHIZsLOTmUeaP7wdvdXGolLA,13963
457
+ yellowdog_client/scheduler/work_client_impl.py,sha256=oGabaKD5vU5UzrqTTtwKlnsVXTWx8xFLheWHTm_eGkw,7724
458
458
  yellowdog_client/scheduler/work_requirement_helper.py,sha256=vQMoI9emTMKLLmZSil3IGNUtxUl50MFuITJTv5Okvlo,4167
459
459
  yellowdog_client/scheduler/work_service_proxy.py,sha256=bSg0892B82uAN3zXSUGoSF0BjVzhTuzuZNEMS-wZRIw,2995
460
460
  yellowdog_client/scheduler/worker_pool_client.py,sha256=31JATKHyDTCCIOGVQGKLB_4S-u24EwVWDsYe_K1genY,15723
@@ -465,8 +465,8 @@ yellowdog_client/usage/__init__.py,sha256=XQwRJqTdxKZa1QUTsxBEL0TqQJeQHGyPklFeqc
465
465
  yellowdog_client/usage/allowances_client.py,sha256=H6n63jXjT4OwuWJgFUXSjSmvGTZz9uspy3kj3upinaA,1337
466
466
  yellowdog_client/usage/allowances_client_impl.py,sha256=nQPnSzJKhL3WvyCn5fmiDkwE84xZryH9YvV5Z1GjU4M,2061
467
467
  yellowdog_client/usage/allowances_service_proxy.py,sha256=uO6LWnpjIzUcZTGdOxPXn7SyYX7NMRqO5KUiHUGr490,1320
468
- yellowdog_sdk-11.2.1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
469
- yellowdog_sdk-11.2.1.dist-info/METADATA,sha256=TSZJS-1rynNgNKrUVOFg6lzSe4_HKTAalEgkstAitH0,3239
470
- yellowdog_sdk-11.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
471
- yellowdog_sdk-11.2.1.dist-info/top_level.txt,sha256=6PH16DcoqpYHhQ5A0UJOjf0tg-1rTrNC9C2CLqCMuFo,26
472
- yellowdog_sdk-11.2.1.dist-info/RECORD,,
468
+ yellowdog_sdk-11.5.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
469
+ yellowdog_sdk-11.5.0.dist-info/METADATA,sha256=im2b4GxmI9C333Fn03WLVVQmrP5Ah-UawWaXGiiFQv4,3239
470
+ yellowdog_sdk-11.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
471
+ yellowdog_sdk-11.5.0.dist-info/top_level.txt,sha256=6PH16DcoqpYHhQ5A0UJOjf0tg-1rTrNC9C2CLqCMuFo,26
472
+ yellowdog_sdk-11.5.0.dist-info/RECORD,,