pyegeria 0.8.4.17__py3-none-any.whl → 0.8.4.19__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.
- {examples/widgets → commands}/cli/egeria.py +43 -43
- {examples/widgets → commands}/cli/egeria_cat.py +16 -16
- commands/cli/egeria_my.py +269 -0
- {examples/widgets → commands}/cli/egeria_ops.py +22 -23
- {examples/widgets → commands}/cli/egeria_tech.py +13 -13
- commands/ops/engine_actions.py +131 -0
- {examples/widgets → commands}/ops/integration_daemon_actions.py +33 -33
- commands/ops/refresh_integration_daemon.py +85 -0
- commands/ops/restart_integration_daemon.py +86 -0
- pyegeria/egeria_tech_client.py +2 -0
- pyegeria/runtime_manager_omvs.py +1014 -497
- {pyegeria-0.8.4.17.dist-info → pyegeria-0.8.4.19.dist-info}/METADATA +1 -1
- pyegeria-0.8.4.19.dist-info/RECORD +99 -0
- pyegeria-0.8.4.19.dist-info/entry_points.txt +60 -0
- examples/widgets/cli/egeria_my.py +0 -161
- examples/widgets/ops/engine_actions.py +0 -83
- examples/widgets/ops/refresh_integration_daemon.py +0 -73
- examples/widgets/ops/restart_integration_daemon.py +0 -73
- pyegeria-0.8.4.17.dist-info/RECORD +0 -99
- pyegeria-0.8.4.17.dist-info/entry_points.txt +0 -60
- {examples/widgets → commands}/cat/README.md +0 -0
- {examples/widgets → commands}/cat/__init__.py +0 -0
- {examples/widgets → commands}/cat/get_asset_graph.py +0 -0
- {examples/widgets → commands}/cat/get_collection.py +0 -0
- {examples/widgets → commands}/cat/get_project_dependencies.py +0 -0
- {examples/widgets → commands}/cat/get_project_structure.py +0 -0
- {examples/widgets → commands}/cat/get_tech_type_elements.py +0 -0
- {examples/widgets → commands}/cat/get_tech_type_template.py +0 -0
- {examples/widgets → commands}/cat/list_archives.py +0 -0
- {examples/widgets → commands}/cat/list_assets.py +0 -0
- {examples/widgets → commands}/cat/list_cert_types.py +0 -0
- {examples/widgets → commands}/cat/list_glossary.py +0 -0
- {examples/widgets → commands}/cat/list_projects.py +0 -0
- {examples/widgets → commands}/cat/list_relationships.py +0 -0
- {examples/widgets → commands}/cat/list_tech_types.py +0 -0
- {examples/widgets → commands}/cat/list_todos.py +0 -0
- {examples/widgets → commands}/cat/list_user_ids.py +0 -0
- {examples/widgets → commands}/cli/__init__.py +0 -0
- {examples/widgets → commands}/cli/ops_config.py +0 -0
- {examples/widgets → commands}/my/README.md +0 -0
- {examples/widgets → commands}/my/__init__.py +0 -0
- {examples/widgets → commands}/my/list_my_profile.py +0 -0
- {examples/widgets → commands}/my/list_my_roles.py +0 -0
- {examples/widgets → commands}/my/monitor_my_todos.py +0 -0
- {examples/widgets → commands}/my/monitor_open_todos.py +0 -0
- {examples/widgets → commands}/my/my_profile_actions.py +0 -0
- {examples/widgets → commands}/my/todo_actions.py +0 -0
- {examples/widgets → commands}/ops/README.md +0 -0
- {examples/widgets → commands}/ops/__init__.py +0 -0
- {examples/widgets → commands}/ops/list_catalog_targets.py +0 -0
- {examples/widgets → commands}/ops/load_archive.py +0 -0
- {examples/widgets → commands}/ops/monitor_asset_events.py +0 -0
- {examples/widgets → commands}/ops/monitor_coco_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_engine_activity.py +0 -0
- {examples/widgets → commands}/ops/monitor_engine_activity_c.py +0 -0
- {examples/widgets → commands}/ops/monitor_gov_eng_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_integ_daemon_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_platform_status.py +0 -0
- {examples/widgets → commands}/ops/monitor_server_list.py +0 -0
- {examples/widgets → commands}/ops/monitor_server_status.py +0 -0
- {examples/widgets → commands}/tech/README.md +0 -0
- {examples/widgets → commands}/tech/__init__.py +0 -0
- {examples/widgets → commands}/tech/get_element_info.py +0 -0
- {examples/widgets → commands}/tech/get_guid_info.py +0 -0
- {examples/widgets → commands}/tech/get_tech_details.py +0 -0
- {examples/widgets → commands}/tech/list_asset_types.py +0 -0
- {examples/widgets → commands}/tech/list_elements.py +0 -0
- {examples/widgets → commands}/tech/list_elements_x.py +0 -0
- {examples/widgets → commands}/tech/list_registered_services.py +0 -0
- {examples/widgets → commands}/tech/list_related_specification.py +0 -0
- {examples/widgets → commands}/tech/list_relationship_types.py +0 -0
- {examples/widgets → commands}/tech/list_tech_templates.py +0 -0
- {examples/widgets → commands}/tech/list_valid_metadata_values.py +0 -0
- {examples/widgets → commands}/tech/x_list_related_elements.py +0 -0
- {pyegeria-0.8.4.17.dist-info → pyegeria-0.8.4.19.dist-info}/LICENSE +0 -0
- {pyegeria-0.8.4.17.dist-info → pyegeria-0.8.4.19.dist-info}/WHEEL +0 -0
pyegeria/runtime_manager_omvs.py
CHANGED
@@ -42,23 +42,26 @@ class RuntimeManager(Client):
|
|
42
42
|
user_pwd: str = None,
|
43
43
|
token: str = None,
|
44
44
|
):
|
45
|
+
self.view_server = view_server
|
45
46
|
Client.__init__(self, view_server, platform_url, user_id, user_pwd, token=token)
|
46
|
-
self.cur_command_root = f"{platform_url}/servers/"
|
47
|
+
self.cur_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/runtime-manager"
|
47
48
|
self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a" # this is platform @ 9443 from the core content archive
|
48
49
|
self.default_platform_name = (
|
49
50
|
"Default Local OMAG Server Platform" # this from the core content archive
|
50
51
|
)
|
51
|
-
self.view_server = view_server
|
52
52
|
|
53
|
+
#
|
54
|
+
# Cohorts
|
55
|
+
#
|
53
56
|
async def _async_connect_to_cohort(
|
54
57
|
self,
|
55
58
|
server_guid: str,
|
56
59
|
cohort_name: str,
|
57
60
|
) -> None:
|
58
61
|
"""A new server needs to register the metadataCollectionId for its metadata repository with the other servers
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
+
in the open metadata repository. It only needs to do this once and uses a timestamp to record that the
|
63
|
+
registration event has been sent. If the server has already registered in the past, it sends a
|
64
|
+
reregistration request. Async version.
|
62
65
|
|
63
66
|
https://egeria-project.org/concepts/cohort-member/
|
64
67
|
|
@@ -82,7 +85,7 @@ class RuntimeManager(Client):
|
|
82
85
|
"""
|
83
86
|
|
84
87
|
url = (
|
85
|
-
f"{self.
|
88
|
+
f"{self.cur_command_root}/cohort-members/"
|
86
89
|
f"{server_guid}/cohorts/{cohort_name}/connect"
|
87
90
|
)
|
88
91
|
await self._async_make_request("GET", url)
|
@@ -94,9 +97,9 @@ class RuntimeManager(Client):
|
|
94
97
|
cohort_name: str,
|
95
98
|
) -> None:
|
96
99
|
"""A new server needs to register the metadataCollectionId for its metadata repository with the other servers
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
+
in the open metadata repository. It only needs to do this once and uses a timestamp to record that the
|
101
|
+
registration event has been sent. If the server has already registered in the past, it sends a
|
102
|
+
reregistration request.
|
100
103
|
|
101
104
|
https://egeria-project.org/concepts/cohort-member/
|
102
105
|
|
@@ -128,7 +131,9 @@ class RuntimeManager(Client):
|
|
128
131
|
cohort_name: str,
|
129
132
|
) -> None:
|
130
133
|
"""Disconnect communications from a specific cohort. Async version.
|
134
|
+
|
131
135
|
https://egeria-project.org/concepts/cohort-member/
|
136
|
+
|
132
137
|
Parameters
|
133
138
|
----------
|
134
139
|
server_guid : str
|
@@ -149,7 +154,7 @@ class RuntimeManager(Client):
|
|
149
154
|
"""
|
150
155
|
|
151
156
|
url = (
|
152
|
-
f"{self.
|
157
|
+
f"{self.cur_command_root}/cohort-members/"
|
153
158
|
f"{server_guid}/cohorts/{cohort_name}/disconnect"
|
154
159
|
)
|
155
160
|
await self._async_make_request("GET", url)
|
@@ -161,7 +166,9 @@ class RuntimeManager(Client):
|
|
161
166
|
cohort_name: str,
|
162
167
|
) -> None:
|
163
168
|
"""Disconnect communications from a specific cohort.
|
169
|
+
|
164
170
|
https://egeria-project.org/concepts/cohort-member/
|
171
|
+
|
165
172
|
Parameters
|
166
173
|
----------
|
167
174
|
server_guid: str
|
@@ -192,7 +199,9 @@ class RuntimeManager(Client):
|
|
192
199
|
cohort_name: str,
|
193
200
|
) -> None:
|
194
201
|
"""Unregister from a specific cohort and disconnect from cohort communications. Async version.
|
202
|
+
|
195
203
|
https://egeria-project.org/concepts/cohort-member/
|
204
|
+
|
196
205
|
Parameters
|
197
206
|
----------
|
198
207
|
server_guid : str
|
@@ -213,7 +222,7 @@ class RuntimeManager(Client):
|
|
213
222
|
"""
|
214
223
|
|
215
224
|
url = (
|
216
|
-
f"{self.
|
225
|
+
f"{self.cur_command_root}/cohort-members/"
|
217
226
|
f"{server_guid}/cohorts/{cohort_name}/unregister"
|
218
227
|
)
|
219
228
|
await self._async_make_request("GET", url)
|
@@ -251,10 +260,14 @@ class RuntimeManager(Client):
|
|
251
260
|
)
|
252
261
|
return
|
253
262
|
|
254
|
-
|
263
|
+
#
|
264
|
+
# Governance Engines
|
265
|
+
#
|
266
|
+
|
267
|
+
async def _async_refresh_gov_eng_config(
|
255
268
|
self,
|
256
269
|
server_guid: str,
|
257
|
-
gov_engine_name: str,
|
270
|
+
gov_engine_name: str = None,
|
258
271
|
) -> None:
|
259
272
|
"""Request that the governance engine refresh its configuration by calling the metadata server. This request is
|
260
273
|
useful if the metadata server has an outage, particularly while the governance server is initializing.
|
@@ -266,8 +279,8 @@ class RuntimeManager(Client):
|
|
266
279
|
----------
|
267
280
|
server_guid : str
|
268
281
|
Identity of the server to act on.
|
269
|
-
gov_engine_name : str
|
270
|
-
Name of the governance engine to refresh.
|
282
|
+
gov_engine_name : str, Opt
|
283
|
+
Name of the governance engine to refresh. If None, then all governance engines will be refreshed.
|
271
284
|
|
272
285
|
Returns
|
273
286
|
-------
|
@@ -282,16 +295,16 @@ class RuntimeManager(Client):
|
|
282
295
|
"""
|
283
296
|
|
284
297
|
url = (
|
285
|
-
f"{self.
|
298
|
+
f"{self.cur_command_root}/engine-hosts/"
|
286
299
|
f"{server_guid}/governance_engines/{gov_engine_name}/refresh-config"
|
287
300
|
)
|
288
301
|
await self._async_make_request("GET", url)
|
289
302
|
return
|
290
303
|
|
291
|
-
def
|
304
|
+
def refresh_gov_eng_config(
|
292
305
|
self,
|
293
306
|
server_guid: str,
|
294
|
-
gov_engine_name: str,
|
307
|
+
gov_engine_name: str = None,
|
295
308
|
) -> None:
|
296
309
|
"""Request that the governance engine refresh its configuration by calling the metadata server. This request is
|
297
310
|
useful if the metadata server has an outage, particularly while the governance server is initializing.
|
@@ -304,7 +317,7 @@ class RuntimeManager(Client):
|
|
304
317
|
server_guid : str
|
305
318
|
Identity of the server to act on.
|
306
319
|
gov_engine_name : str
|
307
|
-
Name of the governance engine to refresh.
|
320
|
+
Name of the governance engine to refresh. If None, then all governance engines will be refreshed.
|
308
321
|
|
309
322
|
Returns
|
310
323
|
-------
|
@@ -319,136 +332,959 @@ class RuntimeManager(Client):
|
|
319
332
|
"""
|
320
333
|
loop = asyncio.get_event_loop()
|
321
334
|
loop.run_until_complete(
|
322
|
-
self.
|
335
|
+
self._async_refresh_gov_eng_config(server_guid, gov_engine_name)
|
323
336
|
)
|
324
337
|
return
|
325
338
|
|
326
|
-
|
339
|
+
#
|
340
|
+
# Integration Connector Methods
|
341
|
+
#
|
342
|
+
async def _async_get_integ_connector_config_properties(
|
327
343
|
self,
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
344
|
+
server_guid: str,
|
345
|
+
connector_name: str,
|
346
|
+
) -> dict | str:
|
347
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration daemon.
|
348
|
+
Async version.
|
349
|
+
|
350
|
+
https://egeria-project.org/concepts/integration-connector/
|
351
|
+
|
352
|
+
Parameters
|
353
|
+
----------
|
354
|
+
server_guid : str
|
355
|
+
Identity of the server to act on.
|
356
|
+
connector_name : str
|
357
|
+
Name of the integration connector to retrieve properties for.
|
340
358
|
|
341
|
-
|
342
|
-
|
343
|
-
|
359
|
+
Returns
|
360
|
+
-------
|
361
|
+
Dict of the connector configuration properties.
|
362
|
+
|
363
|
+
Raises
|
364
|
+
------
|
365
|
+
InvalidParameterException
|
366
|
+
PropertyServerException
|
367
|
+
UserNotAuthorizedException
|
344
368
|
|
345
|
-
|
346
|
-
|
369
|
+
"""
|
370
|
+
|
371
|
+
url = (
|
372
|
+
f"{self.cur_command_root}/integration-daemons/"
|
373
|
+
f"{server_guid}/integration-connectors/{connector_name}/configuration-properties"
|
374
|
+
)
|
375
|
+
response = await self._async_make_request("GET", url)
|
376
|
+
return response.json().get("properties", "No pproperties found")
|
377
|
+
|
378
|
+
def get_integ_connector_config_properties(
|
379
|
+
self,
|
380
|
+
server_guid: str,
|
381
|
+
connector_name: str,
|
382
|
+
) -> dict | str:
|
383
|
+
"""Retrieve the configuration properties of the named integration connector running in the integration daemon.
|
384
|
+
Async version.
|
347
385
|
|
348
|
-
|
349
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
386
|
+
https://egeria-project.org/concepts/integration-connector/
|
350
387
|
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
388
|
+
Parameters
|
389
|
+
----------
|
390
|
+
server_guid : str
|
391
|
+
Identity of the server to act on.
|
392
|
+
connector_name : str
|
393
|
+
Name of the integration connector to retrieve properties for.
|
394
|
+
Returns
|
395
|
+
-------
|
396
|
+
None
|
355
397
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
398
|
+
Raises
|
399
|
+
------
|
400
|
+
InvalidParameterException
|
401
|
+
PropertyServerException
|
402
|
+
UserNotAuthorizedException
|
361
403
|
|
362
404
|
"""
|
363
|
-
|
364
|
-
|
405
|
+
loop = asyncio.get_event_loop()
|
406
|
+
response = loop.run_until_complete(
|
407
|
+
self._async_get_integ_connector_config_properties(
|
408
|
+
server_guid, connector_name
|
409
|
+
)
|
410
|
+
)
|
411
|
+
return response
|
365
412
|
|
366
|
-
|
367
|
-
|
413
|
+
async def _async_update_connector_connection(
|
414
|
+
self,
|
415
|
+
server_guid: str,
|
416
|
+
connector_name: str,
|
417
|
+
merge_update: bool = False,
|
418
|
+
config_properties: dict = None,
|
419
|
+
) -> None:
|
420
|
+
"""Update the configuration properties of the integration connectors, or specific integration connector
|
421
|
+
if a connector name is supplied. This update is in memory and will not persist over a server restart.
|
422
|
+
Async version.
|
423
|
+
|
424
|
+
https://egeria-project.org/concepts/integration-connector/
|
425
|
+
|
426
|
+
Parameters
|
427
|
+
----------
|
428
|
+
server_guid : str
|
429
|
+
Identity of the server to act on.
|
430
|
+
connector_name : str
|
431
|
+
Name of the integration connector to retrieve properties for.
|
432
|
+
merge_update : bool, optional, default = False
|
433
|
+
Specifies whether properties should be over-written or completely replace existing properties. If False
|
434
|
+
the values will be replaced; if True, they will be merged.
|
435
|
+
config_properties : dict, optional, default = None
|
436
|
+
A dict of Property Name, Property Value pairs.
|
437
|
+
|
438
|
+
Returns
|
439
|
+
-------
|
440
|
+
None
|
441
|
+
|
442
|
+
Raises
|
443
|
+
------
|
444
|
+
InvalidParameterException
|
445
|
+
PropertyServerException
|
446
|
+
UserNotAuthorizedException
|
447
|
+
|
448
|
+
"""
|
368
449
|
|
369
450
|
url = (
|
370
|
-
f"{self.
|
371
|
-
f"
|
451
|
+
f"{self.cur_command_root}/integration-daemons/"
|
452
|
+
f"{server_guid}/integration-connectors/{connector_name}/configuration-properties"
|
372
453
|
)
|
373
|
-
if effective_time is not None:
|
374
|
-
body = {"filter": filter, "effectiveTime": effective_time}
|
375
|
-
else:
|
376
|
-
body = {"filter": filter}
|
377
|
-
|
378
|
-
response = await self._async_make_request("POST", url, body)
|
379
454
|
|
380
|
-
|
455
|
+
body = {
|
456
|
+
"class": "ConnectorConfigPropertiesRequestBody",
|
457
|
+
"connectorName": connector_name,
|
458
|
+
"mergeUpdate": merge_update,
|
459
|
+
"configurationProperties": config_properties,
|
460
|
+
}
|
461
|
+
await self._async_make_request("POST", url, body)
|
462
|
+
return
|
381
463
|
|
382
|
-
def
|
464
|
+
def update_connector_connection(
|
383
465
|
self,
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
466
|
+
server_guid: str,
|
467
|
+
connector_name: str,
|
468
|
+
merge_update: bool = False,
|
469
|
+
config_properties: dict = None,
|
470
|
+
) -> None:
|
471
|
+
"""Update the configuration properties of the integration connectors, or specific integration connector
|
472
|
+
if a connector name is supplied. This update is in memory and will not persist over a server restart.
|
473
|
+
|
474
|
+
https://egeria-project.org/concepts/integration-connector/
|
391
475
|
|
392
476
|
Parameters
|
393
477
|
----------
|
394
|
-
|
395
|
-
|
396
|
-
|
478
|
+
server_guid : str
|
479
|
+
Identity of the server to act on.
|
480
|
+
connector_name : str
|
481
|
+
Name of the integration connector to retrieve properties for.
|
482
|
+
merge_update : bool, optional, default = False
|
483
|
+
Specifies whether properties should be over-written or completely replace existing properties. If False
|
484
|
+
the values will be replaced; if True, they will be merged.
|
485
|
+
config_properties : dict, optional, default = None
|
486
|
+
A dict of Property Name, Property Value pairs.
|
397
487
|
|
398
|
-
|
399
|
-
|
400
|
-
|
488
|
+
Returns
|
489
|
+
-------
|
490
|
+
None
|
401
491
|
|
402
|
-
|
403
|
-
|
492
|
+
Raises
|
493
|
+
------
|
494
|
+
InvalidParameterException
|
495
|
+
PropertyServerException
|
496
|
+
UserNotAuthorizedException
|
497
|
+
|
498
|
+
"""
|
499
|
+
loop = asyncio.get_event_loop()
|
500
|
+
loop.run_until_complete(
|
501
|
+
self._async_update_connector_connection(
|
502
|
+
server_guid, connector_name, merge_update, config_properties
|
503
|
+
)
|
504
|
+
)
|
505
|
+
return
|
404
506
|
|
507
|
+
async def _async_update_endpoint_address(
|
508
|
+
self, server_guid: str, connector_name: str, endpoint_address: str
|
509
|
+
) -> None:
|
510
|
+
"""Update the endpoint network address for a specific integration connector. Typically used for discovery.
|
511
|
+
This update is in memory and will not persist over a server restart. Async version.
|
405
512
|
|
406
|
-
|
407
|
-
|
513
|
+
https://egeria-project.org/concepts/integration-connector/
|
514
|
+
|
515
|
+
Parameters
|
516
|
+
----------
|
517
|
+
server_guid : str
|
518
|
+
Identity of the server to act on.
|
519
|
+
connector_name : str
|
520
|
+
Name of the integration connector to retrieve properties for.
|
521
|
+
endpoint_address : str
|
522
|
+
Specifies the new network endpoint address. This is the full address string - can include protocol,
|
523
|
+
port, operation, etc.
|
408
524
|
|
409
525
|
Returns
|
410
526
|
-------
|
411
|
-
|
412
|
-
|
527
|
+
None
|
528
|
+
|
529
|
+
Raises
|
530
|
+
------
|
531
|
+
InvalidParameterException
|
532
|
+
PropertyServerException
|
533
|
+
UserNotAuthorizedException
|
534
|
+
|
535
|
+
"""
|
536
|
+
|
537
|
+
url = (
|
538
|
+
f"{self.cur_command_root}/integration-daemons/"
|
539
|
+
f"{server_guid}/integration-connectors/{connector_name}/endpoint-network-address"
|
540
|
+
)
|
541
|
+
|
542
|
+
body = {
|
543
|
+
"class": "StringRequestBody",
|
544
|
+
"string": endpoint_address,
|
545
|
+
}
|
546
|
+
await self._async_make_request("POST", url, body)
|
547
|
+
return
|
548
|
+
|
549
|
+
def update_endpoint_address(
|
550
|
+
self, server_guid: str, connector_name: str, endpoint_address: str
|
551
|
+
) -> None:
|
552
|
+
"""Update the endpoint network address for a specific integration connector. Typically used for discovery.
|
553
|
+
This update is in memory and will not persist over a server restart. Async version.
|
554
|
+
|
555
|
+
https://egeria-project.org/concepts/integration-connector/
|
556
|
+
|
557
|
+
Parameters
|
558
|
+
----------
|
559
|
+
server_guid : str
|
560
|
+
Identity of the server to act on.
|
561
|
+
connector_name : str
|
562
|
+
Name of the integration connector to retrieve properties for.
|
563
|
+
endpoint_address : str
|
564
|
+
Specifies the new network endpoint address. This is the full address string - can include protocol,
|
565
|
+
port, operation, etc.
|
566
|
+
|
567
|
+
Returns
|
568
|
+
-------
|
569
|
+
None
|
413
570
|
|
414
571
|
Raises
|
415
572
|
------
|
416
573
|
InvalidParameterException
|
417
574
|
PropertyServerException
|
418
575
|
UserNotAuthorizedException
|
576
|
+
|
419
577
|
"""
|
420
578
|
loop = asyncio.get_event_loop()
|
421
|
-
|
422
|
-
self.
|
423
|
-
|
579
|
+
loop.run_until_complete(
|
580
|
+
self._async_update_endpoint_address(
|
581
|
+
server_guid, connector_name, endpoint_address
|
424
582
|
)
|
425
583
|
)
|
426
|
-
return
|
584
|
+
return
|
585
|
+
|
586
|
+
async def _async_refresh_integration_connectors(
|
587
|
+
self, server_guid: str, connector_name: str = None
|
588
|
+
) -> None:
|
589
|
+
"""Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if
|
590
|
+
the connector name is specified. Async version.
|
591
|
+
|
592
|
+
https://egeria-project.org/concepts/integration-connector/
|
593
|
+
|
594
|
+
Parameters
|
595
|
+
----------
|
596
|
+
server_guid : str
|
597
|
+
Identity of the server to act on.
|
598
|
+
connector_name : str, opt
|
599
|
+
Name of the integration connector to retrieve properties for. If None, all connectors refreshed.
|
600
|
+
|
601
|
+
Returns
|
602
|
+
-------
|
603
|
+
None
|
604
|
+
|
605
|
+
Raises
|
606
|
+
------
|
607
|
+
InvalidParameterException
|
608
|
+
PropertyServerException
|
609
|
+
UserNotAuthorizedException
|
610
|
+
|
611
|
+
"""
|
612
|
+
|
613
|
+
url = (
|
614
|
+
f"{self.cur_command_root}/integration-daemons/"
|
615
|
+
f"{server_guid}/integration-connectors/refresh"
|
616
|
+
)
|
617
|
+
|
618
|
+
body = {
|
619
|
+
"class": "NameRequestBody",
|
620
|
+
"string": connector_name,
|
621
|
+
}
|
622
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
623
|
+
return
|
624
|
+
|
625
|
+
def refresh_integration_connectors(
|
626
|
+
self, server_guid: str, connector_name: str = None
|
627
|
+
) -> None:
|
628
|
+
"""Issue a refresh() request on all connectors running in the integration daemon, or a specific connector if
|
629
|
+
the connector name is specified.
|
630
|
+
|
631
|
+
https://egeria-project.org/concepts/integration-connector/
|
632
|
+
|
633
|
+
Parameters
|
634
|
+
----------
|
635
|
+
server_guid : str
|
636
|
+
Identity of the server to act on.
|
637
|
+
connector_name : str, opt
|
638
|
+
Name of the integration connector to retrieve properties for. If None, all connectors refreshed.
|
639
|
+
|
640
|
+
Returns
|
641
|
+
-------
|
642
|
+
None
|
643
|
+
|
644
|
+
Raises
|
645
|
+
------
|
646
|
+
InvalidParameterException
|
647
|
+
PropertyServerException
|
648
|
+
UserNotAuthorizedException
|
649
|
+
|
650
|
+
"""
|
651
|
+
loop = asyncio.get_event_loop()
|
652
|
+
loop.run_until_complete(
|
653
|
+
self._async_refresh_integration_connectors(server_guid, connector_name)
|
654
|
+
)
|
655
|
+
return
|
656
|
+
|
657
|
+
async def _async_restart_integration_connectors(
|
658
|
+
self, server_guid: str, connector_name: str = None
|
659
|
+
) -> None:
|
660
|
+
"""Issue a restart() request on all connectors running in the integration daemon, or a specific connector if
|
661
|
+
the connector name is specified. Async version.
|
662
|
+
|
663
|
+
https://egeria-project.org/concepts/integration-connector/
|
664
|
+
|
665
|
+
Parameters
|
666
|
+
----------
|
667
|
+
server_guid : str
|
668
|
+
Identity of the server to act on.
|
669
|
+
connector_name : str, opt
|
670
|
+
Name of the integration connector to retrieve properties for. If None, all connectors restarted.
|
671
|
+
|
672
|
+
Returns
|
673
|
+
-------
|
674
|
+
None
|
675
|
+
|
676
|
+
Raises
|
677
|
+
------
|
678
|
+
InvalidParameterException
|
679
|
+
PropertyServerException
|
680
|
+
UserNotAuthorizedException
|
681
|
+
|
682
|
+
"""
|
683
|
+
|
684
|
+
url = (
|
685
|
+
f"{self.cur_command_root}/integration-daemons/"
|
686
|
+
f"{server_guid}/integration-connectors/restart"
|
687
|
+
)
|
688
|
+
|
689
|
+
body = {
|
690
|
+
"class": "NameRequestBody",
|
691
|
+
"string": connector_name,
|
692
|
+
}
|
693
|
+
await self._async_make_request("POST", url, body_slimmer(body))
|
694
|
+
return
|
695
|
+
|
696
|
+
def restart_integration_connectors(
|
697
|
+
self, server_guid: str, connector_name: str = None
|
698
|
+
) -> None:
|
699
|
+
"""Issue a restart() request on all connectors running in the integration daemon, or a specific connector if
|
700
|
+
the connector name is specified.
|
701
|
+
|
702
|
+
https://egeria-project.org/concepts/integration-connector/
|
703
|
+
|
704
|
+
Parameters
|
705
|
+
----------
|
706
|
+
server_guid : str
|
707
|
+
Identity of the server to act on.
|
708
|
+
connector_name : str, opt
|
709
|
+
Name of the integration connector to retrieve properties for. If None, all connectors restarted.
|
710
|
+
|
711
|
+
Returns
|
712
|
+
-------
|
713
|
+
None
|
714
|
+
|
715
|
+
Raises
|
716
|
+
------
|
717
|
+
InvalidParameterException
|
718
|
+
PropertyServerException
|
719
|
+
UserNotAuthorizedException
|
720
|
+
|
721
|
+
"""
|
722
|
+
loop = asyncio.get_event_loop()
|
723
|
+
loop.run_until_complete(
|
724
|
+
self._async_restart_integration_connectors(server_guid, connector_name)
|
725
|
+
)
|
726
|
+
return
|
727
|
+
|
728
|
+
async def _async_refresh_integ_group_config(
|
729
|
+
self, server_guid: str, integ_group_name: str = None
|
730
|
+
) -> None:
|
731
|
+
"""Request that the integration group refresh its configuration by calling the metadata access server.
|
732
|
+
Changes to the connector configuration will result in the affected connectors being restarted.
|
733
|
+
This request is useful if the metadata access server has an outage, particularly while the integration
|
734
|
+
daemon is initializing. This request just ensures that the latest configuration is in use. Async version.
|
735
|
+
|
736
|
+
https://egeria-project.org/concepts/integration-connector/
|
737
|
+
|
738
|
+
Parameters
|
739
|
+
----------
|
740
|
+
server_guid : str
|
741
|
+
Identity of the server to act on.
|
742
|
+
integ_group_name : str, opt, default = None
|
743
|
+
Name of the integration group to refresh. If None, all groups are refreshed.
|
744
|
+
|
745
|
+
Returns
|
746
|
+
-------
|
747
|
+
None
|
748
|
+
|
749
|
+
Raises
|
750
|
+
------
|
751
|
+
InvalidParameterException
|
752
|
+
PropertyServerException
|
753
|
+
UserNotAuthorizedException
|
754
|
+
|
755
|
+
"""
|
756
|
+
|
757
|
+
url = (
|
758
|
+
f"{self.cur_command_root}/integration-daemons/"
|
759
|
+
f"{server_guid}/integration-groups/{integ_group_name}/refresh-config"
|
760
|
+
)
|
761
|
+
|
762
|
+
await self._async_make_request("GET", url)
|
763
|
+
return
|
764
|
+
|
765
|
+
def refresh_integ_group_config(
|
766
|
+
self, server_guid: str, integ_group_name: str = None
|
767
|
+
) -> None:
|
768
|
+
"""Request that the integration group refresh its configuration by calling the metadata access server.
|
769
|
+
Changes to the connector configuration will result in the affected connectors being restarted.
|
770
|
+
This request is useful if the metadata access server has an outage, particularly while the integration
|
771
|
+
daemon is initializing. This request just ensures that the latest configuration is in use.
|
772
|
+
|
773
|
+
https://egeria-project.org/concepts/integration-connector/
|
774
|
+
|
775
|
+
Parameters
|
776
|
+
----------
|
777
|
+
server_guid : str
|
778
|
+
Identity of the server to act on.
|
779
|
+
integ_group_name : str, opt, default = None
|
780
|
+
Name of the integration group to refresh. If None, all groups are refreshed.
|
781
|
+
|
782
|
+
Returns
|
783
|
+
-------
|
784
|
+
None
|
785
|
+
|
786
|
+
Raises
|
787
|
+
------
|
788
|
+
InvalidParameterException
|
789
|
+
PropertyServerException
|
790
|
+
UserNotAuthorizedException
|
791
|
+
|
792
|
+
"""
|
793
|
+
loop = asyncio.get_event_loop()
|
794
|
+
loop.run_until_complete(
|
795
|
+
self._async_refresh_integ_group_config(server_guid, integ_group_name)
|
796
|
+
)
|
797
|
+
return
|
798
|
+
|
799
|
+
#
|
800
|
+
# Open Lineage & Archives
|
801
|
+
#
|
802
|
+
async def _async_publish_open_lineage_event(
|
803
|
+
self, server_guid: str, ol_event: dict
|
804
|
+
) -> None:
|
805
|
+
"""Send an Open Lineage event to the integration daemon. It will pass it on to the integration connectors that
|
806
|
+
have registered a listener for open lineage events. Async version.
|
807
|
+
|
808
|
+
https://egeria-project.org/features/lineage-management/overview/#the-openlineage-standard
|
809
|
+
|
810
|
+
Parameters
|
811
|
+
----------
|
812
|
+
server_guid : str
|
813
|
+
Identity of the server to act on.
|
814
|
+
ol_event : dict
|
815
|
+
Dict containing the user specified Open Lineage event.
|
816
|
+
|
817
|
+
Returns
|
818
|
+
-------
|
819
|
+
None
|
820
|
+
|
821
|
+
Raises
|
822
|
+
------
|
823
|
+
InvalidParameterException
|
824
|
+
PropertyServerException
|
825
|
+
UserNotAuthorizedException
|
826
|
+
|
827
|
+
"""
|
828
|
+
|
829
|
+
url = (
|
830
|
+
f"{self.cur_command_root}/integration-daemons/"
|
831
|
+
f"{server_guid}/integration-daemons/{server_guid}/open-lineage-events/publish"
|
832
|
+
)
|
833
|
+
|
834
|
+
await self._async_make_request("POST", url, ol_event)
|
835
|
+
return
|
836
|
+
|
837
|
+
def publish_open_lineage_event(self, server_guid: str, ol_event: dict) -> None:
|
838
|
+
"""Send an Open Lineage event to the integration daemon. It will pass it on to the integration connectors that
|
839
|
+
have registered a listener for open lineage events.
|
840
|
+
|
841
|
+
https://egeria-project.org/features/lineage-management/overview/#the-openlineage-standard
|
842
|
+
|
843
|
+
Parameters
|
844
|
+
----------
|
845
|
+
server_guid : str
|
846
|
+
Identity of the server to act on.
|
847
|
+
ol_event : dict
|
848
|
+
Dict containing the user specified Open Lineage event.
|
849
|
+
|
850
|
+
Returns
|
851
|
+
-------
|
852
|
+
None
|
853
|
+
|
854
|
+
Raises
|
855
|
+
------
|
856
|
+
InvalidParameterException
|
857
|
+
PropertyServerException
|
858
|
+
UserNotAuthorizedException
|
859
|
+
|
860
|
+
"""
|
861
|
+
loop = asyncio.get_event_loop()
|
862
|
+
loop.run_until_complete(
|
863
|
+
self._async_publish_open_lineage_event(server_guid, ol_event)
|
864
|
+
)
|
865
|
+
return
|
866
|
+
|
867
|
+
async def _async_add_archive_content(
|
868
|
+
self, server_guid: str, archive_content: dict
|
869
|
+
) -> None:
|
870
|
+
"""An open metadata archive contains metadata types and instances.
|
871
|
+
This operation loads the supplied open metadata archive into the local repository. It can be used with OMAG
|
872
|
+
servers that are of type Open Metadata Store. Async version.
|
873
|
+
|
874
|
+
https://egeria-project.org/concepts/open-metadata-archives/
|
875
|
+
|
876
|
+
Parameters
|
877
|
+
----------
|
878
|
+
server_guid : str
|
879
|
+
Identity of the server to act on.
|
880
|
+
archive_content : dict
|
881
|
+
A dict containing the content of the archive to load.
|
882
|
+
|
883
|
+
Returns
|
884
|
+
-------
|
885
|
+
None
|
886
|
+
|
887
|
+
Raises
|
888
|
+
------
|
889
|
+
InvalidParameterException
|
890
|
+
PropertyServerException
|
891
|
+
UserNotAuthorizedException
|
892
|
+
|
893
|
+
"""
|
894
|
+
|
895
|
+
url = (
|
896
|
+
f"{self.cur_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/"
|
897
|
+
f"archive-content"
|
898
|
+
)
|
899
|
+
|
900
|
+
await self._async_make_request("POST", url, archive_content)
|
901
|
+
return
|
902
|
+
|
903
|
+
def add_archive_content(self, server_guid: str, archive_content: dict) -> None:
|
904
|
+
"""An open metadata archive contains metadata types and instances.
|
905
|
+
This operation loads the supplied open metadata archive into the local repository. It can be used with OMAG
|
906
|
+
servers that are of type Open Metadata Store.
|
907
|
+
|
908
|
+
https://egeria-project.org/concepts/open-metadata-archives/
|
909
|
+
|
910
|
+
Parameters
|
911
|
+
----------
|
912
|
+
server_guid : str
|
913
|
+
Identity of the server to act on.
|
914
|
+
archive_content : dict
|
915
|
+
A dict containing the content of the archive to load.
|
916
|
+
|
917
|
+
Returns
|
918
|
+
-------
|
919
|
+
None
|
920
|
+
|
921
|
+
Raises
|
922
|
+
------
|
923
|
+
InvalidParameterException
|
924
|
+
PropertyServerException
|
925
|
+
UserNotAuthorizedException
|
926
|
+
|
927
|
+
"""
|
928
|
+
loop = asyncio.get_event_loop()
|
929
|
+
loop.run_until_complete(
|
930
|
+
self._async_add_archive_content(server_guid, archive_content)
|
931
|
+
)
|
932
|
+
return
|
933
|
+
|
934
|
+
async def _async_add_archive_file(
|
935
|
+
self,
|
936
|
+
archive_file: str,
|
937
|
+
server_guid: str,
|
938
|
+
time_out: int = 60,
|
939
|
+
) -> None:
|
940
|
+
"""Add a new open metadata archive to running OMAG Server's repository.
|
941
|
+
An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
|
942
|
+
that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
|
943
|
+
Async version.
|
944
|
+
|
945
|
+
https://egeria-project.org/concepts/open-metadata-archives/
|
946
|
+
|
947
|
+
Parameters
|
948
|
+
----------
|
949
|
+
archive_file: str
|
950
|
+
Open metadata archive file to load.
|
951
|
+
server_guid: str
|
952
|
+
GUID of the server to load the file into.
|
953
|
+
time_out: int, optional
|
954
|
+
Time out for the rest call.
|
955
|
+
|
956
|
+
Returns
|
957
|
+
-------
|
958
|
+
Response
|
959
|
+
None
|
960
|
+
|
961
|
+
Raises
|
962
|
+
------
|
963
|
+
InvalidParameterException
|
964
|
+
PropertyServerException
|
965
|
+
UserNotAuthorizedException
|
966
|
+
|
967
|
+
"""
|
968
|
+
|
969
|
+
url = f"{self.cur_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/file"
|
970
|
+
|
971
|
+
await self._async_make_request(
|
972
|
+
"POST-DATA", url, archive_file, time_out=time_out
|
973
|
+
)
|
974
|
+
return
|
975
|
+
|
976
|
+
def add_archive_file(
|
977
|
+
self,
|
978
|
+
archive_file: str,
|
979
|
+
server_guid: str,
|
980
|
+
time_out: int = 60,
|
981
|
+
) -> None:
|
982
|
+
"""Add a new open metadata archive to running OMAG Server's repository.
|
983
|
+
An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
|
984
|
+
that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
|
985
|
+
|
986
|
+
https://egeria-project.org/concepts/open-metadata-archives/
|
987
|
+
|
988
|
+
Parameters
|
989
|
+
----------
|
990
|
+
archive_file: str
|
991
|
+
Open metadata archive file to load.
|
992
|
+
server_guid: str
|
993
|
+
GUID of the server to load the file into.
|
994
|
+
time_out: int, optional, default = 60 seconds
|
995
|
+
|
996
|
+
Returns
|
997
|
+
-------
|
998
|
+
Response
|
999
|
+
None
|
1000
|
+
|
1001
|
+
Raises
|
1002
|
+
------
|
1003
|
+
InvalidParameterException
|
1004
|
+
PropertyServerException
|
1005
|
+
UserNotAuthorizedException
|
1006
|
+
|
1007
|
+
"""
|
1008
|
+
|
1009
|
+
loop = asyncio.get_event_loop()
|
1010
|
+
loop.run_until_complete(
|
1011
|
+
self._async_add_archive_file(archive_file, server_guid, time_out)
|
1012
|
+
)
|
1013
|
+
return
|
1014
|
+
|
1015
|
+
#
|
1016
|
+
# Server & Platform admin
|
1017
|
+
#
|
1018
|
+
async def _async_shutdown_and_unregister_server(self, server_guid: str) -> None:
|
1019
|
+
"""Shutdown the named OMAG server. The server will also be removed from any open metadata repository cohorts
|
1020
|
+
it has registered with. Async version.
|
1021
|
+
|
1022
|
+
Parameters
|
1023
|
+
----------
|
1024
|
+
server_guid : str
|
1025
|
+
Identity of the server to act on.
|
1026
|
+
|
1027
|
+
Returns
|
1028
|
+
-------
|
1029
|
+
Response
|
1030
|
+
None
|
1031
|
+
|
1032
|
+
Raises
|
1033
|
+
------
|
1034
|
+
InvalidParameterException
|
1035
|
+
PropertyServerException
|
1036
|
+
UserNotAuthorizedException
|
1037
|
+
|
1038
|
+
"""
|
1039
|
+
|
1040
|
+
url = f"{self.cur_command_root}/omag-server/{server_guid}"
|
1041
|
+
|
1042
|
+
await self._async_make_request("DELETE", url)
|
1043
|
+
|
1044
|
+
return
|
1045
|
+
|
1046
|
+
def shutdown_and_unregister_server(self, server_guid: str) -> None:
|
1047
|
+
"""Shutdown the named OMAG server. The server will also be removed from any open metadata repository cohorts
|
1048
|
+
it has registered with.
|
1049
|
+
|
1050
|
+
Parameters
|
1051
|
+
----------
|
1052
|
+
server_guid : str
|
1053
|
+
Identity of the server to act on.
|
1054
|
+
|
1055
|
+
Returns
|
1056
|
+
-------
|
1057
|
+
Response
|
1058
|
+
None
|
1059
|
+
|
1060
|
+
Raises
|
1061
|
+
------
|
1062
|
+
InvalidParameterException
|
1063
|
+
PropertyServerException
|
1064
|
+
UserNotAuthorizedException
|
1065
|
+
|
1066
|
+
"""
|
1067
|
+
loop = asyncio.get_event_loop()
|
1068
|
+
loop.run_until_complete(self._async_shutdown_and_unregister_server(server_guid))
|
1069
|
+
return
|
1070
|
+
|
1071
|
+
async def _async_activate_server_with_stored_config(self, server_guid: str) -> None:
|
1072
|
+
"""Activate the named OMAG server using the appropriate configuration document found in the
|
1073
|
+
configuration store. Async version.
|
1074
|
+
|
1075
|
+
https://egeria-project.org/concepts/configuration-document
|
1076
|
+
|
1077
|
+
Parameters
|
1078
|
+
----------
|
1079
|
+
server_guid : str
|
1080
|
+
Identity of the server to act on.
|
1081
|
+
|
1082
|
+
Returns
|
1083
|
+
-------
|
1084
|
+
None
|
1085
|
+
|
1086
|
+
Raises
|
1087
|
+
------
|
1088
|
+
InvalidParameterException
|
1089
|
+
PropertyServerException
|
1090
|
+
UserNotAuthorizedException
|
1091
|
+
|
1092
|
+
"""
|
1093
|
+
|
1094
|
+
url = f"{self.cur_command_root}/omag-servers/{server_guid}/instance"
|
1095
|
+
|
1096
|
+
await self._async_make_request("POST", url)
|
1097
|
+
return
|
1098
|
+
|
1099
|
+
def activate_server_with_stored_config(self, server_guid: str) -> None:
|
1100
|
+
"""Activate the named OMAG server using the appropriate configuration document found in the
|
1101
|
+
configuration store.
|
1102
|
+
|
1103
|
+
https://egeria-project.org/concepts/configuration-document
|
1104
|
+
|
1105
|
+
Parameters
|
1106
|
+
----------
|
1107
|
+
server_guid : str
|
1108
|
+
Identity of the server to act on.
|
1109
|
+
|
1110
|
+
Returns
|
1111
|
+
-------
|
1112
|
+
None
|
1113
|
+
|
1114
|
+
Raises
|
1115
|
+
------
|
1116
|
+
InvalidParameterException
|
1117
|
+
PropertyServerException
|
1118
|
+
UserNotAuthorizedException
|
1119
|
+
|
1120
|
+
"""
|
1121
|
+
loop = asyncio.get_event_loop()
|
1122
|
+
loop.run_until_complete(
|
1123
|
+
self._async_activate_server_with_stored_config(server_guid)
|
1124
|
+
)
|
1125
|
+
return
|
1126
|
+
|
1127
|
+
async def _async_shutdown_server(self, server_guid: str) -> None:
|
1128
|
+
"""Temporarily shutdown the named OMAG server. This server can be restarted as a later time. Async version.
|
1129
|
+
|
1130
|
+
Parameters
|
1131
|
+
----------
|
1132
|
+
server_guid : str
|
1133
|
+
Identity of the server to act on.
|
1134
|
+
|
1135
|
+
Returns
|
1136
|
+
-------
|
1137
|
+
Response
|
1138
|
+
None
|
1139
|
+
|
1140
|
+
Raises
|
1141
|
+
------
|
1142
|
+
InvalidParameterException
|
1143
|
+
PropertyServerException
|
1144
|
+
UserNotAuthorizedException
|
1145
|
+
|
1146
|
+
"""
|
1147
|
+
|
1148
|
+
url = f"{self.cur_command_root}/omag-server/{server_guid}/instance"
|
1149
|
+
|
1150
|
+
await self._async_make_request("DELETE", url)
|
1151
|
+
|
1152
|
+
return
|
1153
|
+
|
1154
|
+
def shutdown_server(self, server_guid: str) -> None:
|
1155
|
+
"""Temporarily shutdown the named OMAG server. This server can be restarted as a later time.
|
1156
|
+
|
1157
|
+
Parameters
|
1158
|
+
----------
|
1159
|
+
server_guid : str
|
1160
|
+
Identity of the server to act on.
|
1161
|
+
|
1162
|
+
Returns
|
1163
|
+
-------
|
1164
|
+
Response
|
1165
|
+
None
|
1166
|
+
|
1167
|
+
Raises
|
1168
|
+
------
|
1169
|
+
InvalidParameterException
|
1170
|
+
PropertyServerException
|
1171
|
+
UserNotAuthorizedException
|
1172
|
+
|
1173
|
+
"""
|
1174
|
+
loop = asyncio.get_event_loop()
|
1175
|
+
loop.run_until_complete(self._async_shutdown_server(server_guid))
|
1176
|
+
return
|
1177
|
+
|
1178
|
+
def get_platforms_by_name(
|
1179
|
+
self,
|
1180
|
+
filter: str = None,
|
1181
|
+
effective_time: str = None,
|
1182
|
+
start_from: int = 0,
|
1183
|
+
page_size: int = max_paging_size,
|
1184
|
+
) -> str | list:
|
1185
|
+
"""Returns the list of platforms with a particular name. The name is specified in the filter.
|
1186
|
+
|
1187
|
+
Parameters
|
1188
|
+
----------
|
1189
|
+
filter : str, opt
|
1190
|
+
Filter specifies the display name or qualified name of the platforms to return information for. If the
|
1191
|
+
value is None, we will default to the default_platform_name that comes from the core content pack.
|
1192
|
+
effective_time: str, optional
|
1193
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
1194
|
+
start_from : int, optional
|
1195
|
+
The index from which to start fetching the engine actions. Default is 0.
|
1196
|
+
page_size : int, optional
|
1197
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1198
|
+
|
1199
|
+
Returns
|
1200
|
+
-------
|
1201
|
+
Response
|
1202
|
+
A lit of json dict with the platform reports.
|
1203
|
+
|
1204
|
+
Raises
|
1205
|
+
------
|
1206
|
+
InvalidParameterException
|
1207
|
+
PropertyServerException
|
1208
|
+
UserNotAuthorizedException
|
1209
|
+
"""
|
1210
|
+
loop = asyncio.get_event_loop()
|
1211
|
+
response = loop.run_until_complete(
|
1212
|
+
self._async_get_platforms_by_name(
|
1213
|
+
filter, effective_time, start_from, page_size
|
1214
|
+
)
|
1215
|
+
)
|
1216
|
+
return response
|
1217
|
+
|
1218
|
+
async def _async_get_platforms_by_name(
|
1219
|
+
self,
|
1220
|
+
filter: str = None,
|
1221
|
+
effective_time: str = None,
|
1222
|
+
start_from: int = 0,
|
1223
|
+
page_size: int = max_paging_size,
|
1224
|
+
) -> str | list:
|
1225
|
+
"""Returns the list of platforms with a particular name. The name is specified in the filter. Async version.
|
1226
|
+
|
1227
|
+
Parameters
|
1228
|
+
----------
|
1229
|
+
filter : str, opt
|
1230
|
+
Filter specifies the display name or qualified name of the platforms to return information for. If the
|
1231
|
+
value is None, we will default to the default_platform_name that comes from the core content pack.
|
1232
|
+
effective_time: str, optional
|
1233
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
1234
|
+
start_from : int, optional
|
1235
|
+
The index from which to start fetching the engine actions. Default is 0.
|
1236
|
+
|
1237
|
+
page_size : int, optional
|
1238
|
+
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1239
|
+
|
1240
|
+
Returns
|
1241
|
+
-------
|
1242
|
+
Response
|
1243
|
+
A lit of json dict with the platform reports.
|
1244
|
+
|
1245
|
+
Raises
|
1246
|
+
------
|
1247
|
+
InvalidParameterException
|
1248
|
+
PropertyServerException
|
1249
|
+
UserNotAuthorizedException
|
1250
|
+
|
1251
|
+
"""
|
1252
|
+
|
1253
|
+
if filter is None:
|
1254
|
+
filter = self.default_platform_name
|
1255
|
+
|
1256
|
+
url = (
|
1257
|
+
f"{self.cur_command_root}/platforms/by-name?"
|
1258
|
+
f"startFrom={start_from}&pageSize={page_size}"
|
1259
|
+
)
|
1260
|
+
if effective_time is not None:
|
1261
|
+
body = {"filter": filter, "effectiveTime": effective_time}
|
1262
|
+
else:
|
1263
|
+
body = {"filter": filter}
|
1264
|
+
|
1265
|
+
response = await self._async_make_request("POST", url, body)
|
1266
|
+
|
1267
|
+
return response.json().get("elements", "No platforms found")
|
427
1268
|
|
428
1269
|
async def _async_get_platforms_by_type(
|
429
1270
|
self,
|
430
1271
|
filter: str = None,
|
431
|
-
view_server: str = None,
|
432
1272
|
effective_time: str = None,
|
433
1273
|
start_from: int = 0,
|
434
1274
|
page_size: int = max_paging_size,
|
435
1275
|
) -> str | list:
|
436
1276
|
"""Returns the list of platforms with a particular deployed implementation type. The value is specified in
|
437
|
-
|
1277
|
+
the filter. If it is null, or no request body is supplied, all platforms are returned. Async version.
|
438
1278
|
|
439
1279
|
Parameters
|
440
1280
|
----------
|
441
1281
|
filter : str, opt
|
442
1282
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
443
1283
|
If the value is None, we will default to the "OMAG Server Platform".
|
444
|
-
|
445
|
-
|
446
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
447
|
-
will be used.
|
448
|
-
|
1284
|
+
effective_time: str, optional
|
1285
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
449
1286
|
start_from : int, optional
|
450
1287
|
The index from which to start fetching the engine actions. Default is 0.
|
451
|
-
|
452
1288
|
page_size : int, optional
|
453
1289
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
454
1290
|
|
@@ -464,14 +1300,12 @@ class RuntimeManager(Client):
|
|
464
1300
|
UserNotAuthorizedException
|
465
1301
|
|
466
1302
|
"""
|
467
|
-
if view_server is None:
|
468
|
-
view_server = self.view_server
|
469
1303
|
|
470
1304
|
if filter is None:
|
471
1305
|
filter = "OMAG Server Platform"
|
472
1306
|
|
473
1307
|
url = (
|
474
|
-
f"{self.
|
1308
|
+
f"{self.cur_command_root}/platforms/"
|
475
1309
|
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
|
476
1310
|
)
|
477
1311
|
|
@@ -486,28 +1320,22 @@ class RuntimeManager(Client):
|
|
486
1320
|
def get_platforms_by_type(
|
487
1321
|
self,
|
488
1322
|
filter: str = None,
|
489
|
-
view_server: str = None,
|
490
1323
|
effective_time: str = None,
|
491
1324
|
start_from: int = 0,
|
492
1325
|
page_size: int = max_paging_size,
|
493
1326
|
) -> str | list:
|
494
1327
|
"""Returns the list of platforms with a particular deployed implementation type. The value is specified in
|
495
|
-
|
1328
|
+
the filter. If it is null, or no request body is supplied, all platforms are returned.
|
496
1329
|
|
497
1330
|
Parameters
|
498
1331
|
----------
|
499
1332
|
filter : str, opt
|
500
1333
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
501
1334
|
If the value is None, we will default to the "OMAG Server Platform".
|
502
|
-
|
503
|
-
|
504
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
505
|
-
will be used.
|
506
|
-
|
1335
|
+
effective_time: str, optional
|
1336
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
507
1337
|
start_from : int, optional
|
508
1338
|
The index from which to start fetching the engine actions. Default is 0.
|
509
|
-
|
510
|
-
|
511
1339
|
page_size : int, optional
|
512
1340
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
513
1341
|
|
@@ -526,7 +1354,7 @@ class RuntimeManager(Client):
|
|
526
1354
|
loop = asyncio.get_event_loop()
|
527
1355
|
response = loop.run_until_complete(
|
528
1356
|
self._async_get_platforms_by_type(
|
529
|
-
filter,
|
1357
|
+
filter, effective_time, start_from, page_size
|
530
1358
|
)
|
531
1359
|
)
|
532
1360
|
return response
|
@@ -534,28 +1362,23 @@ class RuntimeManager(Client):
|
|
534
1362
|
async def _async_get_platform_templates_by_type(
|
535
1363
|
self,
|
536
1364
|
filter: str = None,
|
537
|
-
view_server: str = None,
|
538
1365
|
effective_time: str = None,
|
539
1366
|
start_from: int = 0,
|
540
1367
|
page_size: int = max_paging_size,
|
541
1368
|
) -> str | list:
|
542
1369
|
"""Returns the list of platform templates for a particular deployed implementation type. The value is
|
543
|
-
|
544
|
-
|
1370
|
+
specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
|
1371
|
+
Async version.
|
545
1372
|
|
546
1373
|
Parameters
|
547
1374
|
----------
|
548
1375
|
filter : str, opt
|
549
1376
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
550
1377
|
If the value is None, we will default to the "OMAG Server Platform".
|
551
|
-
|
552
|
-
|
553
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
554
|
-
will be used.
|
555
|
-
|
1378
|
+
effective_time: str, optional
|
1379
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
556
1380
|
start_from : int, optional
|
557
1381
|
The index from which to start fetching the engine actions. Default is 0.
|
558
|
-
|
559
1382
|
page_size : int, optional
|
560
1383
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
561
1384
|
|
@@ -571,14 +1394,12 @@ class RuntimeManager(Client):
|
|
571
1394
|
UserNotAuthorizedException
|
572
1395
|
|
573
1396
|
"""
|
574
|
-
if view_server is None:
|
575
|
-
view_server = self.view_server
|
576
1397
|
|
577
1398
|
if filter is None:
|
578
1399
|
filter = "OMAG Server Platform"
|
579
1400
|
|
580
1401
|
url = (
|
581
|
-
f"{self.
|
1402
|
+
f"{self.cur_command_root}/platforms/"
|
582
1403
|
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
|
583
1404
|
)
|
584
1405
|
|
@@ -593,28 +1414,22 @@ class RuntimeManager(Client):
|
|
593
1414
|
def get_platform_templates_by_type(
|
594
1415
|
self,
|
595
1416
|
filter: str = None,
|
596
|
-
view_server: str = None,
|
597
1417
|
effective_time: str = None,
|
598
1418
|
start_from: int = 0,
|
599
1419
|
page_size: int = max_paging_size,
|
600
1420
|
) -> str | list:
|
601
1421
|
"""Returns the list of platform templates with a particular deployed implementation type. The value is
|
602
|
-
|
1422
|
+
specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
|
603
1423
|
|
604
1424
|
Parameters
|
605
1425
|
----------
|
606
1426
|
filter : str, opt
|
607
1427
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
608
1428
|
If the value is None, we will default to the "OMAG Server Platform".
|
609
|
-
|
610
|
-
|
611
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
612
|
-
will be used.
|
613
|
-
|
1429
|
+
effective_time: str, optional
|
1430
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
614
1431
|
start_from : int, optional
|
615
1432
|
The index from which to start fetching the engine actions. Default is 0.
|
616
|
-
|
617
|
-
|
618
1433
|
page_size : int, optional
|
619
1434
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
620
1435
|
|
@@ -633,14 +1448,12 @@ class RuntimeManager(Client):
|
|
633
1448
|
loop = asyncio.get_event_loop()
|
634
1449
|
response = loop.run_until_complete(
|
635
1450
|
self._async_get_platforms_by_type(
|
636
|
-
filter,
|
1451
|
+
filter, effective_time, start_from, page_size
|
637
1452
|
)
|
638
1453
|
)
|
639
1454
|
return response
|
640
1455
|
|
641
|
-
async def _async_get_platform_report(
|
642
|
-
self, platform_guid: str = None, view_server: str = None
|
643
|
-
) -> str | list:
|
1456
|
+
async def _async_get_platform_report(self, platform_guid: str = None) -> str | list:
|
644
1457
|
"""Returns details about the running platform. Async version.
|
645
1458
|
|
646
1459
|
Parameters
|
@@ -648,10 +1461,6 @@ class RuntimeManager(Client):
|
|
648
1461
|
platform_guid : str
|
649
1462
|
The unique identifier for the platform.
|
650
1463
|
|
651
|
-
view_server : str, optional
|
652
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
653
|
-
will be used.
|
654
|
-
|
655
1464
|
Returns
|
656
1465
|
-------
|
657
1466
|
Response
|
@@ -664,18 +1473,14 @@ class RuntimeManager(Client):
|
|
664
1473
|
UserNotAuthorizedException
|
665
1474
|
|
666
1475
|
"""
|
667
|
-
if view_server is None:
|
668
|
-
view_server = self.view_server
|
669
1476
|
|
670
|
-
url = f"{self.
|
1477
|
+
url = f"{self.cur_command_root}/platforms/{platform_guid}/report"
|
671
1478
|
|
672
1479
|
response = await self._async_make_request("GET", url)
|
673
1480
|
|
674
1481
|
return response.json().get("element", "No platforms found")
|
675
1482
|
|
676
|
-
def get_platform_report(
|
677
|
-
self, platform_guid: str = None, view_server: str = None
|
678
|
-
) -> str | list:
|
1483
|
+
def get_platform_report(self, platform_guid: str = None) -> str | list:
|
679
1484
|
"""Returns details about the running platform.
|
680
1485
|
|
681
1486
|
Parameters
|
@@ -683,11 +1488,6 @@ class RuntimeManager(Client):
|
|
683
1488
|
platform_guid : str
|
684
1489
|
The unique identifier for the platform.
|
685
1490
|
|
686
|
-
view_server : str, optional
|
687
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
688
|
-
will be used.
|
689
|
-
|
690
|
-
|
691
1491
|
Returns
|
692
1492
|
-------
|
693
1493
|
Response
|
@@ -702,45 +1502,33 @@ class RuntimeManager(Client):
|
|
702
1502
|
"""
|
703
1503
|
loop = asyncio.get_event_loop()
|
704
1504
|
response = loop.run_until_complete(
|
705
|
-
self._async_get_platform_report(platform_guid
|
1505
|
+
self._async_get_platform_report(platform_guid)
|
706
1506
|
)
|
707
1507
|
return response
|
708
1508
|
|
709
1509
|
async def _async_get_platform_by_guid(
|
710
1510
|
self,
|
711
|
-
platform_guid: str
|
712
|
-
view_server: str = None,
|
1511
|
+
platform_guid: str,
|
713
1512
|
effective_time: str = None,
|
714
1513
|
) -> str | list:
|
715
1514
|
"""Returns details about the platform's catalog entry (asset). Async version.
|
716
1515
|
|
717
1516
|
Parameters
|
718
1517
|
----------
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
view_server : str, optional
|
724
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
725
|
-
will be used.
|
726
|
-
|
727
|
-
start_from : int, optional
|
728
|
-
The index from which to start fetching the engine actions. Default is 0.
|
729
|
-
|
1518
|
+
platform_guid : str
|
1519
|
+
Unique id of the platform to return details of.
|
1520
|
+
effective_time: str, optional
|
1521
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
730
1522
|
|
731
|
-
page_size : int, optional
|
732
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
733
1523
|
|
734
1524
|
Returns
|
735
1525
|
-------
|
736
1526
|
Response
|
737
|
-
A
|
1527
|
+
A list of json dict with the platform reports.
|
738
1528
|
|
739
1529
|
"""
|
740
|
-
if view_server is None:
|
741
|
-
view_server = self.view_server
|
742
1530
|
|
743
|
-
url = f"{self.
|
1531
|
+
url = f"{self.cur_command_root}/platforms/{platform_guid}"
|
744
1532
|
|
745
1533
|
if effective_time is not None:
|
746
1534
|
body = {"effectiveTime": effective_time}
|
@@ -753,28 +1541,17 @@ class RuntimeManager(Client):
|
|
753
1541
|
|
754
1542
|
def get_platform_by_guid(
|
755
1543
|
self,
|
756
|
-
platform_guid: str
|
757
|
-
view_server: str = None,
|
1544
|
+
platform_guid: str,
|
758
1545
|
effective_time: str = None,
|
759
1546
|
) -> str | list:
|
760
1547
|
"""Returns details about the platform's catalog entry (asset).
|
761
1548
|
|
762
1549
|
Parameters
|
763
1550
|
----------
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
view_server : str, optional
|
769
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
770
|
-
will be used.
|
771
|
-
|
772
|
-
start_from : int, optional
|
773
|
-
The index from which to start fetching the engine actions. Default is 0.
|
774
|
-
|
775
|
-
|
776
|
-
page_size : int, optional
|
777
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1551
|
+
platform_guid : str, opt
|
1552
|
+
Identity of the platform to return details about.
|
1553
|
+
effective_time: str, optional
|
1554
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
778
1555
|
|
779
1556
|
Returns
|
780
1557
|
-------
|
@@ -790,14 +1567,12 @@ class RuntimeManager(Client):
|
|
790
1567
|
"""
|
791
1568
|
loop = asyncio.get_event_loop()
|
792
1569
|
response = loop.run_until_complete(
|
793
|
-
self.
|
794
|
-
platform_guid, view_server, effective_time
|
795
|
-
)
|
1570
|
+
self._async_get_platform_by_guid(platform_guid, effective_time)
|
796
1571
|
)
|
797
1572
|
return response
|
798
1573
|
|
799
1574
|
async def _async_get_server_by_guid(
|
800
|
-
self, server_guid: str,
|
1575
|
+
self, server_guid: str, effective_time: str = None
|
801
1576
|
) -> str | dict:
|
802
1577
|
"""Returns details about the server's catalog entry (asset). Async version.
|
803
1578
|
|
@@ -805,10 +1580,8 @@ class RuntimeManager(Client):
|
|
805
1580
|
----------
|
806
1581
|
server_guid : str
|
807
1582
|
The unique identifier for the platform.
|
808
|
-
|
809
|
-
|
810
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
811
|
-
will be used.
|
1583
|
+
effective_time: str, optional
|
1584
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
812
1585
|
|
813
1586
|
Returns
|
814
1587
|
-------
|
@@ -822,10 +1595,8 @@ class RuntimeManager(Client):
|
|
822
1595
|
UserNotAuthorizedException
|
823
1596
|
|
824
1597
|
"""
|
825
|
-
if view_server is None:
|
826
|
-
view_server = self.view_server
|
827
1598
|
|
828
|
-
url = f"{self.
|
1599
|
+
url = f"{self.cur_command_root}/software-servers/{server_guid}"
|
829
1600
|
|
830
1601
|
if effective_time is not None:
|
831
1602
|
body = {"effectiveTime": effective_time}
|
@@ -834,10 +1605,10 @@ class RuntimeManager(Client):
|
|
834
1605
|
else:
|
835
1606
|
response = await self._async_make_request("POST", url)
|
836
1607
|
|
837
|
-
return response.json().get("elements", "No
|
1608
|
+
return response.json().get("elements", "No server found")
|
838
1609
|
|
839
1610
|
def get_server_by_guid(
|
840
|
-
self, server_guid: str,
|
1611
|
+
self, server_guid: str, effective_time: str = None
|
841
1612
|
) -> str | dict:
|
842
1613
|
"""Returns details about the platform's catalog entry (asset).
|
843
1614
|
|
@@ -845,10 +1616,8 @@ class RuntimeManager(Client):
|
|
845
1616
|
----------
|
846
1617
|
server_guid : str
|
847
1618
|
The unique identifier for the platform.
|
848
|
-
|
849
|
-
|
850
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
851
|
-
will be used.
|
1619
|
+
effective_time: str, optional
|
1620
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
852
1621
|
|
853
1622
|
Returns
|
854
1623
|
-------
|
@@ -864,14 +1633,13 @@ class RuntimeManager(Client):
|
|
864
1633
|
"""
|
865
1634
|
loop = asyncio.get_event_loop()
|
866
1635
|
response = loop.run_until_complete(
|
867
|
-
self._async_get_server_by_guid(server_guid,
|
1636
|
+
self._async_get_server_by_guid(server_guid, effective_time)
|
868
1637
|
)
|
869
1638
|
return response
|
870
1639
|
|
871
1640
|
async def _async_get_servers_by_name(
|
872
1641
|
self,
|
873
1642
|
filter: str,
|
874
|
-
view_server: str = None,
|
875
1643
|
effective_time: str = None,
|
876
1644
|
start_from: int = 0,
|
877
1645
|
page_size: int = max_paging_size,
|
@@ -883,15 +1651,10 @@ class RuntimeManager(Client):
|
|
883
1651
|
filter : str, opt
|
884
1652
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
885
1653
|
If the value is None, we will default to the "OMAG Server Platform".
|
886
|
-
|
887
|
-
|
888
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
889
|
-
will be used.
|
890
|
-
|
1654
|
+
effective_time: str, optional
|
1655
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
891
1656
|
start_from : int, optional
|
892
1657
|
The index from which to start fetching the engine actions. Default is 0.
|
893
|
-
|
894
|
-
|
895
1658
|
page_size : int, optional
|
896
1659
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
897
1660
|
|
@@ -907,11 +1670,9 @@ class RuntimeManager(Client):
|
|
907
1670
|
UserNotAuthorizedException
|
908
1671
|
|
909
1672
|
"""
|
910
|
-
if view_server is None:
|
911
|
-
view_server = self.view_server
|
912
1673
|
|
913
1674
|
url = (
|
914
|
-
f"{self.
|
1675
|
+
f"{self.cur_command_root}/software-servers/by-name?"
|
915
1676
|
f"startFrom={start_from}&pageSize={page_size}"
|
916
1677
|
)
|
917
1678
|
|
@@ -923,7 +1684,9 @@ class RuntimeManager(Client):
|
|
923
1684
|
|
924
1685
|
return response.json().get("elements", "No platforms found")
|
925
1686
|
|
926
|
-
def get_servers_by_name(
|
1687
|
+
def get_servers_by_name(
|
1688
|
+
self, filter: str, effective_time: str = None
|
1689
|
+
) -> str | list:
|
927
1690
|
"""Returns the list of servers with a particular name. The name is specified in the filter.
|
928
1691
|
|
929
1692
|
Parameters
|
@@ -931,17 +1694,8 @@ class RuntimeManager(Client):
|
|
931
1694
|
filter : str, opt
|
932
1695
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
933
1696
|
If the value is None, we will default to the "OMAG Server Platform".
|
934
|
-
|
935
|
-
|
936
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
937
|
-
will be used.
|
938
|
-
|
939
|
-
start_from : int, optional
|
940
|
-
The index from which to start fetching the engine actions. Default is 0.
|
941
|
-
|
942
|
-
|
943
|
-
page_size : int, optional
|
944
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1697
|
+
effective_time: str, optional
|
1698
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
945
1699
|
|
946
1700
|
Returns
|
947
1701
|
-------
|
@@ -957,36 +1711,30 @@ class RuntimeManager(Client):
|
|
957
1711
|
"""
|
958
1712
|
loop = asyncio.get_event_loop()
|
959
1713
|
response = loop.run_until_complete(
|
960
|
-
self._async_get_servers_by_name(filter,
|
1714
|
+
self._async_get_servers_by_name(filter, effective_time)
|
961
1715
|
)
|
962
1716
|
return response
|
963
1717
|
|
964
1718
|
async def _async_get_servers_by_dep_impl_type(
|
965
1719
|
self,
|
966
1720
|
filter: str = "*",
|
967
|
-
view_server: str = None,
|
968
1721
|
effective_time: str = None,
|
969
1722
|
start_from: int = 0,
|
970
1723
|
page_size: int = max_paging_size,
|
971
1724
|
) -> str | list:
|
972
1725
|
"""Returns the list of servers with a particular deployed implementation type. The value is specified
|
973
|
-
|
974
|
-
|
1726
|
+
in the filter. If it is null, or no request body is supplied, all servers are returned.
|
1727
|
+
Async version.
|
975
1728
|
|
976
1729
|
Parameters
|
977
1730
|
----------
|
978
1731
|
filter : str, opt
|
979
1732
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
980
1733
|
If the value is None, we will default to the "OMAG Server Platform".
|
981
|
-
|
982
|
-
|
983
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
984
|
-
will be used.
|
985
|
-
|
1734
|
+
effective_time: str, optional
|
1735
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
986
1736
|
start_from : int, optional
|
987
1737
|
The index from which to start fetching the engine actions. Default is 0.
|
988
|
-
|
989
|
-
|
990
1738
|
page_size : int, optional
|
991
1739
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
992
1740
|
|
@@ -1002,14 +1750,12 @@ class RuntimeManager(Client):
|
|
1002
1750
|
UserNotAuthorizedException
|
1003
1751
|
|
1004
1752
|
"""
|
1005
|
-
if view_server is None:
|
1006
|
-
view_server = self.view_server
|
1007
1753
|
|
1008
1754
|
if filter == "*":
|
1009
1755
|
filter = None
|
1010
1756
|
|
1011
1757
|
url = (
|
1012
|
-
f"{self.
|
1758
|
+
f"{self.cur_command_root}/software-servers/"
|
1013
1759
|
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
|
1014
1760
|
)
|
1015
1761
|
|
@@ -1022,29 +1768,23 @@ class RuntimeManager(Client):
|
|
1022
1768
|
def get_servers_by_dep_impl_type(
|
1023
1769
|
self,
|
1024
1770
|
filter: str = "*",
|
1025
|
-
view_server: str = None,
|
1026
1771
|
effective_time: str = None,
|
1027
1772
|
start_from: int = 0,
|
1028
1773
|
page_size: int = max_paging_size,
|
1029
1774
|
) -> str | list:
|
1030
1775
|
"""Returns the list of servers with a particular deployed implementation type.
|
1031
|
-
|
1032
|
-
|
1776
|
+
The value is specified in the filter. If it is null, or no request body is supplied,
|
1777
|
+
all servers are returned.
|
1033
1778
|
|
1034
1779
|
Parameters
|
1035
1780
|
----------
|
1036
1781
|
filter : str, opt
|
1037
1782
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1038
1783
|
If the value is None, we will default to the "OMAG Server Platform".
|
1039
|
-
|
1040
|
-
|
1041
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1042
|
-
will be used.
|
1043
|
-
|
1784
|
+
effective_time: str, optional
|
1785
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
1044
1786
|
start_from : int, optional
|
1045
1787
|
The index from which to start fetching the engine actions. Default is 0.
|
1046
|
-
|
1047
|
-
|
1048
1788
|
page_size : int, optional
|
1049
1789
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1050
1790
|
|
@@ -1063,7 +1803,7 @@ class RuntimeManager(Client):
|
|
1063
1803
|
loop = asyncio.get_event_loop()
|
1064
1804
|
response = loop.run_until_complete(
|
1065
1805
|
self._async_get_servers_by_dep_impl_type(
|
1066
|
-
filter,
|
1806
|
+
filter, effective_time, start_from, page_size
|
1067
1807
|
)
|
1068
1808
|
)
|
1069
1809
|
return response
|
@@ -1071,29 +1811,23 @@ class RuntimeManager(Client):
|
|
1071
1811
|
async def _async_get_server_templates_by_dep_impl_type(
|
1072
1812
|
self,
|
1073
1813
|
filter: str = "*",
|
1074
|
-
view_server: str = None,
|
1075
1814
|
effective_time: str = None,
|
1076
1815
|
start_from: int = 0,
|
1077
1816
|
page_size: int = max_paging_size,
|
1078
1817
|
) -> str | list:
|
1079
|
-
"""Returns the list of
|
1080
|
-
|
1081
|
-
|
1818
|
+
"""Returns the list of server templates with a particular deployed implementation type. The value is
|
1819
|
+
specified in the filter. If it is null, or no request body is supplied, all servers are returned.
|
1820
|
+
Async version.
|
1082
1821
|
|
1083
1822
|
Parameters
|
1084
1823
|
----------
|
1085
1824
|
filter : str, opt
|
1086
1825
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1087
1826
|
If the value is None, we will default to the "OMAG Server Platform".
|
1088
|
-
|
1089
|
-
|
1090
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1091
|
-
will be used.
|
1092
|
-
|
1827
|
+
effective_time: str, optional
|
1828
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
1093
1829
|
start_from : int, optional
|
1094
1830
|
The index from which to start fetching the engine actions. Default is 0.
|
1095
|
-
|
1096
|
-
|
1097
1831
|
page_size : int, optional
|
1098
1832
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1099
1833
|
|
@@ -1109,14 +1843,12 @@ class RuntimeManager(Client):
|
|
1109
1843
|
UserNotAuthorizedException
|
1110
1844
|
|
1111
1845
|
"""
|
1112
|
-
if view_server is None:
|
1113
|
-
view_server = self.view_server
|
1114
1846
|
|
1115
1847
|
if filter == "*":
|
1116
1848
|
filter = None
|
1117
1849
|
|
1118
1850
|
url = (
|
1119
|
-
f"{self.
|
1851
|
+
f"{self.cur_command_root}/software-servers/"
|
1120
1852
|
f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
|
1121
1853
|
)
|
1122
1854
|
|
@@ -1129,29 +1861,23 @@ class RuntimeManager(Client):
|
|
1129
1861
|
def get_server_templates_by_dep_impl_type(
|
1130
1862
|
self,
|
1131
1863
|
filter: str = "*",
|
1132
|
-
view_server: str = None,
|
1133
1864
|
effective_time: str = None,
|
1134
1865
|
start_from: int = 0,
|
1135
1866
|
page_size: int = max_paging_size,
|
1136
1867
|
) -> str | list:
|
1137
|
-
"""Returns the list of
|
1138
|
-
|
1139
|
-
|
1868
|
+
"""Returns the list of server templates with a particular deployed implementation type.
|
1869
|
+
The value is specified in the filter. If it is null, or no request body is supplied,
|
1870
|
+
all servers are returned.
|
1140
1871
|
|
1141
1872
|
Parameters
|
1142
1873
|
----------
|
1143
1874
|
filter : str, opt
|
1144
1875
|
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1145
1876
|
If the value is None, we will default to the "OMAG Server Platform".
|
1146
|
-
|
1147
|
-
|
1148
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1149
|
-
will be used.
|
1150
|
-
|
1877
|
+
effective_time: str, optional
|
1878
|
+
Timeframe to return information for. Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601).
|
1151
1879
|
start_from : int, optional
|
1152
1880
|
The index from which to start fetching the engine actions. Default is 0.
|
1153
|
-
|
1154
|
-
|
1155
1881
|
page_size : int, optional
|
1156
1882
|
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1157
1883
|
|
@@ -1170,113 +1896,18 @@ class RuntimeManager(Client):
|
|
1170
1896
|
loop = asyncio.get_event_loop()
|
1171
1897
|
response = loop.run_until_complete(
|
1172
1898
|
self._async_get_server_templates_by_dep_impl_type(
|
1173
|
-
filter,
|
1899
|
+
filter, effective_time, start_from, page_size
|
1174
1900
|
)
|
1175
1901
|
)
|
1176
1902
|
return response
|
1177
1903
|
|
1178
|
-
async def
|
1179
|
-
self,
|
1180
|
-
server_guid: str = None,
|
1181
|
-
view_server: str = None,
|
1182
|
-
effective_time: str = None,
|
1183
|
-
) -> str | list:
|
1184
|
-
"""Returns details about the server's catalog entry (asset). Async version.
|
1185
|
-
|
1186
|
-
Parameters
|
1187
|
-
----------
|
1188
|
-
filter : str, opt
|
1189
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1190
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
1191
|
-
|
1192
|
-
view_server : str, optional
|
1193
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1194
|
-
will be used.
|
1195
|
-
|
1196
|
-
start_from : int, optional
|
1197
|
-
The index from which to start fetching the engine actions. Default is 0.
|
1198
|
-
|
1199
|
-
|
1200
|
-
page_size : int, optional
|
1201
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1202
|
-
|
1203
|
-
Returns
|
1204
|
-
-------
|
1205
|
-
Response
|
1206
|
-
A lit of json dict with the platform reports.
|
1207
|
-
|
1208
|
-
Raises
|
1209
|
-
------
|
1210
|
-
InvalidParameterException
|
1211
|
-
PropertyServerException
|
1212
|
-
UserNotAuthorizedException
|
1213
|
-
|
1214
|
-
"""
|
1215
|
-
if view_server is None:
|
1216
|
-
view_server = self.view_server
|
1217
|
-
|
1218
|
-
url = f"{self.platform_url}/servers/{view_server}/api/open-metadata/runtime-manager/software-servers/{server_guid}"
|
1219
|
-
|
1220
|
-
if effective_time is not None:
|
1221
|
-
body = {"effectiveTime": effective_time}
|
1222
|
-
response = await self._async_make_request("POST", url, body)
|
1223
|
-
|
1224
|
-
else:
|
1225
|
-
response = await self._async_make_request("POST", url)
|
1226
|
-
|
1227
|
-
return response.json().get("element", "No servers found")
|
1228
|
-
|
1229
|
-
def get_server_by_guid(
|
1230
|
-
self,
|
1231
|
-
server_guid: str = None,
|
1232
|
-
view_server: str = None,
|
1233
|
-
effective_time: str = None,
|
1234
|
-
) -> str | list:
|
1235
|
-
"""Returns details about the server's catalog entry (asset). Async version.
|
1236
|
-
|
1237
|
-
Parameters
|
1238
|
-
----------
|
1239
|
-
filter : str, opt
|
1240
|
-
Filter specifies the kind of deployed implementation type of the platforms to return information for.
|
1241
|
-
If the value is None, we will default to the "OMAG Server Platform".
|
1242
|
-
|
1243
|
-
view_server : str, optional
|
1244
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1245
|
-
will be used.
|
1246
|
-
|
1247
|
-
start_from : int, optional
|
1248
|
-
The index from which to start fetching the engine actions. Default is 0.
|
1249
|
-
|
1250
|
-
|
1251
|
-
page_size : int, optional
|
1252
|
-
The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
|
1253
|
-
|
1254
|
-
Returns
|
1255
|
-
-------
|
1256
|
-
Response
|
1257
|
-
A lit of json dict with the platform reports.
|
1258
|
-
|
1259
|
-
"""
|
1260
|
-
loop = asyncio.get_event_loop()
|
1261
|
-
response = loop.run_until_complete(
|
1262
|
-
self._async_get_server_by_guid(server_guid, view_server, effective_time)
|
1263
|
-
)
|
1264
|
-
return response
|
1265
|
-
|
1266
|
-
async def _async_get_server_report(
|
1267
|
-
self, server_guid: str = None, view_server: str = None
|
1268
|
-
) -> str | list:
|
1904
|
+
async def _async_get_server_report(self, server_guid: str = None) -> str | list:
|
1269
1905
|
"""Returns details about the running server. Async version.
|
1270
1906
|
|
1271
1907
|
Parameters
|
1272
1908
|
----------
|
1273
1909
|
server_guid: str
|
1274
|
-
Identity of the
|
1275
|
-
|
1276
|
-
view_server : str, optional
|
1277
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1278
|
-
will be used.
|
1279
|
-
|
1910
|
+
Identity of the server to report on.
|
1280
1911
|
|
1281
1912
|
Returns
|
1282
1913
|
-------
|
@@ -1290,28 +1921,20 @@ class RuntimeManager(Client):
|
|
1290
1921
|
UserNotAuthorizedException
|
1291
1922
|
|
1292
1923
|
"""
|
1293
|
-
if view_server is None:
|
1294
|
-
view_server = self.view_server
|
1295
1924
|
|
1296
|
-
url = f"{self.
|
1925
|
+
url = f"{self.cur_command_root}/omag-servers/{server_guid}/instance/report"
|
1297
1926
|
|
1298
1927
|
response = await self._async_make_request("GET", url)
|
1299
1928
|
|
1300
|
-
return response.json().get("elements", "No
|
1929
|
+
return response.json().get("elements", "No server found")
|
1301
1930
|
|
1302
|
-
def get_server_report(
|
1303
|
-
self, server_guid: str = None, view_server: str = None
|
1304
|
-
) -> str | list:
|
1931
|
+
def get_server_report(self, server_guid: str = None) -> str | list:
|
1305
1932
|
"""Returns details about the running server.
|
1306
1933
|
|
1307
1934
|
Parameters
|
1308
1935
|
----------
|
1309
1936
|
server_guid: str
|
1310
|
-
Identity of the
|
1311
|
-
|
1312
|
-
view_server : str, optional
|
1313
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1314
|
-
will be used.
|
1937
|
+
Identity of the server to report on.
|
1315
1938
|
|
1316
1939
|
Returns
|
1317
1940
|
-------
|
@@ -1326,121 +1949,21 @@ class RuntimeManager(Client):
|
|
1326
1949
|
|
1327
1950
|
"""
|
1328
1951
|
loop = asyncio.get_event_loop()
|
1329
|
-
response = loop.run_until_complete(
|
1330
|
-
self._async_get_server_report(server_guid, view_server)
|
1331
|
-
)
|
1952
|
+
response = loop.run_until_complete(self._async_get_server_report(server_guid))
|
1332
1953
|
return response
|
1333
1954
|
|
1334
|
-
async def _async_add_archive_file(
|
1335
|
-
self,
|
1336
|
-
archive_file: str,
|
1337
|
-
server_guid: str,
|
1338
|
-
view_server: str = None,
|
1339
|
-
time_out: int = 60,
|
1340
|
-
) -> None:
|
1341
|
-
"""Add a new open metadata archive to running OMAG Server's repository.
|
1342
|
-
An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
|
1343
|
-
that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
|
1344
|
-
Async version.
|
1345
|
-
|
1346
|
-
https://egeria-project.org/concepts/open-metadata-archives/
|
1347
|
-
|
1348
|
-
Parameters
|
1349
|
-
----------
|
1350
|
-
archive_file: str
|
1351
|
-
Open metadata archive file to load.
|
1352
|
-
server_guid: str
|
1353
|
-
GUID of the view_server to load the file into.
|
1354
|
-
view_server : str, optional
|
1355
|
-
The name of the view view_server to work with. If not provided, the default view_server name
|
1356
|
-
will be used.
|
1357
|
-
time_out: int, optional
|
1358
|
-
Time out for the rest call.
|
1359
|
-
|
1360
|
-
Returns
|
1361
|
-
-------
|
1362
|
-
Response
|
1363
|
-
None
|
1364
|
-
|
1365
|
-
Raises
|
1366
|
-
------
|
1367
|
-
InvalidParameterException
|
1368
|
-
PropertyServerException
|
1369
|
-
UserNotAuthorizedException
|
1370
|
-
|
1371
|
-
"""
|
1372
|
-
if view_server is None:
|
1373
|
-
view_server = self.view_server
|
1374
|
-
|
1375
|
-
url = f"{self.platform_url}/servers/{view_server}/api/open-metadata/runtime-manager/omag-servers/{server_guid}/instance/load/open-metadata-archives/file"
|
1376
|
-
|
1377
|
-
await self._async_make_request(
|
1378
|
-
"POST-DATA", url, archive_file, time_out=time_out
|
1379
|
-
)
|
1380
|
-
return
|
1381
|
-
|
1382
|
-
def add_archive_file(
|
1383
|
-
self,
|
1384
|
-
archive_file: str,
|
1385
|
-
server_guid: str,
|
1386
|
-
view_server: str = None,
|
1387
|
-
time_out: int = 60,
|
1388
|
-
) -> None:
|
1389
|
-
"""Add a new open metadata archive to running OMAG Server's repository.
|
1390
|
-
An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
|
1391
|
-
that is stored in the named file. It can be used with OMAG servers that are of type Open Metadata Store.
|
1392
|
-
|
1393
|
-
https://egeria-project.org/concepts/open-metadata-archives/
|
1394
|
-
|
1395
|
-
Parameters
|
1396
|
-
----------
|
1397
|
-
archive_file: str
|
1398
|
-
Open metadata archive file to load.
|
1399
|
-
server_guid: str
|
1400
|
-
GUID of the view_server to load the file into.
|
1401
|
-
view_server : str, optional
|
1402
|
-
The name of the view view_server to work with. If not provided, the default view_server name
|
1403
|
-
will be used.
|
1404
|
-
|
1405
|
-
Returns
|
1406
|
-
-------
|
1407
|
-
Response
|
1408
|
-
None
|
1409
|
-
|
1410
|
-
Raises
|
1411
|
-
------
|
1412
|
-
InvalidParameterException
|
1413
|
-
PropertyServerException
|
1414
|
-
UserNotAuthorizedException
|
1415
|
-
|
1416
|
-
"""
|
1417
|
-
|
1418
|
-
loop = asyncio.get_event_loop()
|
1419
|
-
loop.run_until_complete(
|
1420
|
-
self._async_add_archive_file(
|
1421
|
-
archive_file, server_guid, view_server, time_out
|
1422
|
-
)
|
1423
|
-
)
|
1424
|
-
return
|
1425
|
-
|
1426
1955
|
#
|
1427
1956
|
# Activate
|
1428
1957
|
#
|
1429
1958
|
|
1430
|
-
async def _async_activate_with_stored_config(
|
1431
|
-
|
1432
|
-
|
1433
|
-
"""Activate the Open Metadata and Governance (OMAG) view_server using the configuration document stored for this
|
1434
|
-
server. Async Version
|
1959
|
+
async def _async_activate_with_stored_config(self, server_guid: str) -> None:
|
1960
|
+
"""Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this
|
1961
|
+
server. Async Version
|
1435
1962
|
|
1436
1963
|
Parameters
|
1437
1964
|
----------
|
1438
1965
|
server_guid: str
|
1439
|
-
Identity of the
|
1440
|
-
|
1441
|
-
view_server : str, optional
|
1442
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1443
|
-
will be used.
|
1966
|
+
Identity of the server to activate.
|
1444
1967
|
|
1445
1968
|
Returns
|
1446
1969
|
-------
|
@@ -1456,21 +1979,15 @@ class RuntimeManager(Client):
|
|
1456
1979
|
"""
|
1457
1980
|
pass
|
1458
1981
|
|
1459
|
-
def activate_with_stored_config(
|
1460
|
-
self, server_guid: str, view_server: str = None
|
1461
|
-
) -> None:
|
1982
|
+
def activate_with_stored_config(self, server_guid: str) -> None:
|
1462
1983
|
"""Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this
|
1463
|
-
|
1984
|
+
server.
|
1464
1985
|
|
1465
1986
|
Parameters
|
1466
1987
|
----------
|
1467
1988
|
server_guid: str
|
1468
1989
|
Identity of the server to activate.
|
1469
1990
|
|
1470
|
-
view_server : str, optional
|
1471
|
-
The name of the view_server to get governance engine summaries from. If not provided, the default view_server name
|
1472
|
-
will be used.
|
1473
|
-
|
1474
1991
|
Returns
|
1475
1992
|
-------
|
1476
1993
|
None
|