pyegeria 0.8.4.36__py3-none-any.whl → 0.8.4.38__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.
- commands/ops/load_archive.py +0 -2
- pyegeria/asset_catalog_omvs.py +9 -9
- pyegeria/automated_curation_omvs.py +5 -5
- pyegeria/classification_manager_omvs.py +193 -407
- pyegeria/collection_manager_omvs.py +160 -280
- pyegeria/core_omag_server_config.py +77 -72
- pyegeria/egeria_cat_client.py +11 -6
- pyegeria/egeria_client.py +3 -2
- pyegeria/egeria_config_client.py +5 -0
- pyegeria/egeria_my_client.py +9 -4
- pyegeria/egeria_tech_client.py +1 -1
- pyegeria/feedback_manager_omvs.py +92 -333
- pyegeria/full_omag_server_config.py +54 -50
- pyegeria/glossary_browser_omvs.py +128 -284
- pyegeria/glossary_manager_omvs.py +132 -451
- pyegeria/my_profile_omvs.py +57 -153
- pyegeria/platform_services.py +1 -1
- pyegeria/project_manager_omvs.py +110 -197
- pyegeria/registered_info.py +13 -13
- pyegeria/valid_metadata_omvs.py +75 -227
- pyegeria/x_action_author_omvs.py +1 -1
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.38.dist-info}/METADATA +1 -1
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.38.dist-info}/RECORD +26 -26
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.38.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.38.dist-info}/WHEEL +0 -0
- {pyegeria-0.8.4.36.dist-info → pyegeria-0.8.4.38.dist-info}/entry_points.txt +0 -0
pyegeria/my_profile_omvs.py
CHANGED
@@ -19,7 +19,7 @@ class MyProfile(Client):
|
|
19
19
|
|
20
20
|
Parameters
|
21
21
|
----------
|
22
|
-
|
22
|
+
view_server : str
|
23
23
|
The name of the view server to configure.
|
24
24
|
platform_url : str
|
25
25
|
The URL of the platform.
|
@@ -29,14 +29,12 @@ class MyProfile(Client):
|
|
29
29
|
The user ID. Default is None.
|
30
30
|
user_pwd : str, optional
|
31
31
|
The user password. Default is None.
|
32
|
-
|
33
|
-
The flag indicating whether to use synchronous mode. Default
|
34
|
-
is True.
|
32
|
+
|
35
33
|
"""
|
36
34
|
|
37
35
|
def __init__(
|
38
36
|
self,
|
39
|
-
|
37
|
+
view_server: str,
|
40
38
|
platform_url: str,
|
41
39
|
user_id: str = None,
|
42
40
|
user_pwd: str = None,
|
@@ -44,26 +42,28 @@ class MyProfile(Client):
|
|
44
42
|
):
|
45
43
|
Client.__init__(
|
46
44
|
self,
|
47
|
-
|
45
|
+
view_server,
|
48
46
|
platform_url,
|
49
47
|
user_id=user_id,
|
50
48
|
user_pwd=user_pwd,
|
51
49
|
token=token,
|
52
50
|
)
|
51
|
+
self.view_server = view_server
|
52
|
+
self.platform_url = platform_url
|
53
|
+
self.user_id = user_id
|
54
|
+
self.user_pwd = user_pwd
|
55
|
+
|
53
56
|
self.my_profile_command_root: str = f"{platform_url}/servers"
|
54
57
|
|
55
58
|
#
|
56
59
|
# MyProfile
|
57
60
|
#
|
58
61
|
|
59
|
-
async def _async_get_my_profile(self
|
62
|
+
async def _async_get_my_profile(self) -> dict | str:
|
60
63
|
"""Get the profile of the user associated with the token used.
|
61
64
|
|
62
65
|
Parameters
|
63
66
|
----------
|
64
|
-
server_name : str, optional
|
65
|
-
The name of the server to configure.
|
66
|
-
If not provided, the server name associated with the instance is used.
|
67
67
|
|
68
68
|
Returns
|
69
69
|
-------
|
@@ -81,23 +81,18 @@ class MyProfile(Client):
|
|
81
81
|
NotAuthorizedException
|
82
82
|
The principle specified by the user_id does not have authorization for the requested action
|
83
83
|
"""
|
84
|
-
|
85
|
-
|
86
|
-
url = (
|
87
|
-
f"{self.my_profile_command_root}/{server_name}/api/open-metadata/my-profile"
|
88
|
-
)
|
84
|
+
|
85
|
+
url = f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile"
|
89
86
|
|
90
87
|
response = await self._async_make_request("GET", url)
|
91
88
|
return response
|
92
89
|
|
93
|
-
def get_my_profile(self
|
90
|
+
def get_my_profile(self) -> dict | str:
|
94
91
|
"""Get the profile of the user associated with the token used.
|
95
92
|
|
96
93
|
Parameters
|
97
94
|
----------
|
98
|
-
|
99
|
-
The name of the server to configure.
|
100
|
-
If not provided, the server name associated with the instance is used.
|
95
|
+
|
101
96
|
|
102
97
|
Returns
|
103
98
|
-------
|
@@ -116,7 +111,7 @@ class MyProfile(Client):
|
|
116
111
|
The principle specified by the user_id does not have authorization for the requested action
|
117
112
|
"""
|
118
113
|
loop = asyncio.get_event_loop()
|
119
|
-
response = loop.run_until_complete(self._async_get_my_profile(
|
114
|
+
response = loop.run_until_complete(self._async_get_my_profile())
|
120
115
|
|
121
116
|
return response.json().get("personalProfile", "No one found")
|
122
117
|
|
@@ -124,7 +119,6 @@ class MyProfile(Client):
|
|
124
119
|
self,
|
125
120
|
actor_guid: str,
|
126
121
|
status: str = "OPEN",
|
127
|
-
server_name: str = None,
|
128
122
|
start_from: int = 0,
|
129
123
|
page_size: int = 100,
|
130
124
|
) -> list | str:
|
@@ -136,8 +130,7 @@ class MyProfile(Client):
|
|
136
130
|
The GUID of the actor whose assigned actions are to be retrieved.
|
137
131
|
status: str
|
138
132
|
The status of teh action to filter on. Default value is "OPEN".
|
139
|
-
|
140
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
133
|
+
|
141
134
|
start_from: int, optional
|
142
135
|
The index from which to start retrieving the assigned actions. Default is 0.
|
143
136
|
page_size: int, optional
|
@@ -157,8 +150,6 @@ class MyProfile(Client):
|
|
157
150
|
NotAuthorizedException
|
158
151
|
The principle specified by the user_id does not have authorization for the requested action
|
159
152
|
"""
|
160
|
-
if server_name is None:
|
161
|
-
server_name = self.server_name
|
162
153
|
|
163
154
|
if page_size is None:
|
164
155
|
page_size = self.page_size
|
@@ -166,7 +157,7 @@ class MyProfile(Client):
|
|
166
157
|
body = {"status": status}
|
167
158
|
|
168
159
|
url = (
|
169
|
-
f"{self.my_profile_command_root}/{
|
160
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/actors/{actor_guid}"
|
170
161
|
f"/assigned/to-dos?startFrom={start_from}&pageSize={page_size}&"
|
171
162
|
)
|
172
163
|
|
@@ -178,7 +169,6 @@ class MyProfile(Client):
|
|
178
169
|
self,
|
179
170
|
actor_guid: str,
|
180
171
|
status: str = "OPEN",
|
181
|
-
server_name: str = None,
|
182
172
|
start_from: int = 0,
|
183
173
|
page_size: int = 100,
|
184
174
|
) -> list | str:
|
@@ -189,8 +179,7 @@ class MyProfile(Client):
|
|
189
179
|
The GUID of the actor whose assigned actions are to be retrieved.
|
190
180
|
status: str
|
191
181
|
The status of teh action to filter on. Default value is "OPEN".
|
192
|
-
|
193
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
182
|
+
|
194
183
|
start_from: int, optional
|
195
184
|
The index from which to start retrieving the assigned actions. Default is 0.
|
196
185
|
page_size: int, optional
|
@@ -212,9 +201,7 @@ class MyProfile(Client):
|
|
212
201
|
"""
|
213
202
|
loop = asyncio.get_event_loop()
|
214
203
|
response = loop.run_until_complete(
|
215
|
-
self._async_get_assigned_actions(
|
216
|
-
actor_guid, status, server_name, start_from, page_size
|
217
|
-
)
|
204
|
+
self._async_get_assigned_actions(actor_guid, status, start_from, page_size)
|
218
205
|
)
|
219
206
|
|
220
207
|
return response
|
@@ -223,7 +210,6 @@ class MyProfile(Client):
|
|
223
210
|
self,
|
224
211
|
element_guid: str,
|
225
212
|
status: str = "OPEN",
|
226
|
-
server_name: str = None,
|
227
213
|
start_from: int = 0,
|
228
214
|
page_size: int = 100,
|
229
215
|
) -> list | str:
|
@@ -235,8 +221,7 @@ class MyProfile(Client):
|
|
235
221
|
The GUID of the target whose assigned actions are to be retrieved.
|
236
222
|
status: str
|
237
223
|
The status of teh action to filter on. Default value is "OPEN".
|
238
|
-
|
239
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
224
|
+
|
240
225
|
start_from: int, optional
|
241
226
|
The index from which to start retrieving the assigned actions. Default is 0.
|
242
227
|
page_size: int, optional
|
@@ -256,15 +241,13 @@ class MyProfile(Client):
|
|
256
241
|
NotAuthorizedException
|
257
242
|
The principle specified by the user_id does not have authorization for the requested action
|
258
243
|
"""
|
259
|
-
if server_name is None:
|
260
|
-
server_name = self.server_name
|
261
244
|
|
262
245
|
validate_name(element_guid)
|
263
246
|
|
264
247
|
body = {"status": status}
|
265
248
|
|
266
249
|
url = (
|
267
|
-
f"{self.my_profile_command_root}/{
|
250
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/elements/{element_guid}"
|
268
251
|
f"/action-targets/to-dos?start-from={start_from}&page-size={page_size}"
|
269
252
|
)
|
270
253
|
|
@@ -275,7 +258,6 @@ class MyProfile(Client):
|
|
275
258
|
self,
|
276
259
|
element_guid: str,
|
277
260
|
status: str = "OPEN",
|
278
|
-
server_name: str = None,
|
279
261
|
start_from: int = 0,
|
280
262
|
page_size: int = 100,
|
281
263
|
) -> list | str:
|
@@ -287,8 +269,7 @@ class MyProfile(Client):
|
|
287
269
|
The GUID of the target whose assigned actions are to be retrieved.
|
288
270
|
status: str
|
289
271
|
The status of teh action to filter on. Default value is "OPEN"
|
290
|
-
|
291
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
272
|
+
|
292
273
|
start_from: int, optional
|
293
274
|
The index from which to start retrieving the assigned actions. Default is 0.
|
294
275
|
page_size: int, optional
|
@@ -311,7 +292,7 @@ class MyProfile(Client):
|
|
311
292
|
loop = asyncio.get_event_loop()
|
312
293
|
response = loop.run_until_complete(
|
313
294
|
self._async_get_actions_for_action_target(
|
314
|
-
element_guid, status,
|
295
|
+
element_guid, status, start_from, page_size
|
315
296
|
)
|
316
297
|
)
|
317
298
|
|
@@ -321,7 +302,6 @@ class MyProfile(Client):
|
|
321
302
|
self,
|
322
303
|
element_guid: str,
|
323
304
|
status: str = "",
|
324
|
-
server_name: str = None,
|
325
305
|
start_from: int = 0,
|
326
306
|
page_size: int = 100,
|
327
307
|
) -> list | str:
|
@@ -333,8 +313,7 @@ class MyProfile(Client):
|
|
333
313
|
The GUID of the target whose assigned actions are to be retrieved.
|
334
314
|
status: str
|
335
315
|
The status of the action to filter on. Default value is "OPEN".
|
336
|
-
|
337
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
316
|
+
|
338
317
|
start_from: int, optional
|
339
318
|
The index from which to start retrieving the assigned actions. Default is 0.
|
340
319
|
page_size: int, optional
|
@@ -354,15 +333,13 @@ class MyProfile(Client):
|
|
354
333
|
NotAuthorizedException
|
355
334
|
The principle specified by the user_id does not have authorization for the requested action
|
356
335
|
"""
|
357
|
-
if server_name is None:
|
358
|
-
server_name = self.server_name
|
359
336
|
|
360
337
|
validate_name(element_guid)
|
361
338
|
|
362
339
|
body = {"status": status}
|
363
340
|
|
364
341
|
url = (
|
365
|
-
f"{self.my_profile_command_root}/{
|
342
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/elements/{element_guid}"
|
366
343
|
f"/sponsored/to-dos?startFrom={start_from}&pageSize={page_size}"
|
367
344
|
)
|
368
345
|
|
@@ -373,7 +350,6 @@ class MyProfile(Client):
|
|
373
350
|
self,
|
374
351
|
element_guid: str,
|
375
352
|
status: str = "OPEN",
|
376
|
-
server_name: str = None,
|
377
353
|
start_from: int = 0,
|
378
354
|
page_size: int = 100,
|
379
355
|
) -> list | str:
|
@@ -384,8 +360,7 @@ class MyProfile(Client):
|
|
384
360
|
The GUID of the target whose assigned actions are to be retrieved.
|
385
361
|
status: str
|
386
362
|
The status of teh action to filter on. Default value is "OPEN".
|
387
|
-
|
388
|
-
The name of the server. If not provided, the value of self.view_server will be used.
|
363
|
+
|
389
364
|
start_from: int, optional
|
390
365
|
The index from which to start retrieving the assigned actions. Default is 0.
|
391
366
|
page_size: int, optional
|
@@ -408,20 +383,18 @@ class MyProfile(Client):
|
|
408
383
|
loop = asyncio.get_event_loop()
|
409
384
|
response = loop.run_until_complete(
|
410
385
|
self._async_get_actions_for_sponsor(
|
411
|
-
element_guid, status,
|
386
|
+
element_guid, status, start_from, page_size
|
412
387
|
)
|
413
388
|
)
|
414
389
|
return response
|
415
390
|
|
416
|
-
async def _async_create_to_do(self, body: dict
|
391
|
+
async def _async_create_to_do(self, body: dict) -> str:
|
417
392
|
"""Create a To-Do item. Async version.
|
418
393
|
Parameters
|
419
394
|
----------
|
420
395
|
body : dict
|
421
396
|
The dictionary containing the details of the to-do item.
|
422
|
-
|
423
|
-
The name of the server where the to-do item will be created. If not provided,
|
424
|
-
the default server name associated with the instance of the class will be used.
|
397
|
+
|
425
398
|
|
426
399
|
Returns
|
427
400
|
-------
|
@@ -437,22 +410,17 @@ class MyProfile(Client):
|
|
437
410
|
NotAuthorizedException
|
438
411
|
The principle specified by the user_id does not have authorization for the requested action
|
439
412
|
"""
|
440
|
-
if server_name is None:
|
441
|
-
server_name = self.server_name
|
442
413
|
|
443
|
-
url = f"{self.my_profile_command_root}/{
|
414
|
+
url = f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos"
|
444
415
|
response = await self._async_make_request("POST", url, body)
|
445
416
|
return response.json().get("guid", "No guid returned")
|
446
417
|
|
447
|
-
def create_to_do(self, body: dict
|
418
|
+
def create_to_do(self, body: dict) -> str:
|
448
419
|
"""Create a To-Do item.
|
449
420
|
Parameters
|
450
421
|
----------
|
451
422
|
body : dict
|
452
423
|
The dictionary containing the details of the to-do item.
|
453
|
-
server_name : str, optional
|
454
|
-
The name of the server where the to-do item will be created. If not provided,
|
455
|
-
the default server name associated with the instance of the class will be used.
|
456
424
|
|
457
425
|
Returns
|
458
426
|
-------
|
@@ -487,20 +455,16 @@ class MyProfile(Client):
|
|
487
455
|
}
|
488
456
|
"""
|
489
457
|
loop = asyncio.get_event_loop()
|
490
|
-
response = loop.run_until_complete(self._async_create_to_do(body
|
458
|
+
response = loop.run_until_complete(self._async_create_to_do(body))
|
491
459
|
return response
|
492
460
|
|
493
|
-
async def _async_get_to_do(
|
494
|
-
self, todo_guid: str, server_name: str = None
|
495
|
-
) -> dict | str:
|
461
|
+
async def _async_get_to_do(self, todo_guid: str) -> dict | str:
|
496
462
|
"""Get a To-Do item. Async version.
|
497
463
|
Parameters
|
498
464
|
----------
|
499
465
|
todo_guid: str
|
500
466
|
Identifier of the To-Do item.
|
501
|
-
|
502
|
-
The name of the server where the to-do item will be created. If not provided,
|
503
|
-
the default server name associated with the instance of the class will be used.
|
467
|
+
|
504
468
|
|
505
469
|
Returns
|
506
470
|
-------
|
@@ -516,26 +480,22 @@ class MyProfile(Client):
|
|
516
480
|
NotAuthorizedException
|
517
481
|
The principle specified by the user_id does not have authorization for the requested action
|
518
482
|
"""
|
519
|
-
if server_name is None:
|
520
|
-
server_name = self.server_name
|
521
483
|
|
522
484
|
validate_name(todo_guid)
|
523
485
|
|
524
|
-
url = f"{self.my_profile_command_root}/{
|
486
|
+
url = f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/{todo_guid}"
|
525
487
|
|
526
488
|
response = await self._async_make_request("GET", url)
|
527
489
|
# return response.text if response is not None else "No Results"
|
528
490
|
return json.loads(response.text).get("elements", "No TODO returned")
|
529
491
|
|
530
|
-
def get_to_do(self, todo_guid: str
|
492
|
+
def get_to_do(self, todo_guid: str) -> dict | str:
|
531
493
|
"""Get a To-Do item. Async version.
|
532
494
|
Parameters
|
533
495
|
----------
|
534
496
|
todo_guid: str
|
535
497
|
Identifier of the To-Do item.
|
536
|
-
|
537
|
-
The name of the server where the to-do item will be created. If not provided,
|
538
|
-
the default server name associated with the instance of the class will be used.
|
498
|
+
|
539
499
|
|
540
500
|
Returns
|
541
501
|
-------
|
@@ -552,9 +512,7 @@ class MyProfile(Client):
|
|
552
512
|
The principle specified by the user_id does not have authorization for the requested action
|
553
513
|
"""
|
554
514
|
loop = asyncio.get_event_loop()
|
555
|
-
response = loop.run_until_complete(
|
556
|
-
self._async_get_to_do(todo_guid, server_name)
|
557
|
-
)
|
515
|
+
response = loop.run_until_complete(self._async_get_to_do(todo_guid))
|
558
516
|
|
559
517
|
return response
|
560
518
|
|
@@ -563,7 +521,6 @@ class MyProfile(Client):
|
|
563
521
|
todo_guid: str,
|
564
522
|
body: dict,
|
565
523
|
is_merge_update: bool = True,
|
566
|
-
server_name: str = None,
|
567
524
|
) -> None:
|
568
525
|
"""Update a To-Do item. Async version.
|
569
526
|
Parameters
|
@@ -572,9 +529,7 @@ class MyProfile(Client):
|
|
572
529
|
Identifier of the To-Do item.
|
573
530
|
body: str
|
574
531
|
The details to update the to-do item with.
|
575
|
-
|
576
|
-
The name of the server where the to-do item will be created. If not provided,
|
577
|
-
the default server name associated with the instance of the class will be used.
|
532
|
+
|
578
533
|
|
579
534
|
Returns
|
580
535
|
-------
|
@@ -590,15 +545,13 @@ class MyProfile(Client):
|
|
590
545
|
NotAuthorizedException
|
591
546
|
The principle specified by the user_id does not have authorization for the requested action
|
592
547
|
"""
|
593
|
-
if server_name is None:
|
594
|
-
server_name = self.server_name
|
595
548
|
|
596
549
|
is_merge_update_t = str(is_merge_update).lower()
|
597
550
|
|
598
551
|
validate_name(todo_guid)
|
599
552
|
|
600
553
|
url = (
|
601
|
-
f"{self.my_profile_command_root}/{
|
554
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/"
|
602
555
|
f"{todo_guid}?isMergeUpdate={is_merge_update_t}"
|
603
556
|
)
|
604
557
|
|
@@ -610,7 +563,6 @@ class MyProfile(Client):
|
|
610
563
|
todo_guid: str,
|
611
564
|
body: dict,
|
612
565
|
is_merge_update: bool = True,
|
613
|
-
server_name: str = None,
|
614
566
|
) -> None:
|
615
567
|
"""Update a To-Do item.
|
616
568
|
Parameters
|
@@ -621,9 +573,7 @@ class MyProfile(Client):
|
|
621
573
|
The details to update the to-do item with.
|
622
574
|
is_merge_update: bool [default: True]
|
623
575
|
If true then merges the updated information, otherwise replace the existing information.
|
624
|
-
|
625
|
-
The name of the server where the to-do item will be created. If not provided,
|
626
|
-
the default server name associated with the instance of the class will be used.
|
576
|
+
|
627
577
|
|
628
578
|
Returns
|
629
579
|
-------
|
@@ -642,21 +592,17 @@ class MyProfile(Client):
|
|
642
592
|
|
643
593
|
loop = asyncio.get_event_loop()
|
644
594
|
loop.run_until_complete(
|
645
|
-
self._async_update_to_do(todo_guid, body, is_merge_update
|
595
|
+
self._async_update_to_do(todo_guid, body, is_merge_update)
|
646
596
|
)
|
647
597
|
return
|
648
598
|
|
649
|
-
async def _async_delete_to_do(
|
650
|
-
self, todo_guid: str, server_name: str = None
|
651
|
-
) -> None:
|
599
|
+
async def _async_delete_to_do(self, todo_guid: str) -> None:
|
652
600
|
"""Delete a To-Do item. Async version.
|
653
601
|
Parameters
|
654
602
|
----------
|
655
603
|
todo_guid: str
|
656
604
|
Identifier of the To-Do item.
|
657
|
-
|
658
|
-
The name of the server where the to-do item will be created. If not provided,
|
659
|
-
the default server name associated with the instance of the class will be used.
|
605
|
+
|
660
606
|
|
661
607
|
Returns
|
662
608
|
-------
|
@@ -672,25 +618,21 @@ class MyProfile(Client):
|
|
672
618
|
NotAuthorizedException
|
673
619
|
The principle specified by the user_id does not have authorization for the requested action
|
674
620
|
"""
|
675
|
-
if server_name is None:
|
676
|
-
server_name = self.server_name
|
677
621
|
|
678
622
|
validate_name(todo_guid)
|
679
623
|
|
680
|
-
url = f"{self.my_profile_command_root}/{
|
624
|
+
url = f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/{todo_guid}/delete"
|
681
625
|
|
682
626
|
await self._async_make_request("POST", url)
|
683
627
|
return
|
684
628
|
|
685
|
-
def delete_to_do(self, todo_guid: str
|
629
|
+
def delete_to_do(self, todo_guid: str) -> None:
|
686
630
|
"""Delete a To-Do item.
|
687
631
|
Parameters
|
688
632
|
----------
|
689
633
|
todo_guid: str
|
690
634
|
Identifier of the To-Do item.
|
691
|
-
|
692
|
-
The name of the server where the to-do item will be created. If not provided,
|
693
|
-
the default server name associated with the instance of the class will be used.
|
635
|
+
|
694
636
|
|
695
637
|
Returns
|
696
638
|
-------
|
@@ -707,7 +649,7 @@ class MyProfile(Client):
|
|
707
649
|
The principle specified by the user_id does not have authorization for the requested action
|
708
650
|
"""
|
709
651
|
loop = asyncio.get_event_loop()
|
710
|
-
loop.run_until_complete(self._async_delete_to_do(todo_guid
|
652
|
+
loop.run_until_complete(self._async_delete_to_do(todo_guid))
|
711
653
|
return
|
712
654
|
|
713
655
|
async def _async_reassign_to_do(
|
@@ -715,7 +657,6 @@ class MyProfile(Client):
|
|
715
657
|
todo_guid: str,
|
716
658
|
actor_guid: str,
|
717
659
|
status: str = "OPEN",
|
718
|
-
server_name: str = None,
|
719
660
|
) -> None:
|
720
661
|
"""Reassign a To-Do item. Async version.
|
721
662
|
Parameters
|
@@ -726,9 +667,6 @@ class MyProfile(Client):
|
|
726
667
|
The actor to receive the reassigned to-do item.
|
727
668
|
status: str [default = "OPEN"]
|
728
669
|
Filter items to match this status.
|
729
|
-
server_name : str, optional
|
730
|
-
The name of the server where the to-do item will be created. If not provided,
|
731
|
-
the default server name associated with the instance of the class will be used.
|
732
670
|
|
733
671
|
Returns
|
734
672
|
-------
|
@@ -744,15 +682,13 @@ class MyProfile(Client):
|
|
744
682
|
NotAuthorizedException
|
745
683
|
The principle specified by the user_id does not have authorization for the requested action
|
746
684
|
"""
|
747
|
-
if server_name is None:
|
748
|
-
server_name = self.server_name
|
749
685
|
|
750
686
|
validate_name(todo_guid)
|
751
687
|
validate_name(actor_guid)
|
752
688
|
body = {"status": status}
|
753
689
|
|
754
690
|
url = (
|
755
|
-
f"{self.my_profile_command_root}/{
|
691
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/"
|
756
692
|
f"{todo_guid}/reassign/{actor_guid}"
|
757
693
|
)
|
758
694
|
|
@@ -764,7 +700,6 @@ class MyProfile(Client):
|
|
764
700
|
todo_guid: str,
|
765
701
|
actor_guid: str,
|
766
702
|
status: str = "OPEN",
|
767
|
-
server_name: str = None,
|
768
703
|
) -> None:
|
769
704
|
"""Reassign a To-Do item.
|
770
705
|
Parameters
|
@@ -775,9 +710,6 @@ class MyProfile(Client):
|
|
775
710
|
The actor to receive the reassigned to-do item.
|
776
711
|
status: str [default = "OPEN"]
|
777
712
|
Filter items to match this status.
|
778
|
-
server_name : str, optional
|
779
|
-
The name of the server where the to-do item will be created. If not provided,
|
780
|
-
the default server name associated with the instance of the class will be used.
|
781
713
|
|
782
714
|
Returns
|
783
715
|
-------
|
@@ -795,14 +727,13 @@ class MyProfile(Client):
|
|
795
727
|
"""
|
796
728
|
loop = asyncio.get_event_loop()
|
797
729
|
loop.run_until_complete(
|
798
|
-
self._async_reassign_to_do(todo_guid, actor_guid, status
|
730
|
+
self._async_reassign_to_do(todo_guid, actor_guid, status)
|
799
731
|
)
|
800
732
|
return
|
801
733
|
|
802
734
|
async def _async_find_to_do(
|
803
735
|
self,
|
804
736
|
search_string: str = "*",
|
805
|
-
server_name: str = "None",
|
806
737
|
status: str = None,
|
807
738
|
starts_with: bool = False,
|
808
739
|
ends_with: bool = False,
|
@@ -815,9 +746,6 @@ class MyProfile(Client):
|
|
815
746
|
----------
|
816
747
|
search_string: str
|
817
748
|
String to search against. If '*' then all to-do items will match.
|
818
|
-
server_name : str, optional
|
819
|
-
The name of the server where the to-do item will be created. If not provided,
|
820
|
-
the default server name associated with the instance of the class will be used.
|
821
749
|
status: str
|
822
750
|
Filter items to match this status. Defaults to "OPEN"
|
823
751
|
starts_with : bool, [default=False], optional
|
@@ -840,8 +768,6 @@ class MyProfile(Client):
|
|
840
768
|
NotAuthorizedException
|
841
769
|
The principle specified by the user_id does not have authorization for the requested action
|
842
770
|
"""
|
843
|
-
if server_name is None:
|
844
|
-
server_name = self.server_name
|
845
771
|
|
846
772
|
starts_with_s = str(starts_with).lower()
|
847
773
|
ends_with_s = str(ends_with).lower()
|
@@ -859,7 +785,7 @@ class MyProfile(Client):
|
|
859
785
|
validate_search_string(search_string)
|
860
786
|
|
861
787
|
url = (
|
862
|
-
f"{self.my_profile_command_root}/{
|
788
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/"
|
863
789
|
f"find-by-search-string?startFrom={start_from}&pageSize={page_size}&"
|
864
790
|
f"startsWith={starts_with_s}&endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
865
791
|
)
|
@@ -871,7 +797,6 @@ class MyProfile(Client):
|
|
871
797
|
def find_to_do(
|
872
798
|
self,
|
873
799
|
search_string: str,
|
874
|
-
server_name: str = None,
|
875
800
|
status: str = "OPEN",
|
876
801
|
starts_with: bool = False,
|
877
802
|
ends_with: bool = False,
|
@@ -918,7 +843,6 @@ class MyProfile(Client):
|
|
918
843
|
response = loop.run_until_complete(
|
919
844
|
self._async_find_to_do(
|
920
845
|
search_string,
|
921
|
-
server_name,
|
922
846
|
status,
|
923
847
|
starts_with,
|
924
848
|
ends_with,
|
@@ -932,7 +856,6 @@ class MyProfile(Client):
|
|
932
856
|
async def _async_get_to_dos_by_type(
|
933
857
|
self,
|
934
858
|
todo_type: str,
|
935
|
-
server_name: str = None,
|
936
859
|
status: str = "OPEN",
|
937
860
|
start_from: int = 0,
|
938
861
|
page_size: int = 100,
|
@@ -942,9 +865,6 @@ class MyProfile(Client):
|
|
942
865
|
----------
|
943
866
|
todo_type: str
|
944
867
|
Type of to-do to find
|
945
|
-
server_name : str, optional
|
946
|
-
The name of the server where the to-do item will be created. If not provided,
|
947
|
-
the default server name associated with the instance of the class will be used.
|
948
868
|
status: str
|
949
869
|
Filter items to match this status. Defaults to "OPEN"
|
950
870
|
start_from: int, [default=0], optional
|
@@ -965,8 +885,6 @@ class MyProfile(Client):
|
|
965
885
|
NotAuthorizedException
|
966
886
|
The principle specified by the user_id does not have authorization for the requested action
|
967
887
|
"""
|
968
|
-
if server_name is None:
|
969
|
-
server_name = self.server_name
|
970
888
|
|
971
889
|
validate_name(todo_type)
|
972
890
|
body = {
|
@@ -974,7 +892,7 @@ class MyProfile(Client):
|
|
974
892
|
}
|
975
893
|
|
976
894
|
url = (
|
977
|
-
f"{self.my_profile_command_root}/{
|
895
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/types/"
|
978
896
|
f"{todo_type}?startFrom={start_from}&pageSize={page_size}"
|
979
897
|
)
|
980
898
|
|
@@ -984,7 +902,6 @@ class MyProfile(Client):
|
|
984
902
|
def get_to_dos_by_type(
|
985
903
|
self,
|
986
904
|
todo_type: str,
|
987
|
-
server_name: str = None,
|
988
905
|
status: str = "OPEN",
|
989
906
|
start_from: int = 0,
|
990
907
|
page_size: int = 100,
|
@@ -994,9 +911,6 @@ class MyProfile(Client):
|
|
994
911
|
----------
|
995
912
|
todo_type: str
|
996
913
|
Type of to-do to find
|
997
|
-
server_name : str, optional
|
998
|
-
The name of the server where the to-do item will be created. If not provided,
|
999
|
-
the default server name associated with the instance of the class will be used.
|
1000
914
|
status: str
|
1001
915
|
Filter items to match this status. Defaults to "OPEN"
|
1002
916
|
start_from: int, [default=0], optional
|
@@ -1019,9 +933,7 @@ class MyProfile(Client):
|
|
1019
933
|
"""
|
1020
934
|
loop = asyncio.get_event_loop()
|
1021
935
|
response = loop.run_until_complete(
|
1022
|
-
self._async_get_to_dos_by_type(
|
1023
|
-
todo_type, server_name, status, start_from, page_size
|
1024
|
-
)
|
936
|
+
self._async_get_to_dos_by_type(todo_type, status, start_from, page_size)
|
1025
937
|
)
|
1026
938
|
return response
|
1027
939
|
|
@@ -1030,7 +942,6 @@ class MyProfile(Client):
|
|
1030
942
|
action_target_guid: str,
|
1031
943
|
body: dict,
|
1032
944
|
is_merge_update: bool = True,
|
1033
|
-
server_name: str = None,
|
1034
945
|
) -> None:
|
1035
946
|
"""Get To-Do items by type. Async version
|
1036
947
|
Parameters
|
@@ -1041,9 +952,7 @@ class MyProfile(Client):
|
|
1041
952
|
Details of the updates to make.
|
1042
953
|
is_merge_update : bool, [default=True], optional
|
1043
954
|
indicates if the update should be a merge or replacement.
|
1044
|
-
|
1045
|
-
The name of the server where the to-do item will be created. If not provided,
|
1046
|
-
the default server name associated with the instance of the class will be used.
|
955
|
+
|
1047
956
|
Returns
|
1048
957
|
-------
|
1049
958
|
None
|
@@ -1057,15 +966,13 @@ class MyProfile(Client):
|
|
1057
966
|
NotAuthorizedException
|
1058
967
|
The principle specified by the user_id does not have authorization for the requested action
|
1059
968
|
"""
|
1060
|
-
if server_name is None:
|
1061
|
-
server_name = self.server_name
|
1062
969
|
|
1063
970
|
is_merge_update_t = str(is_merge_update).lower()
|
1064
971
|
|
1065
972
|
validate_name(action_target_guid)
|
1066
973
|
|
1067
974
|
url = (
|
1068
|
-
f"{self.my_profile_command_root}/{
|
975
|
+
f"{self.my_profile_command_root}/{self.view_server}/api/open-metadata/my-profile/to-dos/"
|
1069
976
|
f"action-targets/{action_target_guid}?isMergeUpdate={is_merge_update_t}"
|
1070
977
|
)
|
1071
978
|
|
@@ -1077,7 +984,6 @@ class MyProfile(Client):
|
|
1077
984
|
action_target_guid: str,
|
1078
985
|
body: dict,
|
1079
986
|
is_merge_update: bool = True,
|
1080
|
-
server_name: str = None,
|
1081
987
|
) -> None:
|
1082
988
|
"""Get To-Do items by type.
|
1083
989
|
Parameters
|
@@ -1088,9 +994,7 @@ class MyProfile(Client):
|
|
1088
994
|
Details of the updates to make.
|
1089
995
|
is_merge_update : bool, [default=True], optional
|
1090
996
|
indicates if the update should be a merge or replacement.
|
1091
|
-
|
1092
|
-
The name of the server where the to-do item will be created. If not provided,
|
1093
|
-
the default server name associated with the instance of the class will be used.
|
997
|
+
|
1094
998
|
Returns
|
1095
999
|
-------
|
1096
1000
|
None
|
@@ -1107,7 +1011,7 @@ class MyProfile(Client):
|
|
1107
1011
|
loop = asyncio.get_event_loop()
|
1108
1012
|
loop.run_until_complete(
|
1109
1013
|
self._async_update_action_target_properties(
|
1110
|
-
action_target_guid, body, is_merge_update
|
1014
|
+
action_target_guid, body, is_merge_update
|
1111
1015
|
)
|
1112
1016
|
)
|
1113
1017
|
return
|