pyegeria 5.3.1.dev1__py3-none-any.whl → 5.3.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.
Files changed (92) hide show
  1. pyegeria/.DS_Store +0 -0
  2. pyegeria/_client.py +1 -1
  3. pyegeria/automated_curation_omvs.py +1 -1
  4. pyegeria/classification_manager_omvs.py +4 -4
  5. pyegeria/commands/.DS_Store +0 -0
  6. pyegeria/commands/cat/exp_list_glossaries.py +1 -1
  7. pyegeria/commands/cat/get_asset_graph.py +1 -1
  8. pyegeria/commands/cat/get_collection.py +1 -1
  9. pyegeria/commands/cat/get_project_dependencies.py +1 -1
  10. pyegeria/commands/cat/get_project_structure.py +1 -1
  11. pyegeria/commands/cat/get_tech_type_elements.py +1 -1
  12. pyegeria/commands/cat/glossary_actions.py +3 -4
  13. pyegeria/commands/cat/list_assets.py +1 -1
  14. pyegeria/commands/cat/list_cert_types.py +1 -1
  15. pyegeria/commands/cat/list_collections.py +1 -1
  16. pyegeria/commands/cat/list_deployed_catalogs.py +1 -1
  17. pyegeria/commands/cat/list_deployed_database_schemas.py +1 -1
  18. pyegeria/commands/cat/list_deployed_databases.py +1 -1
  19. pyegeria/commands/cat/list_glossaries.py +1 -1
  20. pyegeria/commands/cat/list_projects.py +1 -1
  21. pyegeria/commands/cat/list_servers_deployed_imp.py +1 -1
  22. pyegeria/commands/cat/list_tech_type_elements.py +1 -1
  23. pyegeria/commands/cat/list_tech_types.py +1 -1
  24. pyegeria/commands/cat/list_terms.py +1 -1
  25. pyegeria/commands/cat/list_todos.py +1 -1
  26. pyegeria/commands/cat/list_user_ids.py +1 -1
  27. pyegeria/commands/cli/egeria.py +221 -85
  28. pyegeria/commands/cli/egeria_cat.py +3 -21
  29. pyegeria/commands/cli/egeria_login_tui.py +1 -1
  30. pyegeria/commands/cli/egeria_my.py +10 -0
  31. pyegeria/commands/cli/egeria_ops.py +19 -9
  32. pyegeria/commands/cli/egeria_tech.py +258 -139
  33. pyegeria/commands/cli/ops_config.py +0 -1
  34. pyegeria/commands/doc/.DS_Store +0 -0
  35. pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
  36. pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
  37. pyegeria/commands/doc/Visual Command Reference/cat/show/.DS_Store +0 -0
  38. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/.DS_Store +0 -0
  39. pyegeria/commands/doc/glossary/.DS_Store +0 -0
  40. pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
  41. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
  42. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
  43. pyegeria/commands/my/list_my_profile.py +1 -1
  44. pyegeria/commands/my/list_my_roles.py +1 -1
  45. pyegeria/commands/my/monitor_my_todos.py +1 -1
  46. pyegeria/commands/my/monitor_open_todos.py +1 -1
  47. pyegeria/commands/my/todo_actions.py +1 -1
  48. pyegeria/commands/ops/list_archives.py +1 -1
  49. pyegeria/commands/ops/list_catalog_targets.py +1 -1
  50. pyegeria/commands/ops/load_archive.py +1 -1
  51. pyegeria/commands/ops/monitor_asset_events.py +1 -1
  52. pyegeria/commands/ops/monitor_engine_activity.py +1 -1
  53. pyegeria/commands/ops/monitor_gov_eng_status.py +1 -1
  54. pyegeria/commands/ops/monitor_integ_daemon_status.py +10 -10
  55. pyegeria/commands/ops/monitor_platform_status.py +1 -1
  56. pyegeria/commands/ops/monitor_server_startup.py +1 -1
  57. pyegeria/commands/ops/monitor_server_status.py +1 -1
  58. pyegeria/commands/ops/orig_monitor_server_list.py +1 -1
  59. pyegeria/commands/ops/orig_monitor_server_status.py +1 -1
  60. pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
  61. pyegeria/commands/ops/restart_integration_daemon.py +1 -1
  62. pyegeria/commands/ops/table_integ_daemon_status.py +1 -1
  63. pyegeria/commands/tech/get_element_info.py +1 -1
  64. pyegeria/commands/tech/get_guid_info.py +1 -1
  65. pyegeria/commands/tech/get_tech_details.py +1 -1
  66. pyegeria/commands/tech/get_tech_type_template.py +1 -1
  67. pyegeria/commands/tech/{list_elements.py → list_all_om_type_elements.py} +2 -2
  68. pyegeria/commands/tech/{list_elements_x.py → list_all_om_type_elements_x.py} +2 -2
  69. pyegeria/commands/tech/{list_related_elements.py → list_all_related_elements.py} +1 -1
  70. pyegeria/commands/tech/list_anchored_elements.py +1 -1
  71. pyegeria/commands/tech/list_asset_types.py +1 -1
  72. pyegeria/commands/tech/list_elements_by_classification_by_property_value.py +186 -0
  73. pyegeria/commands/tech/list_elements_by_property_value.py +175 -0
  74. pyegeria/commands/tech/list_elements_by_property_value_x.py +196 -0
  75. pyegeria/commands/tech/list_elements_for_classification.py +1 -1
  76. pyegeria/commands/tech/list_gov_action_processes.py +1 -1
  77. pyegeria/commands/tech/list_registered_services.py +1 -1
  78. pyegeria/commands/tech/list_related_elements_with_prop_value.py +207 -0
  79. pyegeria/commands/tech/list_related_specification.py +1 -1
  80. pyegeria/commands/tech/list_relationship_types.py +1 -1
  81. pyegeria/commands/tech/list_relationships.py +1 -1
  82. pyegeria/commands/tech/list_tech_templates.py +1 -1
  83. pyegeria/commands/tech/list_valid_metadata_values.py +1 -1
  84. pyegeria/commands/tech/table_tech_templates.py +1 -1
  85. pyegeria/commands/tech/x_list_related_elements.py +1 -1
  86. pyegeria/mermaid_utilities.py +1 -1
  87. pyegeria/valid_metadata_omvs.py +1 -1
  88. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/METADATA +10 -10
  89. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/RECORD +92 -77
  90. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/entry_points.txt +7 -2
  91. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/LICENSE +0 -0
  92. {pyegeria-5.3.1.dev1.dist-info → pyegeria-5.3.3.dist-info}/WHEEL +0 -0
@@ -32,11 +32,11 @@ from pyegeria._exceptions import (
32
32
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
33
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
34
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
35
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
36
36
  EGERIA_VIEW_SERVER_URL = os.environ.get(
37
37
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
38
  )
39
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
39
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
40
40
  EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
41
41
  "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
42
42
  )
@@ -50,15 +50,15 @@ disable_ssl_warnings = True
50
50
 
51
51
  def display_integration_daemon_status(
52
52
  search_list: list[str] = ["*"],
53
- integ_server: str = EGERIA_INTEGRATION_DAEMON,
54
- integ_url: str = EGERIA_INTEGRATION_DAEMON_URL,
55
- view_server: str = EGERIA_VIEW_SERVER,
56
- view_url: str = EGERIA_VIEW_SERVER_URL,
57
- user: str = EGERIA_USER,
58
- user_pass: str = EGERIA_USER_PASSWORD,
53
+ integ_server: str = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon"),
54
+ integ_url: str = os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"),
55
+ view_server: str = os.environ.get("EGERIA_VIEW_SERVER", "view-server"),
56
+ view_url: str = os.environ.get('EGERIA_VIEW_SERVER_URL', "https://localhost:9443"),
57
+ user: str = os.environ.get("EGERIA_USER"),
58
+ user_pass: str = os.environ.get("EGERIA_USER_PASSWORD"),
59
59
  paging: bool = False,
60
- jupyter: bool = EGERIA_JUPYTER,
61
- width: int = EGERIA_WIDTH,
60
+ jupyter: bool = os.environ.get("EGERIA_JUPYTER", "False"),
61
+ width: int = os.environ.get("EGERIA_WIDTH","150"),
62
62
  sort: bool = True,
63
63
  ) -> None:
64
64
  """Display the status of connectors running on the specified Integration Daemon OMAG Server.
@@ -26,7 +26,7 @@ from pyegeria._exceptions import (
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
27
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
28
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
29
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
30
30
  EGERIA_VIEW_SERVER_URL = os.environ.get(
31
31
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
32
  )
@@ -26,7 +26,7 @@ from rich.live import Live
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
27
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
28
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
29
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
30
30
  EGERIA_VIEW_SERVER_URL = os.environ.get(
31
31
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
32
  )
@@ -32,7 +32,7 @@ from pyegeria import (
32
32
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
33
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
34
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
35
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
36
36
  EGERIA_VIEW_SERVER_URL = os.environ.get(
37
37
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
38
  )
@@ -29,7 +29,7 @@ disable_ssl_warnings = True
29
29
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
30
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
31
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
32
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
33
33
  EGERIA_VIEW_SERVER_URL = os.environ.get(
34
34
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
35
  )
@@ -26,7 +26,7 @@ from pyegeria import (
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
27
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
28
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
29
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
30
30
  EGERIA_VIEW_SERVER_URL = os.environ.get(
31
31
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
32
  )
@@ -21,7 +21,7 @@ from pyegeria._exceptions import (
21
21
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
22
22
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
23
23
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
24
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
24
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
25
25
  EGERIA_VIEW_SERVER_URL = os.environ.get(
26
26
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
27
27
  )
@@ -21,7 +21,7 @@ from pyegeria._exceptions import (
21
21
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
22
22
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
23
23
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
24
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
24
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
25
25
  EGERIA_VIEW_SERVER_URL = os.environ.get(
26
26
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
27
27
  )
@@ -28,7 +28,7 @@ from pyegeria._exceptions import (
28
28
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
29
29
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
30
30
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
31
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
31
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
32
32
  EGERIA_VIEW_SERVER_URL = os.environ.get(
33
33
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
34
34
  )
@@ -33,7 +33,7 @@ from pyegeria import (
33
33
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
34
34
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
35
35
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
36
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
36
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
37
37
  EGERIA_VIEW_SERVER_URL = os.environ.get(
38
38
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
39
39
  )
@@ -32,7 +32,7 @@ from pyegeria import (
32
32
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
33
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
34
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
35
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
36
36
  EGERIA_VIEW_SERVER_URL = os.environ.get(
37
37
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
38
  )
@@ -30,7 +30,7 @@ from pyegeria._exceptions import (
30
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
35
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
36
  )
@@ -26,7 +26,7 @@ from pyegeria import (
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
27
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
28
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
29
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
30
30
  EGERIA_VIEW_SERVER_URL = os.environ.get(
31
31
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
32
  )
@@ -1,4 +1,4 @@
1
- """This creates a templates guid file from the core metadata archive"""
1
+ """This lists all elemeents of an oopen metadata type"""
2
2
  from rich.markdown import Markdown
3
3
  from rich.prompt import Prompt
4
4
  import os
@@ -22,7 +22,7 @@ console = Console()
22
22
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
23
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
24
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
26
  EGERIA_VIEW_SERVER_URL = os.environ.get(
27
27
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
28
  )
@@ -1,4 +1,4 @@
1
- """This creates a templates guid file from the core metadata archive"""
1
+ """List elements """
2
2
  from rich.markdown import Markdown
3
3
  from rich.prompt import Prompt
4
4
  import os
@@ -24,7 +24,7 @@ console = Console()
24
24
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
25
25
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
26
26
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
27
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
27
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
28
28
  EGERIA_VIEW_SERVER_URL = os.environ.get(
29
29
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
30
30
  )
@@ -22,7 +22,7 @@ console = Console()
22
22
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
23
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
24
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
26
  EGERIA_VIEW_SERVER_URL = os.environ.get(
27
27
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
28
  )
@@ -28,7 +28,7 @@ from pyegeria import (
28
28
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
29
29
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
30
30
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
31
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
31
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
32
32
  EGERIA_VIEW_SERVER_URL = os.environ.get(
33
33
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
34
34
  )
@@ -27,7 +27,7 @@ from pyegeria import (
27
27
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
28
28
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
29
29
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
30
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
31
31
  EGERIA_VIEW_SERVER_URL = os.environ.get(
32
32
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
33
33
  )
@@ -0,0 +1,186 @@
1
+ """This finds all elements of a classification that match the property value for the properties specified"""
2
+ from rich.markdown import Markdown
3
+ from rich.prompt import Prompt
4
+ import os
5
+ import argparse
6
+ import time
7
+ import sys
8
+ from rich import box
9
+ from rich.console import Console
10
+ from rich.table import Table
11
+
12
+ from pyegeria import (
13
+ InvalidParameterException,
14
+ PropertyServerException,
15
+ UserNotAuthorizedException,
16
+ print_exception_response,
17
+ EgeriaTech,
18
+ )
19
+
20
+
21
+ console = Console()
22
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
27
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
+ )
29
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
30
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
31
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
32
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
33
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
34
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
35
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
36
+
37
+
38
+ def find_elements_by_classification_by_prop_value(
39
+ om_type: str,
40
+ classification: str,
41
+ property_value: str,
42
+ property_names: [str],
43
+ server: str,
44
+ url: str,
45
+ username: str,
46
+ password: str,
47
+ jupyter: bool = EGERIA_JUPYTER,
48
+ width: int = EGERIA_WIDTH,
49
+ ):
50
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
51
+ token = c_client.create_egeria_bearer_token()
52
+
53
+ om_typedef = c_client.get_typedef_by_name(om_type)
54
+ if type(om_typedef) is str:
55
+ print(
56
+ f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
57
+ )
58
+ sys.exit(0)
59
+
60
+ class_def = c_client.get_typedef_by_name(classification)
61
+ if type(class_def) is str:
62
+ print(
63
+ f"The Classification {classification} is not known to the Egeria platform at {url} - {server}"
64
+ )
65
+ sys.exit(0)
66
+
67
+ elements = c_client.find_elements_by_classification_with_property_value(classification, property_value,
68
+ property_names, om_type)
69
+ c = classification
70
+
71
+ def generate_table() -> Table:
72
+ """Make a new table."""
73
+ table = Table(
74
+ caption=f"Find Metadata Elements for: {url} - {server} @ {time.asctime()}",
75
+ style="bold bright_white on black",
76
+ row_styles=["bold bright_white on black"],
77
+ header_style="white on dark_blue",
78
+ title_style="bold bright_white on black",
79
+ caption_style="white on black",
80
+ show_lines=True,
81
+ box=box.ROUNDED,
82
+ title=f"Elements for Classification: {c}, Open Metadata Type: {om_type}, property value: {property_value}, "
83
+ f"properties: {property_names}",
84
+ expand=True,
85
+ width=width,
86
+ )
87
+
88
+ table.add_column("Qualified Name")
89
+ table.add_column("Type")
90
+ table.add_column("Created")
91
+ table.add_column("Home Store")
92
+ table.add_column("GUID", width=38, no_wrap=True)
93
+ table.add_column("Properties")
94
+ table.add_column("Classifications")
95
+
96
+ if type(elements) is list:
97
+ for element in elements:
98
+ header = element["elementHeader"]
99
+ el_q_name = element["properties"].get("qualifiedName", "---")
100
+ el_type = header["type"]["typeName"]
101
+ el_home = header["origin"]["homeMetadataCollectionName"]
102
+ el_create_time = header["versions"]["createTime"][:-10]
103
+ el_guid = header["guid"]
104
+ el_class = header.get("classifications", "---")
105
+
106
+ el_props_md = ""
107
+ for prop in element["properties"].keys():
108
+ el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
109
+ el_props_out = Markdown(el_props_md)
110
+
111
+ c_md = ""
112
+ if type(el_class) is list:
113
+ for classification in el_class:
114
+ classification_name = classification.get(
115
+ "classificationName", "---"
116
+ )
117
+ c_md = f"* **{classification_name}**\n"
118
+ class_props = classification.get(
119
+ "classificationProperties", "---"
120
+ )
121
+ if type(class_props) is dict:
122
+ for prop in class_props.keys():
123
+ c_md += f" * **{prop}**: {class_props[prop]}\n"
124
+ c_md_out = Markdown(c_md)
125
+
126
+ table.add_row(
127
+ el_q_name,
128
+ el_type,
129
+ el_create_time,
130
+ el_home,
131
+ el_guid,
132
+ el_props_out,
133
+ c_md_out,
134
+ )
135
+
136
+ return table
137
+ else:
138
+ print("No instances found")
139
+ sys.exit(1)
140
+
141
+ try:
142
+ console = Console(width=width, force_terminal=not jupyter)
143
+
144
+ with console.pager(styles=True):
145
+ console.print(generate_table())
146
+
147
+ except (
148
+ InvalidParameterException,
149
+ PropertyServerException,
150
+ UserNotAuthorizedException,
151
+ ) as e:
152
+ print_exception_response(e)
153
+ print("\n\nPerhaps the type name isn't known")
154
+ finally:
155
+ c_client.close_session()
156
+
157
+
158
+ def main():
159
+ parser = argparse.ArgumentParser()
160
+ parser.add_argument("--server", help="Name of the server to display status for")
161
+ parser.add_argument("--url", help="URL Platform to connect to")
162
+ parser.add_argument("--userid", help="User Id")
163
+ parser.add_argument("--password", help="Password")
164
+
165
+ args = parser.parse_args()
166
+
167
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
168
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
169
+ userid = args.userid if args.userid is not None else EGERIA_USER
170
+ password = args.password if args.password is not None else EGERIA_USER_PASSWORD
171
+
172
+ try:
173
+ classification = Prompt.ask("Enter the Classification to filter on", default="Anchors")
174
+ om_type = Prompt.ask(
175
+ "Enter the Open Metadata Type to find elements of", default="GlossaryTerm"
176
+ )
177
+ property_value = Prompt.ask("Enter the property value to search for")
178
+ property_names = Prompt.ask("Enter a comma seperated list of properties to search")
179
+ find_elements_by_classification_by_prop_value(om_type, classification,property_value,
180
+ [property_names], server, url, userid, password)
181
+ except KeyboardInterrupt:
182
+ pass
183
+
184
+
185
+ if __name__ == "__main__":
186
+ main()
@@ -0,0 +1,175 @@
1
+ """This creates a templates guid file from the core metadata archive"""
2
+ from rich.markdown import Markdown
3
+ from rich.prompt import Prompt
4
+ import os
5
+ import argparse
6
+ import time
7
+ import sys
8
+ from rich import box
9
+ from rich.console import Console
10
+ from rich.table import Table
11
+
12
+ from pyegeria import (
13
+ InvalidParameterException,
14
+ PropertyServerException,
15
+ UserNotAuthorizedException,
16
+ print_exception_response,
17
+ EgeriaTech,
18
+ )
19
+
20
+
21
+ console = Console()
22
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
27
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
+ )
29
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
30
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
31
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
32
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
33
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
34
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
35
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
36
+
37
+
38
+ def find_elements_by_prop_value(
39
+ om_type: str,
40
+ property_value: str,
41
+ property_names: [str],
42
+ server: str,
43
+ url: str,
44
+ username: str,
45
+ password: str,
46
+ jupyter: bool = EGERIA_JUPYTER,
47
+ width: int = EGERIA_WIDTH,
48
+ ):
49
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
50
+ token = c_client.create_egeria_bearer_token()
51
+
52
+ om_typedef = c_client.get_typedef_by_name(om_type)
53
+ if type(om_typedef) is str:
54
+ print(
55
+ f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
56
+ )
57
+ sys.exit(1)
58
+ elements = c_client.find_elements_by_property_value(property_value, property_names,
59
+ om_type
60
+ )
61
+
62
+ def generate_table() -> Table:
63
+ """Make a new table."""
64
+ table = Table(
65
+ caption=f"Find Metadata Elements for: {url} - {server} @ {time.asctime()}",
66
+ style="bold bright_white on black",
67
+ row_styles=["bold bright_white on black"],
68
+ header_style="white on dark_blue",
69
+ title_style="bold bright_white on black",
70
+ caption_style="white on black",
71
+ show_lines=True,
72
+ box=box.ROUNDED,
73
+ title=f"Elements for Open Metadata Type: {om_type}, property value: {property_value}, "
74
+ f"properties: {property_names}",
75
+ expand=True,
76
+ width=width,
77
+ )
78
+
79
+ table.add_column("Qualified Name")
80
+ table.add_column("Type")
81
+ table.add_column("Created")
82
+ table.add_column("Home Store")
83
+ table.add_column("GUID", width=38, no_wrap=True)
84
+ table.add_column("Properties")
85
+ table.add_column("Classifications")
86
+
87
+ if type(elements) is list:
88
+ for element in elements:
89
+ header = element["elementHeader"]
90
+ el_q_name = element["properties"].get("qualifiedName", "---")
91
+ el_type = header["type"]["typeName"]
92
+ el_home = header["origin"]["homeMetadataCollectionName"]
93
+ el_create_time = header["versions"]["createTime"][:-10]
94
+ el_guid = header["guid"]
95
+ el_class = header.get("classifications", "---")
96
+
97
+ el_props_md = ""
98
+ for prop in element["properties"].keys():
99
+ el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
100
+ el_props_out = Markdown(el_props_md)
101
+
102
+ c_md = ""
103
+ if type(el_class) is list:
104
+ for classification in el_class:
105
+ classification_name = classification.get(
106
+ "classificationName", "---"
107
+ )
108
+ c_md = f"* **{classification_name}**\n"
109
+ class_props = classification.get(
110
+ "classificationProperties", "---"
111
+ )
112
+ if type(class_props) is dict:
113
+ for prop in class_props.keys():
114
+ c_md += f" * **{prop}**: {class_props[prop]}\n"
115
+ c_md_out = Markdown(c_md)
116
+
117
+ table.add_row(
118
+ el_q_name,
119
+ el_type,
120
+ el_create_time,
121
+ el_home,
122
+ el_guid,
123
+ el_props_out,
124
+ c_md_out,
125
+ )
126
+
127
+ return table
128
+ else:
129
+ print("No instances found")
130
+ sys.exit(1)
131
+
132
+ try:
133
+ console = Console(width=width, force_terminal=not jupyter)
134
+
135
+ with console.pager(styles=True):
136
+ console.print(generate_table())
137
+
138
+ except (
139
+ InvalidParameterException,
140
+ PropertyServerException,
141
+ UserNotAuthorizedException,
142
+ ) as e:
143
+ print_exception_response(e)
144
+ print("\n\nPerhaps the type name isn't known")
145
+ finally:
146
+ c_client.close_session()
147
+
148
+
149
+ def main():
150
+ parser = argparse.ArgumentParser()
151
+ parser.add_argument("--server", help="Name of the server to display status for")
152
+ parser.add_argument("--url", help="URL Platform to connect to")
153
+ parser.add_argument("--userid", help="User Id")
154
+ parser.add_argument("--password", help="Password")
155
+
156
+ args = parser.parse_args()
157
+
158
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
159
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
160
+ userid = args.userid if args.userid is not None else EGERIA_USER
161
+ password = args.password if args.password is not None else EGERIA_USER_PASSWORD
162
+
163
+ try:
164
+ om_type = Prompt.ask(
165
+ "Enter the Open Metadata Type to find elements of", default="GlossaryTerm"
166
+ )
167
+ property_value = Prompt.ask("Enter the property value to search for")
168
+ property_names = Prompt.ask("Enter a comma seperated list of properties to search")
169
+ find_elements_by_prop_value(om_type, property_value, [property_names], server, url, userid, password)
170
+ except KeyboardInterrupt:
171
+ pass
172
+
173
+
174
+ if __name__ == "__main__":
175
+ main()