pyegeria 0.7.9__py3-none-any.whl → 0.7.10__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.
@@ -52,8 +52,8 @@ from examples.widgets.tech.list_tech_templates import display_templates_spec
52
52
  from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
53
53
  from examples.widgets.tech.list_elements import list_elements
54
54
 
55
- @tui()
56
- # @tui('menu', 'menu', 'A textual command line interface')
55
+ # @tui()
56
+ @tui('menu', 'menu', 'A textual command line interface')
57
57
  @click.version_option("0.0.1", prog_name="egeria_ops")
58
58
  @click.group()
59
59
  @click.option('--server', default='active-metadata-store', envvar='EGERIA_METADATA_STORE',
@@ -11,6 +11,7 @@ import os
11
11
 
12
12
  from rich import print
13
13
  from rich.console import Console
14
+ from rich.markdown import Markdown
14
15
  from rich.panel import Panel
15
16
  from rich.prompt import Prompt
16
17
  from rich.text import Text
@@ -54,20 +55,24 @@ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: st
54
55
  description = tech_details.get('description', '---')
55
56
 
56
57
  style = "bold bright_white on black"
57
- l2 = tree.add(Text(f"Name: {name}", "bold red"))
58
- l2 = tree.add(Text(f"* QualifiedName: {qualified_name}", style))
59
- l2 = tree.add(Text(f"* Category: {category}", style))
60
- l2 = tree.add(Text(f"* Technology Description: {description}", style))
58
+ bas_md = (f"* Name: {name}", "bold red\n"
59
+ f"* QualifiedName: {qualified_name}\n"
60
+ f"* Category: {category}\n"
61
+ f"* Technology Description: {description}\n"
62
+ )
63
+ bas_out = Markdown(bas_md, style="bright_white on black")
64
+
65
+ l2 = tree.add(Panel(bas_out))
61
66
  ext_ref = tech_details.get('externalReferences', None)
62
67
 
63
68
  if ext_ref is not None:
64
69
  uri = ext_ref[0]["properties"].get("uri", "---")
65
70
  # console.print(f" {type(ext_ref)}, {len(ext_ref)}")
66
- l2 = tree.add(Text(f'* URI: {uri}', style))
71
+ l2 = tree.add(Panel(Text(f'* URI: {uri}', style)))
67
72
 
68
73
  resource_list = tech_details.get('resourceList', None)
69
74
  if resource_list:
70
- t_r = tree.add("Resource List[bold red]")
75
+ t_r = tree.add(Panel("Resource List[bold red]"))
71
76
  for resource in resource_list:
72
77
  resource_use = Text(f"[bold bright_white]{resource.get('resourceUse', '---')}")
73
78
  resource_use_description = Text(f"[bold bright_white]{resource.get('resourceUseDescription', '---')}")
@@ -80,9 +85,11 @@ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: st
80
85
  f"[white]Unique Name: {unique_name}\n[white]Related GUID: {related_guid}\n")
81
86
  p = Panel.fit(resource_text)
82
87
  tt = t_r.add(p, style=style)
88
+ else:
89
+ tt = tree.add(Panel(f"Resource details for {tech} where not found"))
83
90
 
84
91
  else:
85
- tt = tree.add(f"Tech type {tech} was not found - please check the tech type name")
92
+ tt = tree.add(Panel(f"Tech type {tech} was not found - please check the tech type name"))
86
93
 
87
94
  return tt
88
95
 
@@ -10,7 +10,7 @@ from datetime import datetime
10
10
 
11
11
  from httpx import Response
12
12
 
13
- from pyegeria import Client, max_paging_size, body_slimmer, INTEGRATION_GUIDS, TEMPLATE_GUIDS
13
+ from pyegeria import Client, max_paging_size, body_slimmer, TEMPLATE_GUIDS
14
14
  from pyegeria._exceptions import (InvalidParameterException, PropertyServerException, UserNotAuthorizedException)
15
15
  from ._validators import validate_name, validate_guid, validate_search_string
16
16
 
@@ -165,7 +165,7 @@ class AutomatedCuration(Client):
165
165
  The GUID of the Kafka server element.
166
166
  """
167
167
 
168
- body = {"templateGUID":TEMPLATE_GUIDS['Apache Kafka Server'], "isOwnAnchor": 'true',
168
+ body = {"templateGUID": TEMPLATE_GUIDS['Apache Kafka Server'], "isOwnAnchor": 'true',
169
169
  "placeholderPropertyValues": {"serverName": kafka_server, "hostIdentifier": host_name,
170
170
  "portNumber": port, "description": description}}
171
171
  body_s = body_slimmer(body)
@@ -200,8 +200,7 @@ class AutomatedCuration(Client):
200
200
  """
201
201
  loop = asyncio.get_event_loop()
202
202
  response = loop.run_until_complete(
203
- self._async_create_kafka_server_element_from_template(kafka_server, host_name, port,
204
- description, server))
203
+ self._async_create_kafka_server_element_from_template(kafka_server, host_name, port, description, server))
205
204
  return response
206
205
 
207
206
  async def _async_create_postgres_server_element_from_template(self, postgres_server: str, host_name: str, port: str,
@@ -227,7 +226,7 @@ class AutomatedCuration(Client):
227
226
  User password to connect to the database
228
227
 
229
228
  description: str, opt
230
- A description of the Kafka server.
229
+ A description of the element.
231
230
 
232
231
  server : str, optional
233
232
  The name of the view server to use. Default uses the client instance.
@@ -237,7 +236,7 @@ class AutomatedCuration(Client):
237
236
  str
238
237
  The GUID of the Postgres server element.
239
238
  """
240
- body = {"templateGUID":TEMPLATE_GUIDS['PostgreSQL Server'], "isOwnAnchor": 'true',
239
+ body = {"templateGUID": TEMPLATE_GUIDS['PostgreSQL Server'], "isOwnAnchor": 'true',
241
240
  "placeholderPropertyValues": {"serverName": postgres_server, "hostIdentifier": host_name,
242
241
  "portNumber": port, "databaseUserId": db_user, "description": description,
243
242
  "databasePassword": db_pwd}}
@@ -265,7 +264,7 @@ class AutomatedCuration(Client):
265
264
  The name of the view server to use. Default uses the client instance.
266
265
 
267
266
  description: str, opt
268
- A description of the Kafka server.
267
+ A description of the elementr.
269
268
 
270
269
  db_user: str
271
270
  User name to connect to the database
@@ -287,44 +286,38 @@ class AutomatedCuration(Client):
287
286
  async def _async_create_folder_element_from_template(self, path_name: str, folder_name: str, file_system: str,
288
287
  description: str = None, version: str = None,
289
288
  server: str = None) -> str:
290
- """ Create a File folder element from a template. Async version.
289
+ """ Create a File folder element from a template.
290
+ Async version.
291
291
 
292
- Parameters
293
- ----------
294
- path_name : str
295
- The name of the fill path including the folder..
292
+ Parameters
293
+ ----------
294
+ path_name : str
295
+ The path including the folder..
296
296
 
297
- folder_name : str
298
- The name of the folder to create.
297
+ folder_name : str
298
+ The name of the folder to create.
299
299
 
300
- file_system : str
301
- The unique name for the file system that the folder belongs to. It may be a machine name or URL to a remote
302
- file store.
300
+ file_system : str
301
+ The unique name for the file system that the folder belongs to. It may be a machine name or URL to a
302
+ remote file store.
303
303
 
304
- description: str, opt
305
- A description of the Kafka server.
304
+ description: str, opt
305
+ A description of the element.
306
306
 
307
- version: str, opt
308
- version of the file folder - typically of the form x.y.z
307
+ version: str, opt
308
+ version of the element - typically of the form x.y.z
309
309
 
310
- server : str, optional
311
- The name of the view server to use. Default uses the client instance.
310
+ server : str, optional
311
+ The name of the view server to use. Default uses the client instance.
312
312
 
313
- Returns
314
- -------
315
- str
316
- The GUID of the File Folder element.
313
+ Returns
314
+ -------
315
+ str
316
+ The GUID of the Postgres server element.
317
317
  """
318
- body = {"templateGUID": TEMPLATE_GUIDS['FileFolder'],
319
- "isOwnAnchor": 'true',
320
- "placeholderPropertyValues": {
321
- "directoryPathName": path_name,
322
- "directoryName": folder_name,
323
- "versionIdentifier": version,
324
- "fileSystemName": file_system,
325
- "description": description,
326
- }
327
- }
318
+ body = {"templateGUID": TEMPLATE_GUIDS['FileFolder'], "isOwnAnchor": 'true',
319
+ "placeholderPropertyValues": {"directoryPathName": path_name, "directoryName": folder_name,
320
+ "versionIdentifier": version, "fileSystemName": file_system, "description": description, }}
328
321
  body_s = body_slimmer(body)
329
322
  response = await self._async_create_element_from_template(body_s, server)
330
323
  return str(response)
@@ -336,7 +329,7 @@ class AutomatedCuration(Client):
336
329
  Parameters
337
330
  ----------
338
331
  path_name : str
339
- The name of the fill path including the folder..
332
+ The path including the folder..
340
333
 
341
334
  folder_name : str
342
335
  The name of the folder to create.
@@ -346,10 +339,10 @@ class AutomatedCuration(Client):
346
339
  remote file store.
347
340
 
348
341
  description: str, opt
349
- A description of the Kafka server.
342
+ A description of the element.
350
343
 
351
344
  version: str, opt
352
- version of the file folder - typically of the form x.y.z
345
+ version of the element - typically of the form x.y.z
353
346
 
354
347
  server : str, optional
355
348
  The name of the view server to use. Default uses the client instance.
@@ -361,8 +354,488 @@ class AutomatedCuration(Client):
361
354
  """
362
355
  loop = asyncio.get_event_loop()
363
356
  response = loop.run_until_complete(
364
- self._async_create_folder_element_from_template(path_name, folder_name, file_system,
365
- description, version, server))
357
+ self._async_create_folder_element_from_template(path_name, folder_name, file_system, description, version,
358
+ server))
359
+ return response
360
+
361
+ async def _async_create_uc_server_element_from_template(self, server_name: str, host_url: str, port: str,
362
+ description: str = None, version: str = None,
363
+ server: str = None) -> str:
364
+ """ Create a Unity Catalog Server element from a template. Async version.
365
+
366
+ Parameters
367
+ ----------
368
+ server_name : str
369
+ The name of the Unity Catalog server we are configuring.
370
+
371
+ host_url : str
372
+ The URL of the server.
373
+
374
+ port : str
375
+ The port number of the server.
376
+
377
+ description: str, opt
378
+ A description of the server.
379
+
380
+ version: str, opt
381
+ version of the element - typically of the form x.y.z
382
+
383
+ server : str, optional
384
+ The name of the view server to use. Default uses the client instance.
385
+
386
+ Returns
387
+ -------
388
+ str
389
+ The GUID of the File Folder element.
390
+ """
391
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Server'], "isOwnAnchor": 'true',
392
+ "placeholderPropertyValues": {"serverName": server_name, "hostURL": host_url,
393
+ "versionIdentifier": version, "portNumber": port, "description": description, }}
394
+ body_s = body_slimmer(body)
395
+ response = await self._async_create_element_from_template(body_s, server)
396
+ return str(response)
397
+
398
+ def create_uc_server_element_from_template(self, server_name: str, host_url: str, port: str,
399
+ description: str = None, version: str = None, server: str = None) -> str:
400
+ """ Create a Unity Catalog Server element from a template. Async version.
401
+
402
+ Parameters
403
+ ----------
404
+ server_name : str
405
+ The name of the Unity Catalog server we are configuring.
406
+
407
+ host_url : str
408
+ The URL of the server.
409
+
410
+ port : str
411
+ The port number of the server.
412
+
413
+ description: str, opt
414
+ A description of the server.
415
+
416
+ version: str, opt
417
+ version of the element - typically of the form x.y.z
418
+
419
+ server : str, optional
420
+ The name of the view server to use. Default uses the client instance.
421
+
422
+ Returns
423
+ -------
424
+ str
425
+ The GUID of the File Folder element.
426
+ """
427
+ loop = asyncio.get_event_loop()
428
+ response = loop.run_until_complete(
429
+ self._async_create_uc_server_element_from_template(server_name, host_url, port, description, version,
430
+ server))
431
+ return response
432
+
433
+ async def _async_create_uc_catalog_element_from_template(self, uc_catalog: str, network_address: str,
434
+ description: str = None, version: str = None,
435
+ server: str = None) -> str:
436
+ """ Create a Unity Catalog Catalog element from a template. Async version.
437
+
438
+ Parameters
439
+ ----------
440
+ uc_catalog : str
441
+ The name of the UC catalog we are configuring.
442
+
443
+ network_address : str
444
+ The endpoint of the catalog.
445
+
446
+ description: str, opt
447
+ A description of the server.
448
+
449
+ version: str, opt
450
+ version of the element - typically of the form x.y.z
451
+
452
+ server : str, optional
453
+ The name of the view server to use. Default uses the client instance.
454
+
455
+ Returns
456
+ -------
457
+ str
458
+ The GUID of the File Folder element.
459
+ """
460
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Catalog'], "isOwnAnchor": 'true',
461
+ "placeholderPropertyValues": {"ucCatalogName": uc_catalog, "serverNetworkAddress": network_address,
462
+ "versionIdentifier": version, "description": description, }}
463
+ body_s = body_slimmer(body)
464
+ response = await self._async_create_element_from_template(body_s, server)
465
+ return str(response)
466
+
467
+ def create_uc_catalog_element_from_template(self, uc_catalog: str, network_address: str, description: str = None,
468
+ version: str = None, server: str = None) -> str:
469
+ """ Create a Unity Catalog Catalog element from a template.
470
+
471
+ Parameters
472
+ ----------
473
+ uc_catalog : str
474
+ The name of the UC catalog we are configuring.
475
+
476
+ network_address : str
477
+ The endpoint of the catalog.
478
+
479
+ description: str, opt
480
+ A description of the server.
481
+
482
+ version: str, opt
483
+ version of the element - typically of the form x.y.z
484
+
485
+ server : str, optional
486
+ The name of the view server to use. Default uses the client instance.
487
+
488
+ Returns
489
+ -------
490
+ str
491
+ The GUID of the File Folder element.
492
+ """
493
+ loop = asyncio.get_event_loop()
494
+ response = loop.run_until_complete(
495
+ self._async_create_uc_catalog_element_from_template(uc_catalog, network_address, description, version,
496
+ server))
497
+ return response
498
+
499
+ async def _async_create_uc_schema_element_from_template(self, uc_catalog: str, uc_schema: str, network_address: str,
500
+ description: str = None, version: str = None,
501
+ server: str = None) -> str:
502
+ """ Create a Unity Catalog schema element from a template. Async version.
503
+
504
+ Parameters
505
+ ----------
506
+ uc_catalog : str
507
+ The name of the UC catalog we are configuring.
508
+
509
+ uc_schema: str
510
+ The name of the UC schema we are configuring.
511
+
512
+ network_address : str
513
+ The endpoint of the catalog.
514
+
515
+ description: str, opt
516
+ A description of the server.
517
+
518
+ version: str, opt
519
+ version of the element - typically of the form x.y.z
520
+
521
+ server : str, optional
522
+ The name of the view server to use. Default uses the client instance.
523
+
524
+ Returns
525
+ -------
526
+ str
527
+ The GUID of the File Folder element.
528
+ """
529
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Schema'], "isOwnAnchor": 'true',
530
+ "placeholderPropertyValues": {"ucCatalogName": uc_catalog, "ucSchemaName": uc_schema,
531
+ "serverNetworkAddress": network_address, "versionIdentifier": version,
532
+ "description": description, }}
533
+ body_s = body_slimmer(body)
534
+ response = await self._async_create_element_from_template(body_s, server)
535
+ return str(response)
536
+
537
+ def create_uc_schema_element_from_template(self, uc_catalog: str, uc_schema: str, network_address: str,
538
+ description: str = None, version: str = None, server: str = None) -> str:
539
+ """ Create a Unity Catalog schema element from a template. Async version.
540
+
541
+ Parameters
542
+ ----------
543
+ uc_catalog : str
544
+ The name of the UC catalog we are configuring.
545
+
546
+ uc_schema: str
547
+ The name of the UC schema we are configuring.
548
+
549
+ network_address : str
550
+ The endpoint of the catalog.
551
+
552
+ description: str, opt
553
+ A description of the server.
554
+
555
+ version: str, opt
556
+ version of the element - typically of the form x.y.z
557
+
558
+ server : str, optional
559
+ The name of the view server to use. Default uses the client instance.
560
+
561
+ Returns
562
+ -------
563
+ str
564
+ The GUID of the File Folder element.
565
+ """
566
+ loop = asyncio.get_event_loop()
567
+ response = loop.run_until_complete(
568
+ self._async_create_uc_schema_element_from_template(uc_catalog, uc_schema, network_address, description,
569
+ version, server))
570
+ return response
571
+
572
+ async def _async_create_uc_table_element_from_template(self, uc_catalog: str, uc_schema: str, uc_table: str,
573
+ uc_table_type: str, uc_storage_loc: str,
574
+ uc_data_source_format: str, network_address: str,
575
+ description: str = None, version: str = None,
576
+ server: str = None) -> str:
577
+ """ Create a Unity Catalog table element from a template. Async version.
578
+
579
+ Parameters
580
+ ----------
581
+ uc_catalog : str
582
+ The name of the UC catalog we are configuring.
583
+
584
+ uc_schema: str
585
+ The name of the UC schema we are configuring.
586
+
587
+ uc_table: str
588
+ The name of the UC table we are configuring.
589
+ uc_table_type: str
590
+ The type of table - expect either Managed or External.
591
+ uc_storage_loc: str
592
+ The location where the data associated with this element is stored.
593
+ uc_data_source_format: str
594
+ The format of the data source - currently DELTA, CSV, JSON, AVRO, PARQUET, ORC, TEXT.
595
+
596
+ network_address : str
597
+ The endpoint of the catalog.
598
+
599
+ description: str, opt
600
+ A description of the server.
601
+
602
+ version: str, opt
603
+ version of the element - typically of the form x.y.z
604
+
605
+ server : str, optional
606
+ The name of the view server to use. Default uses the client instance.
607
+
608
+ Returns
609
+ -------
610
+ str
611
+ The GUID of the File Folder element.
612
+ """
613
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Table'], "isOwnAnchor": 'true',
614
+ "placeholderPropertyValues": {"ucCatalogName": uc_catalog, "ucSchemaName": uc_schema,
615
+ "ucTableName": uc_table, "ucTableType": uc_table_type, "ucStorageLocation": uc_storage_loc,
616
+ "ucDataSourceFormat": uc_data_source_format, "serverNetworkAddress": network_address,
617
+ "versionIdentifier": version, "description": description, }}
618
+ body_s = body_slimmer(body)
619
+ response = await self._async_create_element_from_template(body_s, server)
620
+ return str(response)
621
+
622
+ def create_uc_table_element_from_template(self, uc_catalog: str, uc_schema: str, uc_table: str, uc_table_type: str,
623
+ uc_storage_loc: str, uc_data_source_format: str, network_address: str,
624
+ description: str = None, version: str = None, server: str = None) -> str:
625
+ """ Create a Unity Catalog table element from a template.
626
+
627
+ Parameters
628
+ ----------
629
+ uc_catalog : str
630
+ The name of the UC catalog we are configuring.
631
+
632
+ uc_schema: str
633
+ The name of the UC schema we are configuring.
634
+
635
+ uc_table: str
636
+ The name of the UC table we are configuring.
637
+ uc_table_type: str
638
+ The type of table - expect either Managed or External.
639
+ uc_storage_loc: str
640
+ The location where the data associated with this element is stored.
641
+ uc_data_source_format: str
642
+ The format of the data source - currently DELTA, CSV, JSON, AVRO, PARQUET, ORC, TEXT.
643
+
644
+ network_address : str
645
+ The endpoint of the catalog.
646
+
647
+ description: str, opt
648
+ A description of the server.
649
+
650
+ version: str, opt
651
+ version of the element - typically of the form x.y.z
652
+
653
+ server : str, optional
654
+ The name of the view server to use. Default uses the client instance.
655
+
656
+ Returns
657
+ -------
658
+ str
659
+ The GUID of the File Folder element.
660
+ """
661
+ loop = asyncio.get_event_loop()
662
+ response = loop.run_until_complete(
663
+ self._async_create_uc_table_element_from_template(uc_catalog, uc_schema, uc_table, uc_table_type,
664
+ uc_storage_loc, uc_data_source_format, network_address,
665
+ description, version, server))
666
+ return response
667
+
668
+ async def _async_create_uc_function_element_from_template(self, uc_catalog: str, uc_schema: str, uc_function: str,
669
+ network_address: str, description: str = None,
670
+ version: str = None, server: str = None) -> str:
671
+ """ Create a Unity Catalog function element from a template. Async version.
672
+
673
+ Parameters
674
+ ----------
675
+ uc_catalog : str
676
+ The name of the UC catalog we are configuring.
677
+
678
+ uc_schema: str
679
+ The name of the UC schema we are configuring.
680
+
681
+ uc_function: str
682
+ The name of the UC function we are configuring.
683
+
684
+ network_address : str
685
+ The endpoint of the catalog.
686
+
687
+ description: str, opt
688
+ A description of the server.
689
+
690
+ version: str, opt
691
+ version of the element - typically of the form x.y.z
692
+
693
+ server : str, optional
694
+ The name of the view server to use. Default uses the client instance.
695
+
696
+ Returns
697
+ -------
698
+ str
699
+ The GUID of the File Folder element.
700
+ """
701
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Function'], "isOwnAnchor": 'true',
702
+ "placeholderPropertyValues": {"ucCatalogName": uc_catalog, "ucSchemaName": uc_schema,
703
+ "ucFunctionName": uc_function, "serverNetworkAddress": network_address,
704
+ "versionIdentifier": version, "description": description, }}
705
+ body_s = body_slimmer(body)
706
+ response = await self._async_create_element_from_template(body_s, server)
707
+ return str(response)
708
+
709
+ def create_uc_function_element_from_template(self, uc_catalog: str, uc_schema: str, uc_function: str,
710
+ network_address: str, description: str = None, version: str = None,
711
+ server: str = None) -> str:
712
+ """ Create a Unity Catalog function element from a template.
713
+
714
+ Parameters
715
+ ----------
716
+ uc_catalog : str
717
+ The name of the UC catalog we are configuring.
718
+
719
+ uc_schema: str
720
+ The name of the UC schema we are configuring.
721
+
722
+ uc_function: str
723
+ The name of the UC function we are configuring.
724
+
725
+ network_address : str
726
+ The endpoint of the catalog.
727
+
728
+ description: str, opt
729
+ A description of the server.
730
+
731
+ version: str, opt
732
+ version of the element - typically of the form x.y.z
733
+
734
+ server : str, optional
735
+ The name of the view server to use. Default uses the client instance.
736
+
737
+ Returns
738
+ -------
739
+ str
740
+ The GUID of the File Folder element.
741
+ """
742
+ loop = asyncio.get_event_loop()
743
+ response = loop.run_until_complete(
744
+ self._async_create_uc_function_element_from_template(uc_catalog, uc_schema, uc_function, network_address,
745
+ description, version, server))
746
+ return response
747
+
748
+ async def _async_create_uc_volume_element_from_template(self, uc_catalog: str, uc_schema: str, uc_volume: str,
749
+ uc_vol_type: str, uc_storage_loc: str, network_address: str,
750
+ description: str = None, version: str = None,
751
+ server: str = None) -> str:
752
+ """ Create a Unity Catalog volume element from a template. Async version.
753
+
754
+ Parameters
755
+ ----------
756
+ uc_catalog : str
757
+ The name of the UC catalog we are configuring.
758
+
759
+ uc_schema: str
760
+ The name of the UC schema we are configuring.
761
+
762
+ uc_volume: str
763
+ The name of the UC volume we are configuring.
764
+
765
+ uc_vol_type: str
766
+ The volume type of the UC volume we are configuring. Currently Managed or External.
767
+ uc_storage_locL str
768
+ The location with the data associated with this element is stored.
769
+
770
+ network_address : str
771
+ The endpoint of the catalog.
772
+
773
+ description: str, opt
774
+ A description of the server.
775
+
776
+ version: str, opt
777
+ version of the element - typically of the form x.y.z
778
+
779
+ server : str, optional
780
+ The name of the view server to use. Default uses the client instance.
781
+
782
+ Returns
783
+ -------
784
+ str
785
+ The GUID of the File Folder element.
786
+ """
787
+ body = {"templateGUID": TEMPLATE_GUIDS['Unity Catalog Volume'], "isOwnAnchor": 'true',
788
+ "placeholderPropertyValues": {"ucCatalogName": uc_catalog, "ucSchemaName": uc_schema,
789
+ "ucVolumeName": uc_volume, "ucVolumeType": uc_vol_type, "ucStorageLocation": uc_storage_loc,
790
+ "serverNetworkAddress": network_address, "versionIdentifier": version,
791
+ "description": description, }}
792
+ body_s = body_slimmer(body)
793
+ response = await self._async_create_element_from_template(body_s, server)
794
+ return str(response)
795
+
796
+ def create_uc_volume_element_from_template(self, uc_catalog: str, uc_schema: str, uc_volume: str, uc_vol_type: str,
797
+ uc_storage_loc: str, network_address: str, description: str = None,
798
+ version: str = None, server: str = None) -> str:
799
+ """ Create a Unity Catalog volume element from a template. Async version.
800
+
801
+ Parameters
802
+ ----------
803
+ uc_catalog : str
804
+ The name of the UC catalog we are configuring.
805
+
806
+ uc_schema: str
807
+ The name of the UC schema we are configuring.
808
+
809
+ uc_volume: str
810
+ The name of the UC volume we are configuring.
811
+
812
+ uc_vol_type: str
813
+ The volume type of the UC volume we are configuring. Currently Managed or External.
814
+ uc_storage_locL str
815
+ The location with the data associated with this element is stored.
816
+
817
+ network_address : str
818
+ The endpoint of the catalog.
819
+
820
+ description: str, opt
821
+ A description of the server.
822
+
823
+ version: str, opt
824
+ version of the element - typically of the form x.y.z
825
+
826
+ server : str, optional
827
+ The name of the view server to use. Default uses the client instance.
828
+
829
+ Returns
830
+ -------
831
+ str
832
+ The GUID of the File Folder element.
833
+ """
834
+ loop = asyncio.get_event_loop()
835
+ response = loop.run_until_complete(
836
+ self._async_create_uc_volume_element_from_template(uc_catalog, uc_schema, uc_volume, uc_vol_type,
837
+ uc_storage_loc, network_address, description, version,
838
+ server))
366
839
  return response
367
840
 
368
841
  #
@@ -1450,11 +1923,10 @@ class AutomatedCuration(Client):
1450
1923
  server = self.server_name if server is None else server
1451
1924
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
1452
1925
  f"initiate")
1453
- start = int(start_time.timestamp() *1000) if start_time else None
1926
+ start = int(start_time.timestamp() * 1000) if start_time else None
1454
1927
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1455
1928
  "governanceActionTypeQualifiedName": action_type_qualified_name,
1456
- "requestSourceGUIDs": request_source_guids,
1457
- "actionTargets": action_targets, "startDate": start,
1929
+ "requestSourceGUIDs": request_source_guids, "actionTargets": action_targets, "startDate": start,
1458
1930
  "requestParameters": request_parameters, "originatorServiceName": orig_service_name,
1459
1931
  "originatorEngineName": orig_engine_name}
1460
1932
  new_body = body_slimmer(body)
@@ -1463,7 +1935,8 @@ class AutomatedCuration(Client):
1463
1935
 
1464
1936
  def initiate_gov_action_type(self, action_type_qualified_name: str, request_source_guids: [str],
1465
1937
  action_targets: list, start_time: datetime = None, request_parameters: dict = None,
1466
- orig_service_name: str = None, orig_engine_name: str = None, server: str = None) -> str:
1938
+ orig_service_name: str = None, orig_engine_name: str = None,
1939
+ server: str = None) -> str:
1467
1940
  """ Using the named governance action type as a template, initiate an engine action.
1468
1941
 
1469
1942
  Parameters
@@ -1502,6 +1975,10 @@ class AutomatedCuration(Client):
1502
1975
  server))
1503
1976
  return response
1504
1977
 
1978
+ #
1979
+ # Initiate surveys
1980
+ #
1981
+
1505
1982
  async def _async_initiate_postgres_database_survey(self, postgres_database_guid: str, server: str = None) -> str:
1506
1983
  """ Initiate a postgres database survey"""
1507
1984
  server = self.server_name if server is None else server
@@ -1509,10 +1986,9 @@ class AutomatedCuration(Client):
1509
1986
  f"initiate")
1510
1987
 
1511
1988
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1512
- "governanceActionTypeQualifiedName":
1513
- "AssetSurvey-postgres-database",
1514
- "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1515
- "actionTargetGUID": postgres_database_guid}]}
1989
+ "governanceActionTypeQualifiedName": "AssetSurvey-postgres-database", "actionTargets": [
1990
+ {"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1991
+ "actionTargetGUID": postgres_database_guid}]}
1516
1992
  response = await self._async_make_request("POST", url, body)
1517
1993
  return response.json().get("guid", "Action not initiated")
1518
1994
 
@@ -1529,9 +2005,9 @@ class AutomatedCuration(Client):
1529
2005
  f"initiate")
1530
2006
 
1531
2007
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1532
- "governanceActionTypeQualifiedName": "AssetSurvey:survey-postgres-server",
1533
- "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1534
- "actionTargetGUID": postgres_server_guid}]}
2008
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-postgres-server", "actionTargets": [
2009
+ {"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
2010
+ "actionTargetGUID": postgres_server_guid}]}
1535
2011
  response = await self._async_make_request("POST", url, body)
1536
2012
  return response.json().get("guid", "Action not initiated")
1537
2013
 
@@ -1542,8 +2018,7 @@ class AutomatedCuration(Client):
1542
2018
  return response
1543
2019
 
1544
2020
  async def _async_initiate_file_folder_survey(self, file_folder_guid: str,
1545
- survey_name: str =
1546
- "AssetSurvey:survey-folder",
2021
+ survey_name: str = "AssetSurvey:survey-folder",
1547
2022
  server: str = None) -> str:
1548
2023
  """ Initiate a file folder survey - async version
1549
2024
 
@@ -1587,8 +2062,7 @@ class AutomatedCuration(Client):
1587
2062
  response = await self._async_make_request("POST", url, body)
1588
2063
  return response.json().get("guid", "Action not initiated")
1589
2064
 
1590
- def initiate_file_folder_survey(self, file_folder_guid: str,
1591
- survey_name: str = "AssetSurvey:survey-folder",
2065
+ def initiate_file_folder_survey(self, file_folder_guid: str, survey_name: str = "AssetSurvey:survey-folder",
1592
2066
  server: str = None) -> str:
1593
2067
  """ Initiate a file folder survey - async version
1594
2068
 
@@ -1636,9 +2110,8 @@ class AutomatedCuration(Client):
1636
2110
  f"initiate")
1637
2111
 
1638
2112
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1639
- "governanceActionTypeQualifiedName": "AssetSurvey:survey-data-file",
1640
- "actionTargets": [
1641
- {"class": "NewActionTarget", "actionTargetName": "fileToSurvey", "actionTargetGUID": file_guid}]}
2113
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-data-file", "actionTargets": [
2114
+ {"class": "NewActionTarget", "actionTargetName": "fileToSurvey", "actionTargetGUID": file_guid}]}
1642
2115
  response = await self._async_make_request("POST", url, body)
1643
2116
  return response.json().get("guid", "Action not initiated")
1644
2117
 
@@ -1669,9 +2142,9 @@ class AutomatedCuration(Client):
1669
2142
  f"initiate")
1670
2143
 
1671
2144
  body = {"class": "InitiateGovernanceActionTypeRequestBody",
1672
- "governanceActionTypeQualifiedName": "AssetSurvey:survey-kafka-server",
1673
- "actionTargets": [{"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
1674
- "actionTargetGUID": kafka_server_guid}]}
2145
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-kafka-server", "actionTargets": [
2146
+ {"class": "NewActionTarget", "actionTargetName": "serverToSurvey",
2147
+ "actionTargetGUID": kafka_server_guid}]}
1675
2148
  response = await self._async_make_request("POST", url, body)
1676
2149
  return response.json().get("guid", "Action not initiated")
1677
2150
 
@@ -1692,15 +2165,252 @@ class AutomatedCuration(Client):
1692
2165
 
1693
2166
  """
1694
2167
  loop = asyncio.get_event_loop()
1695
- response = loop.run_until_complete(self._async_initiate_file_folder_survey(kafka_server_guid, server))
2168
+ response = loop.run_until_complete(self._async_initiate_kafka_server_survey(kafka_server_guid, server))
1696
2169
  return response
1697
2170
 
2171
+ async def _async_initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2172
+ """ Initiate survey of a Unity Catalog server. Async Version.
2173
+ Parameters
2174
+ ----------
2175
+ uc_server_guid : str
2176
+ The GUID of the Kafka server to be surveyed.
2177
+
2178
+ server : str, optional
2179
+ The name of the server. If not provided, the default server name is used.
2180
+
2181
+ Returns
2182
+ -------
2183
+ str
2184
+ The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2185
+
2186
+ """
2187
+ server = self.server_name if server is None else server
2188
+ url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2189
+ f"initiate")
2190
+
2191
+ body = {"class": "InitiateGovernanceActionTypeRequestBody",
2192
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2193
+ {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2194
+ response = await self._async_make_request("POST", url, body)
2195
+ return response.json().get("guid", "Action not initiated")
2196
+
2197
+ def initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2198
+ """ Initiate survey of a Unity Catalog server. Async Version.
2199
+ Parameters
2200
+ ----------
2201
+ uc_server_guid : str
2202
+ The GUID of the Kafka server to be surveyed.
2203
+
2204
+ server : str, optional
2205
+ The name of the server. If not provided, the default server name is used.
2206
+
2207
+ Returns
2208
+ -------
2209
+ str
2210
+ The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2211
+
2212
+ """
2213
+ loop = asyncio.get_event_loop()
2214
+ response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid, server))
2215
+ return response
2216
+
2217
+ async def _async_initiate_uc_schema_survey(self, uc_schema_guid: str, server: str = None) -> str:
2218
+ """ Initiate survey of a Unity Catalog schema. Async Version.
2219
+ Parameters
2220
+ ----------
2221
+ uc_schema_guid : str
2222
+ The GUID of the Kafka server to be surveyed.
2223
+
2224
+ server : str, optional
2225
+ The name of the server. If not provided, the default server name is used.
2226
+
2227
+ Returns
2228
+ -------
2229
+ str
2230
+ The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2231
+
2232
+ """
2233
+ server = self.server_name if server is None else server
2234
+ url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2235
+ f"initiate")
2236
+
2237
+ body = {"class": "InitiateGovernanceActionTypeRequestBody",
2238
+ "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-schema", "actionTargets": [
2239
+ {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_schema_guid}]}
2240
+ response = await self._async_make_request("POST", url, body)
2241
+ return response.json().get("guid", "Action not initiated")
2242
+
2243
+ def initiate_uc_schema_survey(self, uc_schema_guid: str, server: str = None) -> str:
2244
+ """ Initiate survey of a Unity Catalog schema. Async Version.
2245
+ Parameters
2246
+ ----------
2247
+ uc_schema_guid : str
2248
+ The GUID of the Kafka server to be surveyed.
2249
+
2250
+ server : str, optional
2251
+ The name of the server. If not provided, the default server name is used.
2252
+
2253
+ Returns
2254
+ -------
2255
+ str
2256
+ The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2257
+
2258
+ """
2259
+ loop = asyncio.get_event_loop()
2260
+ response = loop.run_until_complete(self._async_initiate_uc_schema_survey(uc_schema_guid, server))
2261
+ return response
2262
+
2263
+ # async def _async_initiate_uc_function_survey(self, uc_server_guid: str, server: str = None) -> str:
2264
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2265
+ # Parameters
2266
+ # ----------
2267
+ # Unity Catalog_server_guid : str
2268
+ # The GUID of the Kafka server to be surveyed.
2269
+ #
2270
+ # server : str, optional
2271
+ # The name of the server. If not provided, the default server name is used.
2272
+ #
2273
+ # Returns
2274
+ # -------
2275
+ # str
2276
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2277
+ #
2278
+ # """
2279
+ # server = self.server_name if server is None else server
2280
+ # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2281
+ # f"initiate")
2282
+ #
2283
+ # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2284
+ # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2285
+ # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2286
+ # response = await self._async_make_request("POST", url, body)
2287
+ # return response.json().get("guid", "Action not initiated")
2288
+ #
2289
+ # def initiate_uc_function_survey(self, uc_server_guid: str, server: str = None) -> str:
2290
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2291
+ # Parameters
2292
+ # ----------
2293
+ # Unity Catalog_server_guid : str
2294
+ # The GUID of the Kafka server to be surveyed.
2295
+ #
2296
+ # server : str, optional
2297
+ # The name of the server. If not provided, the default server name is used.
2298
+ #
2299
+ # Returns
2300
+ # -------
2301
+ # str
2302
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2303
+ #
2304
+ # """
2305
+ # loop = asyncio.get_event_loop()
2306
+ # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid, server))
2307
+ # return response
2308
+ #
2309
+ # async def _async_initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2310
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2311
+ # Parameters
2312
+ # ----------
2313
+ # Unity Catalog_server_guid : str
2314
+ # The GUID of the Kafka server to be surveyed.
2315
+ #
2316
+ # server : str, optional
2317
+ # The name of the server. If not provided, the default server name is used.
2318
+ #
2319
+ # Returns
2320
+ # -------
2321
+ # str
2322
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2323
+ #
2324
+ # """
2325
+ # server = self.server_name if server is None else server
2326
+ # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2327
+ # f"initiate")
2328
+ #
2329
+ # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2330
+ # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2331
+ # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2332
+ # response = await self._async_make_request("POST", url, body)
2333
+ # return response.json().get("guid", "Action not initiated")
2334
+ #
2335
+ # def initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2336
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2337
+ # Parameters
2338
+ # ----------
2339
+ # Unity Catalog_server_guid : str
2340
+ # The GUID of the Kafka server to be surveyed.
2341
+ #
2342
+ # server : str, optional
2343
+ # The name of the server. If not provided, the default server name is used.
2344
+ #
2345
+ # Returns
2346
+ # -------
2347
+ # str
2348
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2349
+ #
2350
+ # """
2351
+ # loop = asyncio.get_event_loop()
2352
+ # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid, server))
2353
+ # return response
2354
+ #
2355
+ # async def _async_initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2356
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2357
+ # Parameters
2358
+ # ----------
2359
+ # Unity Catalog_server_guid : str
2360
+ # The GUID of the Kafka server to be surveyed.
2361
+ #
2362
+ # server : str, optional
2363
+ # The name of the server. If not provided, the default server name is used.
2364
+ #
2365
+ # Returns
2366
+ # -------
2367
+ # str
2368
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2369
+ #
2370
+ # """
2371
+ # server = self.server_name if server is None else server
2372
+ # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2373
+ # f"initiate")
2374
+ #
2375
+ # body = {"class": "InitiateGovernanceActionTypeRequestBody",
2376
+ # "governanceActionTypeQualifiedName": "AssetSurvey:survey-unity-catalog-server", "actionTargets": [
2377
+ # {"class": "NewActionTarget", "actionTargetName": "serverToSurvey", "actionTargetGUID": uc_server_guid}]}
2378
+ # response = await self._async_make_request("POST", url, body)
2379
+ # return response.json().get("guid", "Action not initiated")
2380
+ #
2381
+ # def initiate_uc_server_survey(self, uc_server_guid: str, server: str = None) -> str:
2382
+ # """ Initiate survey of a Unity Catalog server. Async Version.
2383
+ # Parameters
2384
+ # ----------
2385
+ # Unity Catalog_server_guid : str
2386
+ # The GUID of the Kafka server to be surveyed.
2387
+ #
2388
+ # server : str, optional
2389
+ # The name of the server. If not provided, the default server name is used.
2390
+ #
2391
+ # Returns
2392
+ # -------
2393
+ # str
2394
+ # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2395
+ #
2396
+ # """
2397
+ # loop = asyncio.get_event_loop()
2398
+ # response = loop.run_until_complete(self._async_initiate_uc_server_survey(uc_server_guid, server))
2399
+ # return response
2400
+
2401
+
2402
+
2403
+
2404
+ #
2405
+ # Initiate general engine action
2406
+ #
2407
+
1698
2408
  async def _async_initiate_engine_action(self, qualified_name: str, domain_identifier: int, display_name: str,
1699
2409
  description: str, request_source_guids: str, action_targets: str,
1700
- received_guards: [str], start_time: datetime,
1701
- request_type: str, request_parameters: dict, process_name: str,
1702
- request_src_name: str = None, originator_svc_name: str = None,
1703
- originator_eng_name: str = None, server: str = None) -> str:
2410
+ received_guards: [str], start_time: datetime, request_type: str,
2411
+ request_parameters: dict, process_name: str, request_src_name: str = None,
2412
+ originator_svc_name: str = None, originator_eng_name: str = None,
2413
+ server: str = None) -> str:
1704
2414
  """ Create an engine action in the metadata store that will trigger the governance service associated with
1705
2415
  the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
1706
2416
  Async version.
@@ -1743,21 +2453,20 @@ class AutomatedCuration(Client):
1743
2453
  f"engine-actions/initiate")
1744
2454
  body = {"class": "GovernanceActionRequestBody",
1745
2455
  "qualifiedName": qualified_name + str(int(start_time.timestamp())),
1746
- "domainIdentifier": domain_identifier,
1747
- "displayName": display_name, "description": description, "requestSourceGUIDs": request_source_guids,
1748
- "actionTargets": action_targets, "receivedGuards": received_guards,
1749
- "startTime": int(start_time.timestamp() * 1000), "requestType": request_type,
1750
- "requestParameters": request_parameters, "processName": process_name,
1751
- "requestSourceName": request_src_name,
1752
- "originatorServiceName": originator_svc_name, "originatorEngineName": originator_eng_name}
2456
+ "domainIdentifier": domain_identifier, "displayName": display_name, "description": description,
2457
+ "requestSourceGUIDs": request_source_guids, "actionTargets": action_targets,
2458
+ "receivedGuards": received_guards, "startTime": int(start_time.timestamp() * 1000),
2459
+ "requestType": request_type, "requestParameters": request_parameters, "processName": process_name,
2460
+ "requestSourceName": request_src_name, "originatorServiceName": originator_svc_name,
2461
+ "originatorEngineName": originator_eng_name}
1753
2462
  new_body = body_slimmer(body)
1754
2463
  response = await self._async_make_request("POST", url, new_body)
1755
2464
  return response.json().get("guid", "Action not initiated")
1756
2465
 
1757
2466
  def initiate_engine_action(self, qualified_name: str, domain_identifier: int, display_name: str, description: str,
1758
2467
  request_source_guids: str, action_targets: str, received_guards: [str],
1759
- start_time: datetime, request_type: str, request_parameters: dict,
1760
- process_name: str, request_src_name: str = None, originator_svc_name: str = None,
2468
+ start_time: datetime, request_type: str, request_parameters: dict, process_name: str,
2469
+ request_src_name: str = None, originator_svc_name: str = None,
1761
2470
  originator_eng_name: str = None, server: str = None) -> str:
1762
2471
  """ Create an engine action in the metadata store that will trigger the governance service associated with
1763
2472
  the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
@@ -1798,8 +2507,8 @@ class AutomatedCuration(Client):
1798
2507
  response = loop.run_until_complete(
1799
2508
  self._async_initiate_engine_action(qualified_name, domain_identifier, display_name, description,
1800
2509
  request_source_guids, action_targets, received_guards, start_time,
1801
- request_type, request_parameters, process_name,
1802
- request_src_name, originator_svc_name, originator_eng_name, server))
2510
+ request_type, request_parameters, process_name, request_src_name,
2511
+ originator_svc_name, originator_eng_name, server))
1803
2512
  return response
1804
2513
 
1805
2514
  async def _async_get_catalog_targets(self, integ_connector_guid: str, server: str = None, start_from: int = 0,
@@ -1890,8 +2599,7 @@ class AutomatedCuration(Client):
1890
2599
  response = await self._async_make_request("GET", url)
1891
2600
  return response.json().get("element", "no actions")
1892
2601
 
1893
- def get_catalog_target(self, relationship_guid: str,
1894
- server: str = None) -> dict | str:
2602
+ def get_catalog_target(self, relationship_guid: str, server: str = None) -> dict | str:
1895
2603
  """ Retrieve a specific catalog target associated with an integration connector. Further Information:
1896
2604
  https://egeria-project.org/concepts/integration-connector/ .
1897
2605
 
@@ -1914,16 +2622,14 @@ class AutomatedCuration(Client):
1914
2622
  """
1915
2623
 
1916
2624
  loop = asyncio.get_event_loop()
1917
- response = loop.run_until_complete(
1918
- self._async_get_catalog_target(relationship_guid, server))
2625
+ response = loop.run_until_complete(self._async_get_catalog_target(relationship_guid, server))
1919
2626
  return response
1920
2627
 
1921
2628
  async def _async_add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1922
- catalog_target_name: str, connection_name: str= None,
1923
- metadata_src_qual_name: str = None,
1924
- config_properties: dict = None, template_properties: dict = None,
1925
- permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
1926
- server: str = None) -> str:
2629
+ catalog_target_name: str, connection_name: str = None,
2630
+ metadata_src_qual_name: str = None, config_properties: dict = None,
2631
+ template_properties: dict = None, permitted_sync: str = "BOTH_DIRECTIONS",
2632
+ delete_method: str = "ARCHIVE", server: str = None) -> str:
1927
2633
  """ Add a catalog target to an integration connector and .
1928
2634
  Async version.
1929
2635
 
@@ -1970,18 +2676,16 @@ class AutomatedCuration(Client):
1970
2676
  body = {"catalogTargetName": catalog_target_name, "metadataSourceQualifiedName": metadata_src_qual_name,
1971
2677
  "configProperties": config_properties, "templateProperties": template_properties,
1972
2678
  "connectionName": connection_name, "permittedSynchronization": permitted_sync,
1973
- "deleteMethod": delete_method
1974
- }
2679
+ "deleteMethod": delete_method}
1975
2680
 
1976
2681
  response = await self._async_make_request("POST", url, body)
1977
2682
  return response.json().get('guid', "No Guid returned")
1978
2683
 
1979
- def add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str,
1980
- catalog_target_name: str, connection_name: str= None,
1981
- metadata_src_qual_name: str = None,
1982
- config_properties: dict = None, template_properties: dict = None,
1983
- permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
1984
- server: str = None) -> str:
2684
+ def add_catalog_target(self, integ_connector_guid: str, metadata_element_guid: str, catalog_target_name: str,
2685
+ connection_name: str = None, metadata_src_qual_name: str = None,
2686
+ config_properties: dict = None, template_properties: dict = None,
2687
+ permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
2688
+ server: str = None) -> str:
1985
2689
  """ Add a catalog target to an integration connector and .
1986
2690
 
1987
2691
  Parameters:
@@ -2022,17 +2726,14 @@ class AutomatedCuration(Client):
2022
2726
  response = loop.run_until_complete(
2023
2727
  self._async_add_catalog_target(integ_connector_guid, metadata_element_guid, catalog_target_name,
2024
2728
  connection_name, metadata_src_qual_name, config_properties,
2025
- template_properties, permitted_sync, delete_method,
2026
- server))
2729
+ template_properties, permitted_sync, delete_method, server))
2027
2730
  return response
2028
2731
 
2029
- async def _async_update_catalog_target(self, relationship_guid: str,
2030
- catalog_target_name: str, connection_name: str = None,
2031
- metadata_src_qual_name: str = None,
2732
+ async def _async_update_catalog_target(self, relationship_guid: str, catalog_target_name: str,
2733
+ connection_name: str = None, metadata_src_qual_name: str = None,
2032
2734
  config_properties: dict = None, template_properties: dict = None,
2033
2735
  permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
2034
- server: str = None
2035
- ) -> None:
2736
+ server: str = None) -> None:
2036
2737
  """ Update a catalog target to an integration connector.
2037
2738
  Async version.
2038
2739
 
@@ -2076,18 +2777,14 @@ class AutomatedCuration(Client):
2076
2777
  body = {"catalogTargetName": catalog_target_name, "metadataSourceQualifiedName": metadata_src_qual_name,
2077
2778
  "configProperties": config_properties, "templateProperties": template_properties,
2078
2779
  "connectionName": connection_name, "permittedSynchronization": permitted_sync,
2079
- "deleteMethod": delete_method
2080
- }
2780
+ "deleteMethod": delete_method}
2081
2781
  await self._async_make_request("POST", url, body)
2082
2782
  return
2083
2783
 
2084
- def update_catalog_target(self, relationship_guid: str,
2085
- catalog_target_name: str, connection_name: str = None,
2086
- metadata_src_qual_name: str = None,
2087
- config_properties: dict = None, template_properties: dict = None,
2088
- permitted_sync: str = "BOTH_DIRECTIONS", delete_method: str = "ARCHIVE",
2089
- server: str = None
2090
- ) -> None:
2784
+ def update_catalog_target(self, relationship_guid: str, catalog_target_name: str, connection_name: str = None,
2785
+ metadata_src_qual_name: str = None, config_properties: dict = None,
2786
+ template_properties: dict = None, permitted_sync: str = "BOTH_DIRECTIONS",
2787
+ delete_method: str = "ARCHIVE", server: str = None) -> None:
2091
2788
  """ Update a catalog target to an integration connector.
2092
2789
 
2093
2790
  Parameters:
@@ -2113,10 +2810,9 @@ class AutomatedCuration(Client):
2113
2810
 
2114
2811
  loop = asyncio.get_event_loop()
2115
2812
  loop.run_until_complete(
2116
- self._async_update_catalog_target(relationship_guid, catalog_target_name,
2117
- connection_name,metadata_src_qual_name,
2118
- config_properties, template_properties,permitted_sync,
2119
- delete_method,server))
2813
+ self._async_update_catalog_target(relationship_guid, catalog_target_name, connection_name,
2814
+ metadata_src_qual_name, config_properties, template_properties,
2815
+ permitted_sync, delete_method, server))
2120
2816
  return
2121
2817
 
2122
2818
  async def _async_remove_catalog_target(self, relationship_guid: str, server: str = None) -> None:
@@ -2521,11 +3217,8 @@ class AutomatedCuration(Client):
2521
3217
  validate_name(filter)
2522
3218
 
2523
3219
  url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/technology-types/elements?"
2524
- f"startFrom={start_from}&pageSize={page_size}&getTemplates={get_templates_s}"
2525
- )
2526
- body = {"filter": filter,
2527
- "effective_time": effective_time
2528
- }
3220
+ f"startFrom={start_from}&pageSize={page_size}&getTemplates={get_templates_s}")
3221
+ body = {"filter": filter, "effective_time": effective_time}
2529
3222
 
2530
3223
  response = await self._async_make_request("POST", url, body)
2531
3224
  return response.json().get("elements", "no tech found")
@@ -2571,7 +3264,6 @@ class AutomatedCuration(Client):
2571
3264
 
2572
3265
  loop = asyncio.get_event_loop()
2573
3266
  response = loop.run_until_complete(
2574
- self._async_get_technology_type_elements(filter, effective_time, server,
2575
- start_from, page_size, get_templates
2576
- ))
3267
+ self._async_get_technology_type_elements(filter, effective_time, server, start_from, page_size,
3268
+ get_templates))
2577
3269
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.7.9
3
+ Version: 0.7.10
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -14,7 +14,7 @@ examples/widgets/cat/list_projects.py,sha256=jP6HoVqGi-w4R1itgdAW1zamPLsgkvjvh8r
14
14
  examples/widgets/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3SMm1RcgFoh0,4609
15
15
  examples/widgets/cat/list_todos.py,sha256=wD9HevGcc4G_bxV25VUz1rRssdZHE33mF5zmJ6Lprt8,5522
16
16
  examples/widgets/cli/__init__.py,sha256=6d_R0KZBNnJy9EBz9J2xvGFlx-3j_ZPqPCxKgdvYeDQ,291
17
- examples/widgets/cli/egeria.py,sha256=WTGHf1tJHq3IPiGada2QH1mMWggNrEIlXPFxjDR6Lew,23450
17
+ examples/widgets/cli/egeria.py,sha256=9C4oCl5SSrl-CE2dnZJC0KTaeslZi_hSGaha4CO_new,23450
18
18
  examples/widgets/cli/egeria_cat.py,sha256=f9KxOPAEFbeEtSAdk_czcBDLqCKsHkrpdiBuDDo-iUw,10301
19
19
  examples/widgets/cli/egeria_my.py,sha256=xi2j1hzNnjDruJeR1qa8K9JPDgzaL_COsMkcieT4Vo8,5653
20
20
  examples/widgets/cli/egeria_ops.py,sha256=Y2fNDFnaaMjt8vjOeUXneh4_WEyxp0ucMvIfdLn8Bik,10139
@@ -46,7 +46,7 @@ examples/widgets/ops/restart_integration_daemon.py,sha256=fID7qGFL5RD6rfn9PgXf5k
46
46
  examples/widgets/tech/README.md,sha256=nxDnfr3BCiGgW5G1VxWxiwUWJXIe5wreNuUeRyIt_hY,1343
47
47
  examples/widgets/tech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  examples/widgets/tech/get_guid_info.py,sha256=p-peTX1Mahi8fNmcNVHOVI3OjqjlJwZjv7gRdBI4l0Q,4137
49
- examples/widgets/tech/get_tech_details.py,sha256=b7i3kSTaZ2pZPcxkDccqY27bqeHJoYnPCxOvlKPH0hw,5753
49
+ examples/widgets/tech/get_tech_details.py,sha256=T1fkU-_FAoKNoJFYJUYcAiqerxPFkYsrHev8NtuU8Kk,5994
50
50
  examples/widgets/tech/list_asset_types.py,sha256=PHPtCXqCHhIw0K59hUvoKdybp6IKPt_9Wc0AJVDtdrg,4181
51
51
  examples/widgets/tech/list_elements.py,sha256=xQg-PGS2oORed2ATVNPZvGVCGLEUHO5rOeXvgS6pkrg,4726
52
52
  examples/widgets/tech/list_registered_services.py,sha256=TqZbT54vMGvHUAX_bovCce3A3eV_RbjSEtPP6u6ZJV0,6388
@@ -62,7 +62,7 @@ pyegeria/_globals.py,sha256=1Uc8392wjbiVN5L__RzxC1-U97RMXj77_iUsMSgeAjQ,638
62
62
  pyegeria/_validators.py,sha256=DQuMsATRGxGSBtOrVtXlCgWXGhj6Nh-uqPtCsrUGLxk,12703
63
63
  pyegeria/action_author_omvs.py,sha256=m0wsfmyO-VxRDaPpACeIDw8eVAFu3RVbo45RPCUel9M,6340
64
64
  pyegeria/asset_catalog_omvs.py,sha256=Rlr0RxdJlU6MaapPMGxjqlIqdo46TzNShwx66lTJZvo,25631
65
- pyegeria/automated_curation_omvs.py,sha256=7mBOXnq06zf1TB3vzo2FPUw2GRLZKKYT2MDQkPxDokk,121332
65
+ pyegeria/automated_curation_omvs.py,sha256=mR8vm4ny4dTjANqsMdAH7NYtZqzH4HkapyBk8FFf7_4,150228
66
66
  pyegeria/classification_manager_omvs.py,sha256=PzdFm5Sp69QsWeiZ4DAtOfe2BvUXLdSNcj700WEMFgk,184475
67
67
  pyegeria/collection_manager_omvs.py,sha256=aGtzC3P8_YgY2KEzhtO19_H9drStE0hW5hUj-dA7bLo,112649
68
68
  pyegeria/core_omag_server_config.py,sha256=16ld7aBTgO3gGhvFs-_yzwqPsatdCAiKYi005_2evZU,93096
@@ -79,8 +79,8 @@ pyegeria/runtime_manager_omvs.py,sha256=oSVFeG_yBGXIvQR0EClLZqTZ6C5z5ReZzwm8cce8
79
79
  pyegeria/server_operations.py,sha256=1z2wZLdrNZG6HlswY_Eh8qI1mlcjsQ59zO-AMy9XbUU,16605
80
80
  pyegeria/utils.py,sha256=pkVmS3RrbjaS9yz7FtOCwaOfV5FMqz-__Rt5koCnd9c,5374
81
81
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
82
- pyegeria-0.7.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
83
- pyegeria-0.7.9.dist-info/METADATA,sha256=6y1EkUkw5PUG_EARfoPX1FW30rAG1ykLdptDHjsvIqo,2774
84
- pyegeria-0.7.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
85
- pyegeria-0.7.9.dist-info/entry_points.txt,sha256=UJ9j8ILCKryCUhbEIktWwLvJf0Isbuvpxv4TExaHJiA,2859
86
- pyegeria-0.7.9.dist-info/RECORD,,
82
+ pyegeria-0.7.10.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
83
+ pyegeria-0.7.10.dist-info/METADATA,sha256=vg2fG-259x3cGuaHLWUwv4xLpUQdDI8wlhdZq4cmUUE,2775
84
+ pyegeria-0.7.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
85
+ pyegeria-0.7.10.dist-info/entry_points.txt,sha256=UJ9j8ILCKryCUhbEIktWwLvJf0Isbuvpxv4TExaHJiA,2859
86
+ pyegeria-0.7.10.dist-info/RECORD,,