pyegeria 0.2.4__py3-none-any.whl → 0.3.2__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.
- pyegeria/__init__.py +13 -8
- pyegeria/_client.py +164 -105
- pyegeria/_exceptions.py +2 -1
- pyegeria/_validators.py +2 -2
- pyegeria/automated_curation_omvs.py +2188 -0
- pyegeria/core_omag_server_config.py +43 -39
- pyegeria/full_omag_server_config.py +1180 -0
- pyegeria/glossary_omvs.py +204 -66
- pyegeria/gov_engine.py +92 -201
- pyegeria/governance_author.py +184 -0
- pyegeria/my_profile_omvs.py +976 -0
- pyegeria/platform_services.py +67 -35
- pyegeria/server_operations.py +92 -25
- pyegeria/utils.py +5 -17
- {pyegeria-0.2.4.dist-info → pyegeria-0.3.2.dist-info}/METADATA +22 -18
- pyegeria-0.3.2.dist-info/RECORD +21 -0
- {pyegeria-0.2.4.dist-info → pyegeria-0.3.2.dist-info}/WHEEL +2 -1
- pyegeria-0.3.2.dist-info/top_level.txt +1 -0
- pyegeria/config.toml +0 -11
- pyegeria/curation_omvs.py +0 -458
- pyegeria/exceptions.py +0 -382
- pyegeria-0.2.4.dist-info/RECORD +0 -19
- {pyegeria-0.2.4.dist-info/licenses → pyegeria-0.3.2.dist-info}/LICENSE +0 -0
pyegeria/gov_engine.py
CHANGED
@@ -5,26 +5,13 @@ Copyright Contributors to the ODPi Egeria project.
|
|
5
5
|
Governance Engine functions. These functions initiate and manage Governance Actions and Processes
|
6
6
|
"""
|
7
7
|
|
8
|
-
import sys
|
9
|
-
import json
|
10
8
|
from datetime import datetime
|
11
|
-
from ._client import Client
|
12
|
-
from ._globals import enable_ssl_check, is_debug
|
13
|
-
from requests import Response
|
14
|
-
|
15
|
-
|
16
|
-
from .exceptions import (
|
17
|
-
OMAGCommonErrorCode,
|
18
|
-
EgeriaException,
|
19
|
-
InvalidParameterException,
|
20
|
-
OMAGServerInstanceErrorCode,
|
21
|
-
PropertyServerException,
|
22
|
-
UserNotAuthorizedException
|
23
|
-
)
|
24
9
|
|
10
|
+
from ._client import Client
|
11
|
+
from ._globals import enable_ssl_check
|
25
12
|
|
26
13
|
|
27
|
-
def body_slimmer(body:dict)-> dict:
|
14
|
+
def body_slimmer(body: dict) -> dict:
|
28
15
|
""" body_slimmer is a little function to remove unused keys from a dict
|
29
16
|
|
30
17
|
Parameters
|
@@ -67,8 +54,6 @@ class GovEng(Client):
|
|
67
54
|
|
68
55
|
"""
|
69
56
|
|
70
|
-
|
71
|
-
|
72
57
|
def __init__(
|
73
58
|
self,
|
74
59
|
server_name: str,
|
@@ -86,14 +71,8 @@ class GovEng(Client):
|
|
86
71
|
+ "/open-metadata/framework-services/governance-engine/open-governance-service/users/"
|
87
72
|
+ user_id
|
88
73
|
)
|
89
|
-
|
90
|
-
|
91
|
-
# + "/servers/" + server_name
|
92
|
-
# + "/open-metadata/framework-services/governance-engine/users/"
|
93
|
-
# + user_id
|
94
|
-
# )
|
95
|
-
|
96
|
-
def get_engine_actions(self, start_from: str = 0, page_size: str = 0) -> [dict]:
|
74
|
+
|
75
|
+
def get_engine_actions(self, start_from: int = 0, page_size: int = 0) -> [dict]:
|
97
76
|
""" Get engine actions associated deployed on the server.
|
98
77
|
|
99
78
|
Args:
|
@@ -115,15 +94,8 @@ class GovEng(Client):
|
|
115
94
|
str(start_from) + "&pageSize=" + str(page_size))
|
116
95
|
response = self.make_request("GET", url)
|
117
96
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
related_code = response.json().get("relatedHTTPCode")
|
122
|
-
if related_code == 200:
|
123
|
-
governanceActionElements = response.json().get('elements')
|
124
|
-
return governanceActionElements
|
125
|
-
else:
|
126
|
-
raise InvalidParameterException(response.content)
|
97
|
+
governance_elements = response.json().get('elements')
|
98
|
+
return governance_elements
|
127
99
|
|
128
100
|
def get_engine_action(self, engine_action_guid: str) -> str:
|
129
101
|
""" Return the governance action associated with the supplied guid
|
@@ -146,17 +118,10 @@ class GovEng(Client):
|
|
146
118
|
url = self.engine_command_root + "/engine-actions/" + engine_action_guid
|
147
119
|
response = self.make_request("GET", url)
|
148
120
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
related_code = response.json().get("relatedHTTPCode")
|
153
|
-
if related_code == 200:
|
154
|
-
governanceActionElement = response.json().get('element')
|
155
|
-
return (governanceActionElement)
|
156
|
-
else:
|
157
|
-
raise InvalidParameterException(response.content)
|
121
|
+
governance_element = response.json().get('element')
|
122
|
+
return governance_element
|
158
123
|
|
159
|
-
def get_active_engine_actions(self, start_from:int = 0, page_size:int = 0) -> [str]:
|
124
|
+
def get_active_engine_actions(self, start_from: int = 0, page_size: int = 0) -> [str]:
|
160
125
|
""" Get active governance actions associated on the server.
|
161
126
|
|
162
127
|
Args:
|
@@ -174,21 +139,13 @@ class GovEng(Client):
|
|
174
139
|
Pagination of 0 defaults to server default.
|
175
140
|
"""
|
176
141
|
url = (self.engine_command_root + "/engine-actions/active?startFrom=" +
|
177
|
-
|
142
|
+
str(start_from) + "&pageSize=" + str(page_size))
|
178
143
|
|
179
144
|
response = self.make_request("GET", url)
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
related_code = response.json().get("relatedHTTPCode")
|
185
|
-
if related_code == 200:
|
186
|
-
governanceActionElements = response.json().get('elements')
|
187
|
-
return governanceActionElements
|
188
|
-
else:
|
189
|
-
raise InvalidParameterException(response.content)
|
190
|
-
|
191
|
-
def get_engine_actions_by_name(self, name: str, startFrom: int = 0, pageSize: int = 0) -> str:
|
145
|
+
governance_elements = response.json().get('elements')
|
146
|
+
return governance_elements
|
147
|
+
|
148
|
+
def get_engine_actions_by_name(self, name: str, start_from: int = 0, page_size: int = 0) -> str:
|
192
149
|
""" Retrieve engine actions matching the name string.
|
193
150
|
Args:
|
194
151
|
name (str): The qualified name or display name of the governance action to get.
|
@@ -207,24 +164,17 @@ class GovEng(Client):
|
|
207
164
|
|
208
165
|
"""
|
209
166
|
url = (self.engine_command_root + "/engine-actions/by-name?startFrom=" +
|
210
|
-
str(
|
167
|
+
str(start_from) + "&pageSize=" + str(page_size))
|
211
168
|
body = {
|
212
169
|
"class": "NameRequestBody",
|
213
170
|
"name": name
|
214
171
|
}
|
215
172
|
response = self.make_request("POST", url, body)
|
216
173
|
|
217
|
-
|
218
|
-
|
174
|
+
governance_elements = response.json().get('elements')
|
175
|
+
return governance_elements
|
219
176
|
|
220
|
-
|
221
|
-
if related_code == 200:
|
222
|
-
governanceActionElements = response.json().get('elements')
|
223
|
-
return governanceActionElements
|
224
|
-
else:
|
225
|
-
raise InvalidParameterException(response.content)
|
226
|
-
|
227
|
-
def find_engine_actions(self, search_string:str, startFrom: int=0, pageSize:int=0) -> [str]:
|
177
|
+
def find_engine_actions(self, search_string: str, start_from: int = 0, page_size: int = 0) -> [str]:
|
228
178
|
""" Search for engine actions matching the search string.
|
229
179
|
|
230
180
|
Args:
|
@@ -243,26 +193,17 @@ class GovEng(Client):
|
|
243
193
|
Pagination of 0 defaults to server default.
|
244
194
|
"""
|
245
195
|
url = (self.engine_command_root + "/engine-actions/by-search-string?startFrom=" +
|
246
|
-
|
196
|
+
str(start_from) + "&pageSize=" + str(page_size))
|
247
197
|
body = {
|
248
198
|
"class": "SearchStringRequestBody",
|
249
199
|
"searchString": search_string
|
250
200
|
}
|
251
201
|
response = self.make_request("POST", url, body)
|
252
202
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
related_code = response.json().get("relatedHTTPCode")
|
257
|
-
if related_code == 200:
|
258
|
-
governanceActionElements = response.json().get('elements')
|
259
|
-
return governanceActionElements
|
260
|
-
else:
|
261
|
-
raise InvalidParameterException(response.content)
|
203
|
+
governance_elements = response.json().get('elements')
|
204
|
+
return governance_elements
|
262
205
|
|
263
|
-
|
264
|
-
|
265
|
-
def get_governance_action_process_by_guid(self, gov_process_guid: str)->str:
|
206
|
+
def get_governance_action_process_by_guid(self, gov_process_guid: str) -> str:
|
266
207
|
"""
|
267
208
|
Retrieves information about a governance action process based on its GUID.
|
268
209
|
|
@@ -285,18 +226,10 @@ class GovEng(Client):
|
|
285
226
|
"""
|
286
227
|
url = self.engine_command_root + "/governance-action-processes/" + gov_process_guid
|
287
228
|
response = self.make_request("GET", url)
|
229
|
+
governance_element = response.json().get('element')
|
230
|
+
return governance_element
|
288
231
|
|
289
|
-
|
290
|
-
return response.json() # should never get here?
|
291
|
-
|
292
|
-
related_code = response.json().get("relatedHTTPCode")
|
293
|
-
if related_code == 200:
|
294
|
-
governanceActionElement = response.json().get('element')
|
295
|
-
return(governanceActionElement)
|
296
|
-
else:
|
297
|
-
raise InvalidParameterException(response.content)
|
298
|
-
|
299
|
-
def get_governance_action_processes_by_name(self, name:str, start_from: int=0, page_size: int=0) -> [str]:
|
232
|
+
def get_governance_action_processes_by_name(self, name: str, start_from: int = 0, page_size: int = 0) -> [str]:
|
300
233
|
"""
|
301
234
|
Retrieves governance action processes based on their name only (no wildcards).
|
302
235
|
|
@@ -316,26 +249,18 @@ class GovEng(Client):
|
|
316
249
|
Pagination of 0 defaults to server default.
|
317
250
|
|
318
251
|
"""
|
319
|
-
url =
|
320
|
-
|
252
|
+
url = (self.engine_command_root + "/governance-action-processes/by-name?startFrom=" + str(start_from)
|
253
|
+
+ "&pageSize=" + str(page_size))
|
321
254
|
body = {
|
322
|
-
"class"
|
323
|
-
"name"
|
255
|
+
"class": "NameRequestBody",
|
256
|
+
"name": name
|
324
257
|
}
|
325
258
|
response = self.make_request("POST", url, body)
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
related_code = response.json().get("relatedHTTPCode")
|
331
|
-
if related_code == 200:
|
332
|
-
governanceActionElements = response.json().get('elements')
|
333
|
-
return governanceActionElements
|
334
|
-
else:
|
335
|
-
raise InvalidParameterException(response.content)
|
336
|
-
|
259
|
+
governance_elements = response.json().get('elements')
|
260
|
+
return governance_elements
|
261
|
+
|
337
262
|
def find_governance_action_processes(self, search_string: str, start_from: int = 0, page_size: int = 0) -> [str]:
|
338
|
-
|
263
|
+
""" Return governance action processes that match the search string (with regex).
|
339
264
|
|
340
265
|
Args:
|
341
266
|
search_string (str): The search string to query for.
|
@@ -352,7 +277,7 @@ class GovEng(Client):
|
|
352
277
|
Note:
|
353
278
|
Pagination of 0 defaults to server default.
|
354
279
|
|
355
|
-
|
280
|
+
"""
|
356
281
|
url = (self.engine_command_root + "/governance-action-processes/by-search-string?startFrom=" + str(start_from)
|
357
282
|
+ "&pageSize=" + str(page_size))
|
358
283
|
body = {
|
@@ -361,20 +286,12 @@ class GovEng(Client):
|
|
361
286
|
}
|
362
287
|
response = self.make_request("POST", url, body)
|
363
288
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
related_code = response.json().get("relatedHTTPCode")
|
368
|
-
if related_code == 200:
|
369
|
-
governanceActionElements = response.json().get('elements')
|
370
|
-
return governanceActionElements
|
371
|
-
else:
|
372
|
-
raise InvalidParameterException(response.content)
|
373
|
-
|
289
|
+
governance_elements = response.json().get('elements')
|
290
|
+
return governance_elements
|
291
|
+
|
374
292
|
def initiate_governance_action_process(self, qualified_name: str, request_source_guids: [str],
|
375
|
-
|
376
|
-
|
377
|
-
) -> str:
|
293
|
+
action_targets: [str], start_time: datetime, request_parameters: dict,
|
294
|
+
orig_service_name: str, orig_engine_name: str) -> str:
|
378
295
|
""" initiate_gov_action_process
|
379
296
|
|
380
297
|
This method starts a governance action process using the supplied parameters.
|
@@ -409,34 +326,26 @@ class GovEng(Client):
|
|
409
326
|
"""
|
410
327
|
url = self.engine_command_root + "/governance-action-processes/initiate"
|
411
328
|
body = {
|
412
|
-
"class"
|
413
|
-
"processQualifiedName"
|
414
|
-
"requestSourceGUIDs"
|
415
|
-
"actionTargets"
|
416
|
-
"startTime"
|
417
|
-
"requestParameters"
|
418
|
-
"originatorServiceName"
|
419
|
-
"originatorEngineName"
|
329
|
+
"class": "GovernanceActionProcessRequestBody",
|
330
|
+
"processQualifiedName": qualified_name,
|
331
|
+
"requestSourceGUIDs": request_source_guids,
|
332
|
+
"actionTargets": action_targets,
|
333
|
+
"startTime": int(start_time.timestamp() * 1000),
|
334
|
+
"requestParameters": request_parameters,
|
335
|
+
"originatorServiceName": orig_service_name,
|
336
|
+
"originatorEngineName": orig_engine_name
|
420
337
|
}
|
421
338
|
new_body = body_slimmer(body)
|
422
339
|
response = self.make_request("POST", url, new_body)
|
423
340
|
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
def initiate_engine_action (self, qualified_name: str, domain_identifier: int, display_name: str,
|
435
|
-
description: str, request_source_guids: str, action_targets: str,
|
436
|
-
received_guards: [str], start_time: datetime, gov_engine_name: str,
|
437
|
-
request_type: str, request_parameters: dict, process_name: str,
|
438
|
-
request_src_name: str= None, originator_svc_name: str= None,
|
439
|
-
originator_eng_name: str = None) -> str:
|
341
|
+
return response.json().get('guid')
|
342
|
+
|
343
|
+
def initiate_engine_action(self, qualified_name: str, domain_identifier: int, display_name: str,
|
344
|
+
description: str, request_source_guids: str, action_targets: str,
|
345
|
+
received_guards: [str], start_time: datetime, gov_engine_name: str,
|
346
|
+
request_type: str, request_parameters: dict, process_name: str,
|
347
|
+
request_src_name: str = None, originator_svc_name: str = None,
|
348
|
+
originator_eng_name: str = None) -> str:
|
440
349
|
"""
|
441
350
|
Initiates an engine action with the specified parameters.
|
442
351
|
|
@@ -465,7 +374,8 @@ class GovEng(Client):
|
|
465
374
|
this exception is raised with details from the response content.
|
466
375
|
|
467
376
|
Note:
|
468
|
-
The `start_time` parameter should be a `datetime` object representing the start
|
377
|
+
The `start_time` parameter should be a `datetime` object representing the start
|
378
|
+
time of the governance action.
|
469
379
|
|
470
380
|
|
471
381
|
"""
|
@@ -473,35 +383,27 @@ class GovEng(Client):
|
|
473
383
|
"/engine-actions/initiate")
|
474
384
|
|
475
385
|
body = {
|
476
|
-
"class"
|
477
|
-
"qualifiedName"
|
478
|
-
"domainIdentifier"
|
479
|
-
"displayName"
|
480
|
-
"description"
|
481
|
-
"requestSourceGUIDs"
|
482
|
-
"actionTargets"
|
483
|
-
"receivedGuards"
|
484
|
-
"startTime"
|
485
|
-
"requestType"
|
486
|
-
"requestParameters"
|
487
|
-
"
|
488
|
-
"requestSourceName"
|
489
|
-
"originatorServiceName"
|
490
|
-
"originatorEngineName"
|
386
|
+
"class": "GovernanceActionRequestBody",
|
387
|
+
"qualifiedName": qualified_name + str(int(start_time.timestamp())),
|
388
|
+
"domainIdentifier": domain_identifier,
|
389
|
+
"displayName": display_name,
|
390
|
+
"description": description,
|
391
|
+
"requestSourceGUIDs": request_source_guids,
|
392
|
+
"actionTargets": action_targets,
|
393
|
+
"receivedGuards": received_guards,
|
394
|
+
"startTime": int(start_time.timestamp()*1000),
|
395
|
+
"requestType": request_type,
|
396
|
+
"requestParameters": request_parameters,
|
397
|
+
"process_name": process_name,
|
398
|
+
"requestSourceName": request_src_name,
|
399
|
+
"originatorServiceName": originator_svc_name,
|
400
|
+
"originatorEngineName": originator_eng_name
|
491
401
|
}
|
492
402
|
new_body = body_slimmer(body)
|
493
403
|
response = self.make_request("POST", url, new_body)
|
494
|
-
|
495
|
-
return response.json() # should never get here?
|
496
|
-
|
497
|
-
related_code = response.json().get("relatedHTTPCode")
|
498
|
-
if related_code == 200:
|
499
|
-
return response.json().get('guid')
|
500
|
-
else:
|
501
|
-
raise InvalidParameterException(response.content)
|
502
|
-
|
404
|
+
return response.json().get('guid')
|
503
405
|
|
504
|
-
def print_engine_action_summary(self,
|
406
|
+
def print_engine_action_summary(self, governance_action: dict):
|
505
407
|
""" print_governance_action_summary
|
506
408
|
|
507
409
|
Print all the governance actions with their status, in the server.
|
@@ -518,25 +420,25 @@ class GovEng(Client):
|
|
518
420
|
PropertyServerException
|
519
421
|
UserNotAuthorizedException
|
520
422
|
"""
|
521
|
-
if
|
522
|
-
name =
|
423
|
+
if governance_action:
|
424
|
+
name = governance_action.get('displayName')
|
523
425
|
if not name:
|
524
|
-
name =
|
525
|
-
|
526
|
-
if
|
527
|
-
|
426
|
+
name = governance_action.get('qualifiedName')
|
427
|
+
action_status = governance_action.get('action_status')
|
428
|
+
if governance_action.get('completion_guards'):
|
429
|
+
completion_guards = governance_action.get('completion_guards')
|
528
430
|
else:
|
529
|
-
|
530
|
-
if
|
531
|
-
|
431
|
+
completion_guards = "\t"
|
432
|
+
if governance_action.get('process_name'):
|
433
|
+
process_name = governance_action.get('process_name')
|
532
434
|
else:
|
533
|
-
|
534
|
-
if
|
535
|
-
|
435
|
+
process_name = "\t"
|
436
|
+
if governance_action.get('completion_message'):
|
437
|
+
completion_message = governance_action.get('completion_message')
|
536
438
|
else:
|
537
|
-
|
538
|
-
print(
|
539
|
-
map(str,
|
439
|
+
completion_message = ""
|
440
|
+
print(action_status + "\n\t| " + name + "\t| " + process_name + "\t| " + '%s' % ', '.join(
|
441
|
+
map(str, completion_guards)) + "\t| " + completion_message)
|
540
442
|
|
541
443
|
def print_engine_actions(self):
|
542
444
|
""" print_governance_actions
|
@@ -556,18 +458,7 @@ class GovEng(Client):
|
|
556
458
|
UserNotAuthorizedException
|
557
459
|
|
558
460
|
"""
|
559
|
-
governance_actions = self.get_engine_actions(0,0)
|
560
|
-
if governance_actions
|
461
|
+
governance_actions = self.get_engine_actions(0, 0)
|
462
|
+
if governance_actions is not None:
|
561
463
|
for x in range(len(governance_actions)):
|
562
464
|
self.print_engine_action_summary(governance_actions[x])
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
@@ -0,0 +1,184 @@
|
|
1
|
+
"""
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
4
|
+
|
5
|
+
This module is incomplete.
|
6
|
+
The methods to author governance processes are transitioning to this module.
|
7
|
+
|
8
|
+
"""
|
9
|
+
|
10
|
+
from requests import Response
|
11
|
+
|
12
|
+
from pyegeria._exceptions import (
|
13
|
+
InvalidParameterException,
|
14
|
+
)
|
15
|
+
from pyegeria import Platform, AutomatedCuration
|
16
|
+
import asyncio
|
17
|
+
|
18
|
+
|
19
|
+
class GovernanceAuthor(AutomatedCuration):
|
20
|
+
"""
|
21
|
+
Client to issue Curation requests.
|
22
|
+
|
23
|
+
Attributes:
|
24
|
+
|
25
|
+
platform_url : str
|
26
|
+
URL of the server platform to connect to
|
27
|
+
user_id : str
|
28
|
+
The identity of the user calling the method - this sets a default optionally used by the methods
|
29
|
+
when the user doesn't pass the user_id on a method call.
|
30
|
+
user_pwd: str
|
31
|
+
The password associated with the user_id. Defaults to None
|
32
|
+
verify_flag: bool
|
33
|
+
Flag to indicate if SSL Certificates should be verified in the HTTP requests.
|
34
|
+
Defaults to False.
|
35
|
+
|
36
|
+
Methods:
|
37
|
+
|
38
|
+
"""
|
39
|
+
|
40
|
+
def __init__(
|
41
|
+
self,
|
42
|
+
server_name: str,
|
43
|
+
platform_url: str,
|
44
|
+
user_id: str,
|
45
|
+
user_pwd: str = None,
|
46
|
+
verify_flag: bool = False,
|
47
|
+
):
|
48
|
+
AutomatedCuration.__init__(self, server_name, platform_url, user_id,
|
49
|
+
user_pwd, verify_flag)
|
50
|
+
self.cur_command_root = f"{platform_url}/servers/"
|
51
|
+
|
52
|
+
async def _async_create_element_from_template(self, body:str, server:str = None)-> str:
|
53
|
+
""" Create a metadata element from a template. Async version.
|
54
|
+
Parameters
|
55
|
+
----------
|
56
|
+
body : str
|
57
|
+
The json body used to instantiate the template.
|
58
|
+
server : str, optional
|
59
|
+
The name of the server to get governance engine summaries from. If not provided, the default server name will be used.
|
60
|
+
|
61
|
+
Returns
|
62
|
+
-------
|
63
|
+
Response
|
64
|
+
The guid of the resulting element
|
65
|
+
|
66
|
+
"""
|
67
|
+
if server is None:
|
68
|
+
server = self.server_name
|
69
|
+
|
70
|
+
url = f"{self.platform_url}/servers/{server}/open-metadata/automate-curation/catalog-templates/new-element"
|
71
|
+
|
72
|
+
response = await self._async_make_request("POST", url, body)
|
73
|
+
return response.json().get("guid")
|
74
|
+
|
75
|
+
|
76
|
+
async def _async_find_gov_action_types(self, search_string: str='*', server_name:str=None)-> dict | str:
|
77
|
+
pass
|
78
|
+
|
79
|
+
async def _async_get_gov_action_types_by_name(self, server_name:str=None) -> dict | str:
|
80
|
+
pass
|
81
|
+
|
82
|
+
async def _async_find_gov_action_types_by_guid(self, guid: str, server_name:str=None) -> dict | str:
|
83
|
+
pass
|
84
|
+
|
85
|
+
# Governance Action Processes
|
86
|
+
|
87
|
+
# async def _async_create_gov_action_process(self, body: dict, server_name:str=None) -> None:
|
88
|
+
# pass
|
89
|
+
#
|
90
|
+
# async def _async_update_gov_action_process(self, process_id: str, body: dict, server_name:str=None) -> None:
|
91
|
+
# pass
|
92
|
+
#
|
93
|
+
# async def _async_publish_gov_action_process(self, process_id:str, server_name:str=None) -> None:
|
94
|
+
# pass
|
95
|
+
#
|
96
|
+
# async def _async_withdraw_gov_action_process(self, process_id:str, server_name:str=None) -> None:
|
97
|
+
# pass
|
98
|
+
#
|
99
|
+
# async def _async_remove_gov_action_process(self, process_id: str, server_name: str = None) -> None:
|
100
|
+
# pass
|
101
|
+
|
102
|
+
async def _async_find_gov_action_processes(self, search_string:str, server_name:str=None) -> dict | str:
|
103
|
+
pass
|
104
|
+
|
105
|
+
async def _async_get_gov_action_processes_by_name(self, name:str, server_name:str=None) -> dict | str:
|
106
|
+
pass
|
107
|
+
|
108
|
+
async def _async_get_gov_action_processes_by_guid(self, guid:str, server_name:str=None) -> dict | str:
|
109
|
+
pass
|
110
|
+
|
111
|
+
async def _async_get_gov_action_process_graph(self, guid:str, server_name:str=None) -> dict | str:
|
112
|
+
pass
|
113
|
+
|
114
|
+
# Process Steps
|
115
|
+
# async def _async_create_gov_action_process_step(self, body: dict, server_name:str=None) -> None:
|
116
|
+
# pass
|
117
|
+
#
|
118
|
+
# async def _async_update_gov_action_process_step(self, guid: str, body: dict, server_name:str=None) -> None:
|
119
|
+
# pass
|
120
|
+
#
|
121
|
+
# async def _async_remove_gov_action_process_step(self, guid: str, server_name:str=None) -> None:
|
122
|
+
# pass
|
123
|
+
#
|
124
|
+
#
|
125
|
+
# async def _async_find_gov_action_process_step(self, search_string: str, server_name: str = None) -> dict | str:
|
126
|
+
# pass
|
127
|
+
#
|
128
|
+
#
|
129
|
+
# async def _async_get_gov_action_process_step_by_name(self, name: str, server_name: str = None) -> dict | str:
|
130
|
+
# pass
|
131
|
+
#
|
132
|
+
#
|
133
|
+
# async def _async_get_gov_action_process_step_by_guid(self, guid: str, server_name: str = None) -> dict | str:
|
134
|
+
# pass
|
135
|
+
#
|
136
|
+
#
|
137
|
+
# async def _async_setup_first_action_process_step(self, process_guid: str, process_step_guid:str,
|
138
|
+
# server_name: str = None) -> dict | str:
|
139
|
+
# pass
|
140
|
+
#
|
141
|
+
# async def _async_get_first_action_process_step(self, process_guid: str, server_name: str = None) -> dict | str:
|
142
|
+
# pass
|
143
|
+
#
|
144
|
+
# async def _async_remove_first_action_process_step(self, process_guid: str, server_name: str = None) -> None:
|
145
|
+
# pass
|
146
|
+
#
|
147
|
+
# async def _async_setup_next_action_process_step(self, process_guid: str, process_step_guid:str,
|
148
|
+
# next_process_step_guid:str, server_name: str = None) -> None:
|
149
|
+
# pass
|
150
|
+
#
|
151
|
+
#
|
152
|
+
# async def _async_update_next_action_process_step(self, guid: str, body: dict, server_name: str = None) -> None:
|
153
|
+
# pass
|
154
|
+
#
|
155
|
+
#
|
156
|
+
# async def _async_remove_next_action_process_step(self, guid: str, server_name: str = None) -> None:
|
157
|
+
# pass
|
158
|
+
#
|
159
|
+
#
|
160
|
+
# async def _async_get_next_action_process_step(self, guid: str, server_name: str = None) -> dict | str:
|
161
|
+
# pass
|
162
|
+
|
163
|
+
# Engine Actions
|
164
|
+
|
165
|
+
async def _async_initiate_Engine_action(self, gov_eng_name: str, body: dict, server_name: str = None) -> None:
|
166
|
+
pass
|
167
|
+
|
168
|
+
|
169
|
+
async def _async_initiate_gov_action_type(self, body: dict, server_name: str = None) -> None:
|
170
|
+
pass
|
171
|
+
#implement
|
172
|
+
|
173
|
+
async def _async_initiate_gov_action_processes(self):
|
174
|
+
pass
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
if __name__ == "__main__":
|
181
|
+
p = AutomatedCuration("meow", "https://127.0.0.1:9443", "garygeeke", verify_flag=False)
|
182
|
+
response = p.get_active_service_list_for_server()
|
183
|
+
out = response.json()["result"]
|
184
|
+
print(out)
|