pyegeria 5.4.4.2__py3-none-any.whl → 5.4.4.3__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.
@@ -17,8 +17,8 @@ from pyegeria._output_formats import select_output_format_set, get_output_format
17
17
  from pyegeria.config import settings
18
18
  from pyegeria.models import (SearchStringRequestBody, FilterRequestBody, GetRequestBody, NewElementRequestBody,
19
19
  TemplateRequestBody,
20
- UpdateElementRequestBody, UpdateStatusRequestBody, NewRelationshipRequestBody,
21
- DeleteRequestBody, UpdateRelationshipRequestBody, get_defined_field_values)
20
+ UpdateElementRequestBody, NewRelationshipRequestBody,
21
+ DeleteRequestBody)
22
22
  from pyegeria.output_formatter import (generate_output,
23
23
  _extract_referenceable_properties, populate_columns_from_properties,
24
24
  get_required_relationships)
@@ -26,11 +26,12 @@ from pyegeria.utils import dynamic_catch
26
26
 
27
27
  app_settings = settings
28
28
  EGERIA_LOCAL_QUALIFIER = app_settings.User_Profile.egeria_local_qualifier
29
- EXTERNAL_REFERENCE_PROPS = ["ExternalReferenceProperties","ExternalDataSourceProperties","ExternalModelSourceProperties",
30
- "RelatedMediaProperties","CitedDocumentProperties"]
29
+ EXTERNAL_REFERENCE_PROPS = ["ExternalReferenceProperties", "ExternalDataSourceProperties",
30
+ "ExternalModelSourceProperties",
31
+ "RelatedMediaProperties", "CitedDocumentProperties"]
31
32
 
32
- EXTERNAL_REFERENCE_TYPES = ["ExternalReference","ExternalDataSource","ExternalModelSource",
33
- "RelatedMedia","CitedDocument"]
33
+ EXTERNAL_REFERENCE_TYPES = ["ExternalReference", "ExternalDataSource", "ExternalModelSource",
34
+ "RelatedMedia", "CitedDocument"]
34
35
  from pyegeria._client_new import Client2
35
36
 
36
37
 
@@ -158,7 +159,7 @@ class ExternalReferences(Client2):
158
159
  """
159
160
 
160
161
  url = f"{self.command_root}/external-references"
161
- return await self._async_create_element_body_request(url,EXTERNAL_REFERENCE_PROPS,body)
162
+ return await self._async_create_element_body_request(url, EXTERNAL_REFERENCE_PROPS, body)
162
163
 
163
164
  @dynamic_catch
164
165
  def create_external_reference(self, body: dict | NewElementRequestBody = None) -> str:
@@ -283,8 +284,7 @@ class ExternalReferences(Client2):
283
284
 
284
285
  return asyncio.get_event_loop().run_until_complete(self._async_create_external_reference(body))
285
286
 
286
-
287
- #######
287
+ #######
288
288
 
289
289
  @dynamic_catch
290
290
  async def _async_create_external_reference_from_template(self, body: TemplateRequestBody | dict) -> str:
@@ -341,20 +341,20 @@ class ExternalReferences(Client2):
341
341
  }
342
342
 
343
343
  """
344
-
344
+
345
345
  if isinstance(body, TemplateRequestBody):
346
346
  validated_body = body
347
-
347
+
348
348
  elif isinstance(body, dict):
349
349
  validated_body = self._template_request_adapter.validate_python(body)
350
-
351
- url = f"{self.command_root}/from-template"
350
+
351
+ url = f"{self.command_root}/external-references/from-template"
352
352
  json_body = validated_body.model_dump_json(indent=2, exclude_none=True)
353
353
  logger.info(json_body)
354
354
  resp = await self._async_make_request("POST", url, json_body, is_json=True)
355
355
  logger.info(f"Create external_reference from template with GUID: {resp.json().get('guid')}")
356
356
  return resp.json().get("guid", NO_GUID_RETURNED)
357
-
357
+
358
358
  @dynamic_catch
359
359
  def create_external_reference_from_template(self, body: dict) -> str:
360
360
  """Create a new metadata element to represent a external_reference using an existing metadata element as a template.
@@ -410,12 +410,11 @@ class ExternalReferences(Client2):
410
410
  loop = asyncio.get_event_loop()
411
411
  resp = loop.run_until_complete(self._async_create_external_reference_from_template(body))
412
412
  return resp
413
-
413
+
414
414
  #
415
415
  # Manage external_references
416
416
  #
417
-
418
-
417
+
419
418
  @dynamic_catch
420
419
  async def _async_update_external_reference(self, external_reference_guid: str,
421
420
  body: dict | UpdateElementRequestBody) -> None:
@@ -470,13 +469,12 @@ class ExternalReferences(Client2):
470
469
  "forDuplicateProcessing" : false
471
470
  }
472
471
  """
473
-
472
+
474
473
  # try:
475
-
476
- url = (f"{self.command_root}/{external_reference_guid}/update")
474
+
475
+ url = (f"{self.command_root}/external-references/{external_reference_guid}/update")
477
476
  await self._async_update_element_body_request(url, EXTERNAL_REFERENCE_PROPS, body)
478
-
479
-
477
+
480
478
  @dynamic_catch
481
479
  def update_external_reference(self, external_reference_guid: str, body: dict | NewElementRequestBody) -> None:
482
480
  """ Update the properties of a external_reference. Use the correct properties object (CollectionProperties,
@@ -529,13 +527,13 @@ class ExternalReferences(Client2):
529
527
  "forDuplicateProcessing" : false
530
528
  }
531
529
  """
532
-
530
+
533
531
  return asyncio.get_event_loop().run_until_complete(
534
532
  self._async_update_external_reference(external_reference_guid, body))
535
-
533
+
536
534
  @dynamic_catch
537
535
  async def _async_link_external_reference(self, element_guid: str, ext_ref_guid: str,
538
- body: dict | NewRelationshipRequestBody = None) -> None:
536
+ body: dict | NewRelationshipRequestBody = None) -> None:
539
537
  """ Attach an element to an external reference.
540
538
  Async version.
541
539
 
@@ -583,11 +581,10 @@ class ExternalReferences(Client2):
583
581
  url = url = (f"{self.command_root}/elements/{element_guid}/external_references/{ext_ref_guid}/attach")
584
582
  await self._async_new_relationship_request(url, "ExternalReferenceLinkProperties", body)
585
583
  logger.info(f"Linking element {element_guid} to ext. ref. {ext_ref_guid}")
586
-
587
-
584
+
588
585
  @dynamic_catch
589
586
  def link_external_reference(self, element_guid: str, ext_ref_guid: str,
590
- body: dict | NewRelationshipRequestBody = None):
587
+ body: dict | NewRelationshipRequestBody = None):
591
588
  """ Attach an element to an external reference.
592
589
 
593
590
  Parameters
@@ -633,11 +630,10 @@ class ExternalReferences(Client2):
633
630
  """
634
631
  loop = asyncio.get_event_loop()
635
632
  loop.run_until_complete(self._async_link_external_reference(element_guid, ext_ref_guid, body))
636
-
637
-
633
+
638
634
  @dynamic_catch
639
635
  async def _async_detach_external_reference(self, element_guid: str, ext_ref_guid: str,
640
- body: dict | DeleteRequestBody = None) -> None:
636
+ body: dict | DeleteRequestBody = None) -> None:
641
637
  """ Detach an element from an external reference; body is optional. Async version.
642
638
 
643
639
  Parameters
@@ -675,11 +671,10 @@ class ExternalReferences(Client2):
675
671
  }
676
672
  """
677
673
  url = (f"{self.command_root}/elements/{element_guid}/external_references/{ext_ref_guid}/detach")
678
-
674
+
679
675
  await self._async_delete_request(url, body)
680
676
  logger.info(f"Detached element {element_guid} from external reference {ext_ref_guid}")
681
-
682
-
677
+
683
678
  def detach_external_reference(self, element_guid: str, ext_ref_guid: str, body: dict | DeleteRequestBody = None):
684
679
  """ Detach an element from an external reference. Request body is optional.
685
680
 
@@ -719,11 +714,10 @@ class ExternalReferences(Client2):
719
714
  """
720
715
  loop = asyncio.get_event_loop()
721
716
  loop.run_until_complete(self._async_detach_external_reference(element_guid, ext_ref_guid, body))
722
-
723
-
717
+
724
718
  @dynamic_catch
725
719
  async def _async_link_media_reference(self, element_guid: str, media_ref_guid: str,
726
- body: dict | NewRelationshipRequestBody = None) -> None:
720
+ body: dict | NewRelationshipRequestBody = None) -> None:
727
721
  """ Attach an element to a related media reference.
728
722
  Async version.
729
723
 
@@ -789,16 +783,13 @@ class ExternalReferences(Client2):
789
783
  }
790
784
  }
791
785
  """
792
- url =f"{self.command_root}/elements/{element_guid}/media-references/{media_ref_guid}/attach"
786
+ url = f"{self.command_root}/elements/{element_guid}/media-references/{media_ref_guid}/attach"
793
787
  await self._async_new_relationship_request(url, "MediaReferenceProperties", body)
794
788
  logger.info(f"Linking element {element_guid} to media reference {media_ref_guid}")
795
-
796
-
797
-
798
-
789
+
799
790
  @dynamic_catch
800
791
  def link_media_reference(self, element_guid: str, media_ref_guid: str,
801
- body: dict | NewRelationshipRequestBody = None):
792
+ body: dict | NewRelationshipRequestBody = None):
802
793
  """ Attach an element to an external media reference.
803
794
 
804
795
  Parameters
@@ -865,10 +856,10 @@ class ExternalReferences(Client2):
865
856
  """
866
857
  loop = asyncio.get_event_loop()
867
858
  loop.run_until_complete(self._async_link_media_reference(element_guid, media_ref_guid, body))
868
-
859
+
869
860
  @dynamic_catch
870
861
  async def _async_detach_media_reference(self, element_guid: str, media_ref_guid: str,
871
- body: dict | DeleteRequestBody = None) -> None:
862
+ body: dict | DeleteRequestBody = None) -> None:
872
863
  """ Detach an element from an external media reference; body is optional. Async version.
873
864
 
874
865
  Parameters
@@ -907,9 +898,10 @@ class ExternalReferences(Client2):
907
898
  """
908
899
  url = (
909
900
  f"{self.command_root}/elements/{element_guid}/media-references/{media_ref_guid}/detach")
910
-
901
+
911
902
  await self._async_delete_request(url, body)
912
903
  logger.info(f"Detached element {element_guid} from external media reference {media_ref_guid}")
904
+
913
905
  @dynamic_catch
914
906
  def detach_media_reference(self, element_guid: str, media_ref_guid: str, body: dict | DeleteRequestBody = None):
915
907
  """ Detach an element from an external media reference. Request body is optional.
@@ -950,10 +942,10 @@ class ExternalReferences(Client2):
950
942
  """
951
943
  loop = asyncio.get_event_loop()
952
944
  loop.run_until_complete(self._async_detach_media_reference(element_guid, media_ref_guid, body))
953
-
945
+
954
946
  @dynamic_catch
955
947
  async def _async_link_cited_document(self, element_guid: str, cited_doc_guid: str,
956
- body: dict | NewRelationshipRequestBody = None) -> None:
948
+ body: dict | NewRelationshipRequestBody = None) -> None:
957
949
  """ Attach an element to a cited document reference.
958
950
  Async version.
959
951
 
@@ -1000,10 +992,10 @@ class ExternalReferences(Client2):
1000
992
  url = f"{self.command_root}/elements/{element_guid}/cited-document-references/{cited_doc_guid}/attach"
1001
993
  await self._async_new_relationship_request(url, "CitedDocumentLinkProperties", body)
1002
994
  logger.info(f"Linking element {element_guid} to cited document {cited_doc_guid}")
1003
-
995
+
1004
996
  @dynamic_catch
1005
997
  def link_cited_document(self, element_guid: str, cited_doc_guid: str,
1006
- body: dict | NewRelationshipRequestBody = None):
998
+ body: dict | NewRelationshipRequestBody = None):
1007
999
  """ Attach an element to an external media reference.
1008
1000
 
1009
1001
  Parameters
@@ -1048,10 +1040,10 @@ class ExternalReferences(Client2):
1048
1040
  """
1049
1041
  loop = asyncio.get_event_loop()
1050
1042
  loop.run_until_complete(self._async_link_cited_document(element_guid, cited_doc_guid, body))
1051
-
1043
+
1052
1044
  @dynamic_catch
1053
1045
  async def _async_detach_cited_document(self, element_guid: str, cited_doc_guid: str,
1054
- body: dict | DeleteRequestBody = None) -> None:
1046
+ body: dict | DeleteRequestBody = None) -> None:
1055
1047
  """ Detach an element from an cited document reference; body is optional. Async version.
1056
1048
 
1057
1049
  Parameters
@@ -1089,10 +1081,10 @@ class ExternalReferences(Client2):
1089
1081
  }
1090
1082
  """
1091
1083
  url = f"{self.command_root}/elements/{element_guid}/cited-document-references/{cited_doc_guid}/detach"
1092
-
1084
+
1093
1085
  await self._async_delete_request(url, body)
1094
1086
  logger.info(f"Detached element {element_guid} from cited document reference {cited_doc_guid}")
1095
-
1087
+
1096
1088
  @dynamic_catch
1097
1089
  def detach_cited_document(self, element_guid: str, cited_doc_guid: str, body: dict | DeleteRequestBody = None):
1098
1090
  """ Detach an element from acited document reference. Request body is optional.
@@ -1133,14 +1125,14 @@ class ExternalReferences(Client2):
1133
1125
  """
1134
1126
  loop = asyncio.get_event_loop()
1135
1127
  loop.run_until_complete(self._async_detach_cited_document(element_guid, cited_doc_guid, body))
1136
-
1128
+
1137
1129
  #
1138
1130
  # do deletes etc
1139
1131
  #
1140
1132
  @dynamic_catch
1141
1133
  async def _async_delete_external_reference(self, ext_ref_guid: str,
1142
- body: dict | DeleteRequestBody = None,
1143
- cascade: bool = False) -> None:
1134
+ body: dict | DeleteRequestBody = None,
1135
+ cascade: bool = False) -> None:
1144
1136
  """ Delete an external reference. Async Version.
1145
1137
 
1146
1138
  Parameters
@@ -1186,7 +1178,7 @@ class ExternalReferences(Client2):
1186
1178
 
1187
1179
  @dynamic_catch
1188
1180
  def delete_external_reference(self, ext_ref_guid: str, body: dict | DeleteRequestBody = None,
1189
- cascade: bool = False) -> None:
1181
+ cascade: bool = False) -> None:
1190
1182
  """Delete an external reference..
1191
1183
 
1192
1184
  Parameters
@@ -1226,17 +1218,16 @@ class ExternalReferences(Client2):
1226
1218
  }
1227
1219
  """
1228
1220
  loop = asyncio.get_event_loop()
1229
- loop.run_until_complete(self._async_delete_external_reference(ext_ref_guid,body, cascade))
1230
-
1231
-
1221
+ loop.run_until_complete(self._async_delete_external_reference(ext_ref_guid, body, cascade))
1232
1222
 
1233
1223
  @dynamic_catch
1234
1224
  async def _async_find_external_references(self, search_string: str = "*", classification_names: list[str] = None,
1235
- metadata_element_types: list[str] = EXTERNAL_REFERENCE_TYPES,
1236
- starts_with: bool = True, ends_with: bool = False, ignore_case: bool = False,
1237
- start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1238
- output_format_set: str | dict = "ExternalReference",
1239
- body: dict | SearchStringRequestBody = None) -> list | str:
1225
+ metadata_element_types: list[str] = EXTERNAL_REFERENCE_TYPES,
1226
+ starts_with: bool = True, ends_with: bool = False,
1227
+ ignore_case: bool = False,
1228
+ start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1229
+ output_format_set: str | dict = "ExternalReference",
1230
+ body: dict | SearchStringRequestBody = None) -> list | str:
1240
1231
  """ Returns the list of external references matching the search string filtered by the optional classification.
1241
1232
  This method can either be used with a body, allowing full control, or with the individual parameters.
1242
1233
  If the body is provided it will be used and the search_string will be ignored.
@@ -1289,10 +1280,10 @@ class ExternalReferences(Client2):
1289
1280
  url = str(HttpUrl(f"{self.command_root}/external-references/by-search-string"))
1290
1281
  response = await self._async_find_request(url, _type="ExternalReference", search_string=search_string,
1291
1282
  _gen_output=self._generate_external_reference_output,
1292
- classification_names = classification_names,
1293
- metadata_element_types = metadata_element_types,
1294
- starts_with = starts_with, ends_with = ends_with, ignore_case = ignore_case,
1295
- start_from = start_from, page_size = page_size,
1283
+ classification_names=classification_names,
1284
+ metadata_element_types=metadata_element_types,
1285
+ starts_with=starts_with, ends_with=ends_with, ignore_case=ignore_case,
1286
+ start_from=start_from, page_size=page_size,
1296
1287
  output_format=output_format, output_format_set=output_format_set,
1297
1288
  body=body)
1298
1289
 
@@ -1300,11 +1291,11 @@ class ExternalReferences(Client2):
1300
1291
 
1301
1292
  @dynamic_catch
1302
1293
  def find_external_references(self, search_string: str = '*', classification_names: str = None,
1303
- metadata_element_types: list[str] = EXTERNAL_REFERENCE_TYPES, starts_with: bool = True,
1304
- ends_with: bool = False, ignore_case: bool = False,
1305
- start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1306
- output_format_set: str | dict = "ExternalReference",
1307
- body: dict | SearchStringRequestBody = None) -> list | str:
1294
+ metadata_element_types: list[str] = EXTERNAL_REFERENCE_TYPES, starts_with: bool = True,
1295
+ ends_with: bool = False, ignore_case: bool = False,
1296
+ start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1297
+ output_format_set: str | dict = "ExternalReference",
1298
+ body: dict | SearchStringRequestBody = None) -> list | str:
1308
1299
  """ Returns the list of external references matching the search string filtered by the optional classification.
1309
1300
  This method can either be used with a body, allowing full control, or with the individual parameters.
1310
1301
  If the body is provided it will be used and the search_string will be ignored.
@@ -1361,17 +1352,17 @@ class ExternalReferences(Client2):
1361
1352
  """
1362
1353
  return asyncio.get_event_loop().run_until_complete(
1363
1354
  self._async_find_external_references(search_string, classification_names, metadata_element_types,
1364
- starts_with, ends_with, ignore_case,
1365
- start_from, page_size, output_format,
1366
- output_format_set, body))
1367
-
1355
+ starts_with, ends_with, ignore_case,
1356
+ start_from, page_size, output_format,
1357
+ output_format_set, body))
1368
1358
 
1369
1359
  @dynamic_catch
1370
- async def _async_get_external_references_by_name(self, filter_string: str = None, classification_names: list[str] = None,
1371
- body: dict | FilterRequestBody = None,
1372
- start_from: int = 0, page_size: int = 0,
1373
- output_format: str = 'JSON',
1374
- output_format_set: str | dict = "ExternalReference") -> list | str:
1360
+ async def _async_get_external_references_by_name(self, filter_string: str = None,
1361
+ classification_names: list[str] = None,
1362
+ body: dict | FilterRequestBody = None,
1363
+ start_from: int = 0, page_size: int = 0,
1364
+ output_format: str = 'JSON',
1365
+ output_format_set: str | dict = "ExternalReference") -> list | str:
1375
1366
  """ Returns the list of external references with a particular name.
1376
1367
 
1377
1368
  Parameters
@@ -1408,21 +1399,21 @@ class ExternalReferences(Client2):
1408
1399
  NotAuthorizedException
1409
1400
  The principle specified by the user_id does not have authorization for the requested action
1410
1401
  """
1411
- url = str(HttpUrl(f"{self.command_root}/by-name"))
1402
+ url = str(HttpUrl(f"{self.command_root}/external-references/by-name"))
1412
1403
  response = await self._async_get_name_request(url, _type="Collection",
1413
- _gen_output=self._generate_external_reference_output,
1414
- filter_string = filter_string, classification_names = classification_names,
1415
- start_from = start_from, page_size = page_size,
1416
- output_format=output_format, output_format_set=output_format_set,
1417
- body=body)
1404
+ _gen_output=self._generate_external_reference_output,
1405
+ filter_string=filter_string,
1406
+ classification_names=classification_names,
1407
+ start_from=start_from, page_size=page_size,
1408
+ output_format=output_format, output_format_set=output_format_set,
1409
+ body=body)
1418
1410
 
1419
1411
  return response
1420
1412
 
1421
-
1422
1413
  def get_external_references_by_name(self, filter_string: str = None, classification_names: list[str] = None,
1423
- body: dict | FilterRequestBody = None,
1424
- start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1425
- output_format_set: str | dict = "ExternalReference") -> list | str:
1414
+ body: dict | FilterRequestBody = None,
1415
+ start_from: int = 0, page_size: int = 0, output_format: str = 'JSON',
1416
+ output_format_set: str | dict = "ExternalReference") -> list | str:
1426
1417
  """Returns the list of external references matching the filter string. Async version.
1427
1418
  The search string is located in the request body and is interpreted as a plain string.
1428
1419
  The request parameters, startsWith, endsWith, and ignoreCase can be used to allow a fuzzy search.
@@ -1457,17 +1448,15 @@ class ExternalReferences(Client2):
1457
1448
 
1458
1449
  """
1459
1450
  return asyncio.get_event_loop().run_until_complete(
1460
- self._async_get_external_references_by_name(filter_string, classification_names, body, start_from, page_size,
1461
- output_format, output_format_set))
1462
-
1463
-
1464
-
1451
+ self._async_get_external_references_by_name(filter_string, classification_names, body, start_from,
1452
+ page_size,
1453
+ output_format, output_format_set))
1465
1454
 
1466
1455
  @dynamic_catch
1467
1456
  async def _async_get_external_reference_by_guid(self, ext_ref_guid: str, element_type: str = None,
1468
- body: dict | GetRequestBody = None,
1469
- output_format: str = 'JSON',
1470
- output_format_set: str | dict = "ExternalReference") -> dict | str:
1457
+ body: dict | GetRequestBody = None,
1458
+ output_format: str = 'JSON',
1459
+ output_format_set: str | dict = "ExternalReference") -> dict | str:
1471
1460
  """Return the properties of a specific external reference. Async version.
1472
1461
 
1473
1462
  Parameters
@@ -1511,19 +1500,21 @@ class ExternalReferences(Client2):
1511
1500
  }
1512
1501
  """
1513
1502
 
1514
- url = str(HttpUrl(f"{self.command_root}/{ext_ref_guid}/retrieve"))
1503
+ url = str(HttpUrl(f"{self.command_root}/external-references/{ext_ref_guid}/retrieve"))
1515
1504
  type = element_type if element_type else "ExternalReference"
1516
1505
 
1517
1506
  response = await self._async_get_guid_request(url, _type=type,
1518
- _gen_output=self._generate_external_reference_output,
1519
- output_format=output_format, output_format_set=output_format_set,
1520
- body=body)
1507
+ _gen_output=self._generate_external_reference_output,
1508
+ output_format=output_format, output_format_set=output_format_set,
1509
+ body=body)
1521
1510
 
1522
1511
  return response
1523
1512
 
1524
1513
  @dynamic_catch
1525
- def get_external_reference_by_guid(self, ext_ref_guid: str, element_type: str = None, body: dict | GetRequestBody= None,
1526
- output_format: str = 'JSON', output_format_set: str | dict = "ExternalReference") -> dict | str:
1514
+ def get_external_reference_by_guid(self, ext_ref_guid: str, element_type: str = None,
1515
+ body: dict | GetRequestBody = None,
1516
+ output_format: str = 'JSON',
1517
+ output_format_set: str | dict = "ExternalReference") -> dict | str:
1527
1518
  """ Return the properties of a specific external reference. Async version.
1528
1519
 
1529
1520
  Parameters
@@ -1569,106 +1560,7 @@ class ExternalReferences(Client2):
1569
1560
  """
1570
1561
  return asyncio.get_event_loop().run_until_complete(
1571
1562
  self._async_get_external_reference_by_guid(ext_ref_guid, element_type, body,
1572
- output_format, output_format_set))
1573
-
1574
-
1575
-
1576
-
1577
-
1578
-
1579
- @dynamic_catch
1580
- async def _async_update_external_reference_status(self, external_reference_guid: str, status: str = None,
1581
- body: dict | UpdateStatusRequestBody = None):
1582
- """Update the status of a external_reference. Async version.
1583
-
1584
- Parameters
1585
- ----------
1586
- external_reference_guid: str
1587
- The guid of the external_reference to update.
1588
- status: str, optional
1589
- The new lifecycle status for the external_reference. Ignored, if the body is provided.
1590
- body: dict | UpdateStatusRequestBody, optional
1591
- A structure representing the details of the external_reference to create. If supplied, these details
1592
- supersede the status parameter provided.
1593
-
1594
- Returns
1595
- -------
1596
- Nothing
1597
-
1598
- Raises
1599
- ------
1600
- InvalidParameterException
1601
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1602
- PropertyServerException
1603
- Raised by the server when an issue arises in processing a valid request
1604
- NotAuthorizedException
1605
- The principle specified by the user_id does not have authorization for the requested action
1606
-
1607
- Notes
1608
- -----
1609
- JSON Structure looks like:
1610
- {
1611
- "class": "UpdateStatusRequestBody",
1612
- "status": "APPROVED",
1613
- "externalSourceGUID": "add guid here",
1614
- "externalSourceName": "add qualified name here",
1615
- "effectiveTime": "{{$isoTimestamp}}",
1616
- "forLineage": false,
1617
- "forDuplicateProcessing": false
1618
- }
1619
- """
1620
-
1621
- url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/external-reference-managermetadata-elements/{external_reference_guid}/update-status"
1622
- await self._async_update_status_request(url, status, body)
1623
-
1624
-
1625
- @dynamic_catch
1626
- def update_external_reference_status(self, external_reference_guid: str, status: str = None,
1627
- body: dict | UpdateStatusRequestBody = None):
1628
- """Update the status of a DigitalProduct external_reference.
1629
-
1630
- Parameters
1631
- ----------
1632
- external_reference_guid: str
1633
- The guid of the external_reference to update.
1634
- status: str, optional
1635
- The new lifecycle status for the digital product. Ignored, if the body is provided.
1636
- body: dict | UpdateStatusRequestBody, optional
1637
- A structure representing the details of the external_reference to create. If supplied, these details
1638
- supersede the status parameter provided.
1639
-
1640
- Returns
1641
- -------
1642
- Nothing
1643
-
1644
- Raises
1645
- ------
1646
- InvalidParameterException
1647
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1648
- PropertyServerException
1649
- Raised by the server when an issue arises in processing a valid request
1650
- NotAuthorizedException
1651
- The principle specified by the user_id does not have authorization for the requested action
1652
-
1653
- Notes
1654
- -----
1655
- JSON Structure looks like:
1656
- {
1657
- "class": "UpdateStatusRequestBody",
1658
- "status": "APPROVED",
1659
- "externalSourceGUID": "add guid here",
1660
- "externalSourceName": "add qualified name here",
1661
- "effectiveTime": "{{$isoTimestamp}}",
1662
- "forLineage": false,
1663
- "forDuplicateProcessing": false
1664
- }
1665
- """
1666
- loop = asyncio.get_event_loop()
1667
- loop.run_until_complete(self._async_update_external_reference_status(external_reference_guid, status, body))
1668
-
1669
-
1670
-
1671
-
1563
+ output_format, output_format_set))
1672
1564
 
1673
1565
  def _extract_external_reference_properties(self, element: dict, columns_struct: dict) -> dict:
1674
1566
  """
@@ -1731,7 +1623,6 @@ class ExternalReferences(Client2):
1731
1623
 
1732
1624
  return col_data
1733
1625
 
1734
-
1735
1626
  def _generate_external_reference_output(self, elements: dict | list[dict], filter: Optional[str],
1736
1627
  element_type_name: Optional[str], output_format: str = "DICT",
1737
1628
  output_format_set: dict | str = None) -> str | list[dict]:
@@ -87,15 +87,16 @@ class GlossaryManager(CollectionManager):
87
87
  user_pwd: str = None,
88
88
  token: str = None,
89
89
  ):
90
- self.gl_mgr_command_root: str
91
90
  self.view_server = view_server
92
91
  self.platform_url = platform_url
93
92
  self.user_id = user_id
94
93
  self.user_pwd = user_pwd
95
94
 
95
+
96
96
  CollectionManager.__init__(self, view_server, platform_url, user_id, user_pwd, token)
97
97
  result = self.get_platform_origin()
98
98
  logger.info(f"GlossaryManager initialized, platform origin is: {result}")
99
+ self.glossary_command_root = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager"
99
100
  #
100
101
  # Get Valid Values for Enumerations
101
102
  #
@@ -948,6 +948,10 @@ def generate_output(elements: Union[Dict, List[Dict]],
948
948
  if search_string is None or search_string == '':
949
949
  search_string = "All"
950
950
 
951
+ # Set the output format to DICT to return values to table display
952
+ if output_format == "TABLE":
953
+ output_format = "DICT"
954
+
951
955
  # Generate output based on format
952
956
  if output_format == 'MERMAID':
953
957
  return extract_mermaid_only(elements)