pyegeria 0.8.4.38__tar.gz → 0.8.4.40__tar.gz

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 (97) hide show
  1. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/PKG-INFO +1 -1
  2. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_asset_graph.py +109 -53
  3. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_archives.py +4 -5
  4. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_elements.py +34 -4
  5. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_elements_x.py +12 -8
  6. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/feedback_manager_omvs.py +1 -1
  7. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/runtime_manager_omvs.py +8 -6
  8. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyproject.toml +2 -2
  9. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/LICENSE +0 -0
  10. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/README.md +0 -0
  11. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/README.md +0 -0
  12. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/__init__.py +0 -0
  13. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_collection.py +0 -0
  14. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_project_dependencies.py +0 -0
  15. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_project_structure.py +0 -0
  16. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_tech_type_elements.py +0 -0
  17. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/get_tech_type_template.py +0 -0
  18. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_assets.py +0 -0
  19. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_cert_types.py +0 -0
  20. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_glossary.py +0 -0
  21. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_projects.py +0 -0
  22. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_relationships.py +0 -0
  23. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_tech_types.py +0 -0
  24. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_todos.py +0 -0
  25. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cat/list_user_ids.py +0 -0
  26. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/__init__.py +0 -0
  27. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/egeria.py +0 -0
  28. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/egeria_cat.py +0 -0
  29. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/egeria_my.py +0 -0
  30. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/egeria_ops.py +0 -0
  31. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/egeria_tech.py +0 -0
  32. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/cli/ops_config.py +0 -0
  33. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/README.md +0 -0
  34. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/__init__.py +0 -0
  35. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/list_my_profile.py +0 -0
  36. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/list_my_roles.py +0 -0
  37. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/monitor_my_todos.py +0 -0
  38. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/monitor_open_todos.py +0 -0
  39. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/my/todo_actions.py +0 -0
  40. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/README.md +0 -0
  41. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/__init__.py +0 -0
  42. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/engine_actions.py +0 -0
  43. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/gov_server_actions.py +0 -0
  44. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/list_catalog_targets.py +0 -0
  45. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/load_archive.py +0 -0
  46. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_asset_events.py +0 -0
  47. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_engine_activity.py +0 -0
  48. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_engine_activity_c.py +0 -0
  49. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_gov_eng_status.py +0 -0
  50. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_integ_daemon_status.py +0 -0
  51. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_platform_status.py +0 -0
  52. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/monitor_server_status.py +0 -0
  53. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/orig_monitor_server_list.py +0 -0
  54. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/orig_monitor_server_status.py +0 -0
  55. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/refresh_integration_daemon.py +0 -0
  56. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/ops/restart_integration_daemon.py +0 -0
  57. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/README.md +0 -0
  58. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/__init__.py +0 -0
  59. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/get_element_info.py +0 -0
  60. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/get_guid_info.py +0 -0
  61. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/get_tech_details.py +0 -0
  62. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_asset_types.py +0 -0
  63. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_registered_services.py +0 -0
  64. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_related_specification.py +0 -0
  65. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_relationship_types.py +0 -0
  66. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_tech_templates.py +0 -0
  67. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/list_valid_metadata_values.py +0 -0
  68. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/commands/tech/x_list_related_elements.py +0 -0
  69. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/__init__.py +0 -0
  70. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/_client.py +0 -0
  71. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/_deprecated_gov_engine.py +0 -0
  72. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/_exceptions.py +0 -0
  73. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/_globals.py +0 -0
  74. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/_validators.py +0 -0
  75. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/asset_catalog_omvs.py +0 -0
  76. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/automated_curation_omvs.py +0 -0
  77. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/classification_manager_omvs.py +0 -0
  78. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/collection_manager_omvs.py +0 -0
  79. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/core_omag_server_config.py +0 -0
  80. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/create_tech_guid_lists.py +0 -0
  81. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/egeria_cat_client.py +0 -0
  82. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/egeria_client.py +0 -0
  83. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/egeria_config_client.py +0 -0
  84. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/egeria_my_client.py +0 -0
  85. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/egeria_tech_client.py +0 -0
  86. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/full_omag_server_config.py +0 -0
  87. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/glossary_browser_omvs.py +0 -0
  88. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/glossary_manager_omvs.py +0 -0
  89. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/mermaid_utilities.py +0 -0
  90. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/my_profile_omvs.py +0 -0
  91. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/platform_services.py +0 -0
  92. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/project_manager_omvs.py +0 -0
  93. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/registered_info.py +0 -0
  94. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/server_operations.py +0 -0
  95. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/utils.py +0 -0
  96. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/valid_metadata_omvs.py +0 -0
  97. {pyegeria-0.8.4.38 → pyegeria-0.8.4.40}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.8.4.38
3
+ Version: 0.8.4.40
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -20,22 +20,26 @@ from pyegeria import (
20
20
  InvalidParameterException,
21
21
  PropertyServerException,
22
22
  UserNotAuthorizedException,
23
- AssetCatalog
23
+ AssetCatalog,
24
24
  )
25
25
 
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
- EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
28
- EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
29
- EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
30
- EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
31
- EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
32
- EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
33
- EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
34
- EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
35
- EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
36
- EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
37
- EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
38
- EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
27
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
31
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
+ )
33
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
34
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
35
+ "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
36
+ )
37
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
38
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
39
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
40
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
41
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
42
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
39
43
 
40
44
  disable_ssl_warnings = True
41
45
 
@@ -43,10 +47,17 @@ guid_list = []
43
47
 
44
48
  console = Console(width=EGERIA_WIDTH, force_terminal=(not EGERIA_JUPYTER))
45
49
 
46
- def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str, user_pass: str,
47
- jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
48
- def build_classifications(classification: dict) -> Markdown:
49
50
 
51
+ def asset_viewer(
52
+ asset_guid: str,
53
+ server_name: str,
54
+ platform_url: str,
55
+ user: str,
56
+ user_pass: str,
57
+ jupyter: bool = EGERIA_JUPYTER,
58
+ width: int = EGERIA_WIDTH,
59
+ ):
60
+ def build_classifications(classification: dict) -> Markdown:
50
61
  class_md = ""
51
62
  for c in classification:
52
63
  c_type = c["classificationName"]
@@ -65,7 +76,7 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
65
76
 
66
77
  def build_nested_elements(nested_element: dict) -> Markdown:
67
78
  ne_md = " "
68
- ne_header = nested_element['elementHeader']
79
+ ne_header = nested_element["elementHeader"]
69
80
  ne_created_by = ne_header["versions"]["createdBy"]
70
81
  ne_created_at = ne_header["versions"]["createTime"]
71
82
  ne_guid = ne_header["guid"]
@@ -80,9 +91,11 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
80
91
  if type(ne_props) is dict:
81
92
  for prop in ne_props.keys():
82
93
  ne_prop_md += f"\t* {prop}: {ne_props[prop]}\n"
83
- ne_md = (f"Nested Element of Type: {ne_type} with GUID: {ne_guid} \n "
84
- f"* created by {ne_created_by} at time {ne_created_at}\n"
85
- f"\n* Properties:\n{ne_prop_md}\n")
94
+ ne_md = (
95
+ f"Nested Element of Type: {ne_type} with GUID: {ne_guid} \n "
96
+ f"* created by {ne_created_by} at time {ne_created_at}\n"
97
+ f"\n* Properties:\n{ne_prop_md}\n"
98
+ )
86
99
 
87
100
  if ne_class_md is not None:
88
101
  ne_md += f"* {ne_class_md}"
@@ -91,8 +104,7 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
91
104
  return output
92
105
 
93
106
  try:
94
- a_client = AssetCatalog(server_name, platform_url,
95
- user_id=user)
107
+ a_client = AssetCatalog(server_name, platform_url, user_id=user)
96
108
 
97
109
  token = a_client.create_egeria_bearer_token(user, user_pass)
98
110
  # asset_info = a_client.find_assets_in_domain(asset_name)
@@ -111,15 +123,28 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
111
123
 
112
124
  # print(f"\n{json.dumps(asset_graph, indent =2)}\n")
113
125
 
114
- asset_name = asset_graph["properties"].get("displayName",'---')
115
- qualified_name = asset_graph["properties"]["qualifiedName"]
116
- resource_name = asset_graph['properties'].get("resourceName","---")
117
-
118
- tree = Tree(f"{asset_name} ({asset_guid})", style="bold bright_white on black", guide_style="bold bright_blue")
126
+ asset_display_name = asset_graph["properties"].get("displayName", "---")
127
+ asset_display_description = asset_graph["properties"].get(
128
+ "displayDescription", "---"
129
+ )
130
+ asset_name = asset_graph["properties"].get("name", "---")
131
+ asset_resource_name = asset_graph["properties"].get("resourceName", "---")
132
+ asset_resource_description = asset_graph["properties"].get(
133
+ "resourceDescription", "---"
134
+ )
135
+ qualified_name = asset_graph["properties"].get("qualifiedName", "---")
136
+
137
+ tree = Tree(
138
+ f"{asset_name} ({asset_guid})",
139
+ style="bold bright_white on black",
140
+ guide_style="bold bright_blue",
141
+ )
119
142
  style = ""
120
- asset_elements = asset_graph['elementHeader']
143
+ asset_elements = asset_graph["elementHeader"]
121
144
  asset_type = asset_elements["type"]["typeName"]
122
- asset_deployed_imp_type = asset_graph.get("deployedImplementationType", "---")
145
+ asset_deployed_imp_type = asset_graph["properties"].get(
146
+ "deployedImplementationType", "---"
147
+ )
123
148
 
124
149
  asset_origin = asset_elements["origin"]["homeMetadataCollectionName"]
125
150
  asset_creation = asset_elements["versions"]["createTime"]
@@ -129,26 +154,48 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
129
154
  asset_relationships = asset_graph["relationships"]
130
155
  asset_class_md = build_classifications(asset_classifications)
131
156
 
132
- asset_properties = asset_graph.get("extendedProperties", None)
133
- if asset_properties is not None:
157
+ additional_properties = asset_graph["properties"].get(
158
+ "additionalProperties", None
159
+ )
160
+ if additional_properties is not None:
161
+ add_prop_md = "\n* Additional Properties:\n"
162
+ for prop in additional_properties:
163
+ add_prop_md = (
164
+ f"{add_prop_md}\n\t* {prop}: {additional_properties[prop]}\n"
165
+ )
166
+ else:
167
+ add_prop_md = ""
168
+
169
+ extended_properties = asset_graph["properties"].get("extendedProperties", None)
170
+ if extended_properties is not None:
134
171
  prop_md = "\n* Extended Properties:\n"
135
- for prop in asset_properties:
136
- prop_md = f"{prop_md}\n\t* {prop}: {asset_properties[prop]}\n"
172
+ for prop in extended_properties:
173
+ prop_md = f"{prop_md}\n\t* {prop}: {extended_properties[prop]}\n"
137
174
  else:
138
175
  prop_md = ""
139
- core_md = (f"**Type: {asset_type} Created by: {asset_created_by} on {asset_creation}**\n"
140
- f"* Deployed Implementation Type: {asset_deployed_imp_type}\n"
141
- f"* Qualified Name: {qualified_name}\n "
142
- f"* Resource Name: {resource_name}\n"
143
- f"* Display Name: {asset_name}\n"
144
- f"* Asset Origin: {asset_origin}\n{prop_md}\n"
145
- )
176
+ core_md = (
177
+ f"**Type: {asset_type} Created by: {asset_created_by} on {asset_creation}**\n"
178
+ f"* Deployed Implementation Type: {asset_deployed_imp_type}\n"
179
+ f"* Name: {asset_name}\n "
180
+ f"* Asset Resource Name: {asset_resource_name}\n"
181
+ f"* Asset Resource Description: {asset_resource_description}\n "
182
+ f"* Asset Display Name: {asset_display_name}\n"
183
+ f"* Asset Display Description: {asset_display_description}\n "
184
+ f"* Qualified Name: {qualified_name}\n "
185
+ f"* Asset Origin: {asset_origin}\n"
186
+ f" {prop_md}\n"
187
+ f" {add_prop_md}\n"
188
+ )
146
189
  core_md = Markdown(core_md)
147
190
 
148
191
  p1 = Panel.fit(core_md, style="bold bright_white")
149
192
  l2 = tree.add(p1)
150
193
  if asset_class_md is not None:
151
- p2 = Panel.fit(Markdown(asset_class_md), style="bold bright_white", title="Classifications")
194
+ p2 = Panel.fit(
195
+ Markdown(asset_class_md),
196
+ style="bold bright_white",
197
+ title="Classifications",
198
+ )
152
199
  l2 = tree.add(p2)
153
200
 
154
201
  #
@@ -158,7 +205,9 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
158
205
  l2 = tree.add("Nested Elements", style="bold white")
159
206
  for el in asset_nested_elements:
160
207
  asset_ne_md = build_nested_elements(el)
161
- p3 = Panel.fit(asset_ne_md, style="bold bright_white", title="Nested Elements")
208
+ p3 = Panel.fit(
209
+ asset_ne_md, style="bold bright_white", title="Nested Elements"
210
+ )
162
211
  l2.add(p3)
163
212
 
164
213
  #
@@ -185,10 +234,12 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
185
234
  relationship_created_by = relationship["versions"]["createdBy"]
186
235
  relationship_creation_time = relationship["versions"]["createTime"]
187
236
  relationship_properties = relationship.get("properties", "--- ")
188
- relationship_md = (f"Relationship Type {relationship_type}\n"
189
- f"* GUID: {relationship_guid}\n* Created by: {relationship_created_by} \n"
190
- f"* Creation Time: {relationship_creation_time}\n"
191
- f"* Properties: {relationship_properties}\n")
237
+ relationship_md = (
238
+ f"Relationship Type {relationship_type}\n"
239
+ f"* GUID: {relationship_guid}\n* Created by: {relationship_created_by} \n"
240
+ f"* Creation Time: {relationship_creation_time}\n"
241
+ f"* Properties: {relationship_properties}\n"
242
+ )
192
243
 
193
244
  rel_md = (
194
245
  f"* Relationship Type: {relationship_type}\n"
@@ -220,20 +271,25 @@ def asset_viewer(asset_guid: str, server_name: str, platform_url: str, user: str
220
271
 
221
272
  relationship_md += rel_end1_md + rel_end2_md
222
273
 
223
- relationship_panel = Panel.fit(Markdown(relationship_md), style="bold bright_white",
224
- title="Asset Relationships")
274
+ relationship_panel = Panel.fit(
275
+ Markdown(relationship_md),
276
+ style="bold bright_white",
277
+ title="Asset Relationships",
278
+ )
225
279
  tree.add(relationship_panel)
226
280
  with console.screen():
227
281
  print("\n\n")
228
282
  print(tree)
229
283
 
230
284
  except (
231
- InvalidParameterException,
232
- PropertyServerException,
233
- UserNotAuthorizedException
285
+ InvalidParameterException,
286
+ PropertyServerException,
287
+ UserNotAuthorizedException,
234
288
  ) as e:
235
289
  console.print_exception()
236
- console.print("\n\n ======> Most likely the GUID you provided is either incorrect or not an asset\n[red bold]")
290
+ console.print(
291
+ "\n\n ======> Most likely the GUID you provided is either incorrect or not an asset\n[red bold]"
292
+ )
237
293
 
238
294
 
239
295
  def main():
@@ -252,7 +308,7 @@ def main():
252
308
  try:
253
309
  asset_guid = Prompt.ask("Enter the Asset GUID to view:", default="")
254
310
  asset_viewer(asset_guid, server, url, userid, user_pass)
255
- except (KeyboardInterrupt) as e:
311
+ except KeyboardInterrupt as e:
256
312
  # console.print_exception()
257
313
  pass
258
314
  except Exception as e:
@@ -71,8 +71,9 @@ def display_archive_list(
71
71
  )
72
72
 
73
73
  table.add_column("Name")
74
+ table.add_column("Description")
74
75
  table.add_column("Path Name")
75
- table.add_column("Creation Date")
76
+
76
77
  # table.add_column("Creator")
77
78
  # table.add_column("Description")
78
79
 
@@ -93,16 +94,14 @@ def display_archive_list(
93
94
  for archive in sorted_archives:
94
95
  name = archive["properties"].get("name", "---")
95
96
  path_name = archive["properties"].get("pathName", "---")
97
+ description = archive["properties"].get("description", "---")
96
98
  creation_date_epoch = (
97
99
  int(archive["properties"].get("storeCreateTime", 0)) / 1000
98
100
  )
99
101
  create_date = datetime.datetime.fromtimestamp(creation_date_epoch)
100
102
  creator = "---"
101
- description = "---"
102
103
 
103
- table.add_row(
104
- name, path_name, create_date.strftime("%Y-%m-%d %H:%M:%S")
105
- )
104
+ table.add_row(name, description, path_name)
106
105
 
107
106
  return table
108
107
 
@@ -14,7 +14,7 @@ from pyegeria import (
14
14
  PropertyServerException,
15
15
  UserNotAuthorizedException,
16
16
  print_exception_response,
17
- ClassificationManager,
17
+ EgeriaTech,
18
18
  )
19
19
 
20
20
 
@@ -44,8 +44,15 @@ def list_elements(
44
44
  jupyter: bool = EGERIA_JUPYTER,
45
45
  width: int = EGERIA_WIDTH,
46
46
  ):
47
- c_client = ClassificationManager(server, url, user_id=username, user_pwd=password)
47
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
48
48
  token = c_client.create_egeria_bearer_token()
49
+
50
+ om_typedef = c_client.get_typedef_by_name(om_type)
51
+ if type(om_typedef) is str:
52
+ print(
53
+ f"The type name '{om_type}' is not known to the Egeria platform at {url} - {server}"
54
+ )
55
+ sys.exit(1)
49
56
  elements = c_client.get_elements(om_type)
50
57
 
51
58
  def generate_table() -> Table:
@@ -70,6 +77,7 @@ def list_elements(
70
77
  table.add_column("Home Store")
71
78
  table.add_column("GUID", width=38, no_wrap=True)
72
79
  table.add_column("Properties")
80
+ table.add_column("Classifications")
73
81
 
74
82
  if type(elements) is list:
75
83
  for element in elements:
@@ -79,14 +87,36 @@ def list_elements(
79
87
  el_home = header["origin"]["homeMetadataCollectionName"]
80
88
  el_create_time = header["versions"]["createTime"][:-10]
81
89
  el_guid = header["guid"]
90
+ el_class = header.get("classifications", "---")
82
91
 
83
92
  el_props_md = ""
84
93
  for prop in element["properties"].keys():
85
94
  el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
86
-
87
95
  el_props_out = Markdown(el_props_md)
96
+
97
+ c_md = ""
98
+ if type(el_class) is list:
99
+ for classification in el_class:
100
+ classification_name = classification.get(
101
+ "classificationName", "---"
102
+ )
103
+ c_md = f"* **{classification_name}**\n"
104
+ class_props = classification.get(
105
+ "classificationProperties", "---"
106
+ )
107
+ if type(class_props) is dict:
108
+ for prop in class_props.keys():
109
+ c_md += f"* **{prop}**: {class_props[prop]}\n"
110
+ c_md_out = Markdown(c_md)
111
+
88
112
  table.add_row(
89
- el_q_name, el_type, el_create_time, el_home, el_guid, el_props_out
113
+ el_q_name,
114
+ el_type,
115
+ el_create_time,
116
+ el_home,
117
+ el_guid,
118
+ el_props_out,
119
+ c_md_out,
90
120
  )
91
121
 
92
122
  return table
@@ -14,8 +14,9 @@ from pyegeria import (
14
14
  PropertyServerException,
15
15
  UserNotAuthorizedException,
16
16
  print_exception_response,
17
- ClassificationManager,
18
- FeedbackManager,
17
+ # ClassificationManager,
18
+ # FeedbackManager,
19
+ EgeriaTech,
19
20
  )
20
21
 
21
22
 
@@ -45,12 +46,15 @@ def list_elements_x(
45
46
  jupyter: bool = EGERIA_JUPYTER,
46
47
  width: int = EGERIA_WIDTH,
47
48
  ):
48
- c_client = ClassificationManager(server, url, user_id=username, user_pwd=password)
49
+ c_client = EgeriaTech(server, url, user_id=username, user_pwd=password)
49
50
  token = c_client.create_egeria_bearer_token()
50
- f_client = FeedbackManager(
51
- server, url, user_id=username, user_pwd=password, token=token
52
- )
53
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)
54
58
  elements = c_client.get_elements(om_type)
55
59
 
56
60
  def generate_table() -> Table:
@@ -93,7 +97,7 @@ def list_elements_x(
93
97
 
94
98
  el_props_out = Markdown(el_props_md)
95
99
 
96
- tags = f_client.get_attached_tags(el_guid)
100
+ tags = c_client.get_attached_tags(el_guid)
97
101
  tags_md = "Tags:\n"
98
102
  if type(tags) is list:
99
103
  for tag in tags:
@@ -106,7 +110,7 @@ def list_elements_x(
106
110
  else:
107
111
  tags_md = "---"
108
112
 
109
- likes = f_client.get_attached_likes(el_guid)
113
+ likes = c_client.get_attached_likes(el_guid)
110
114
  likes_md = "Likes:\b"
111
115
  if type(likes) is list:
112
116
  for like in likes:
@@ -83,7 +83,7 @@ def element_response(response: dict, element_type: str, detailed_response: bool)
83
83
 
84
84
 
85
85
  def elements_response(response: dict, element_type: str, detailed_response: bool):
86
- print(response)
86
+ # print(response)
87
87
  if detailed_response:
88
88
  return response
89
89
  elif not element_type in response:
@@ -1096,7 +1096,7 @@ class RuntimeManager(Client):
1096
1096
  archive_file: str,
1097
1097
  server_guid: str = None,
1098
1098
  server_name: str = None,
1099
- time_out: int = 60,
1099
+ time_out: int = 120,
1100
1100
  ) -> None:
1101
1101
  """Add a new open metadata archive to running OMAG Server's repository.
1102
1102
  An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
@@ -1141,7 +1141,7 @@ class RuntimeManager(Client):
1141
1141
  archive_file: str,
1142
1142
  server_guid: str = None,
1143
1143
  server_name: str = None,
1144
- time_out: int = 60,
1144
+ time_out: int = 120,
1145
1145
  ) -> None:
1146
1146
  """Add a new open metadata archive to running OMAG Server's repository.
1147
1147
  An open metadata archive contains metadata types and instances. This operation loads an open metadata archive
@@ -1247,7 +1247,7 @@ class RuntimeManager(Client):
1247
1247
  return
1248
1248
 
1249
1249
  async def _async_activate_server_with_stored_config(
1250
- self, server_guid: str = None, server_name: str = None
1250
+ self, server_guid: str = None, server_name: str = None, timeout: int = 120
1251
1251
  ) -> None:
1252
1252
  """Activate the named OMAG server using the appropriate configuration document found in the
1253
1253
  configuration store. Async version.
@@ -1275,11 +1275,11 @@ class RuntimeManager(Client):
1275
1275
  server_guid = self.__get_guid__(server_guid, server_name)
1276
1276
  url = f"{self.runtime_command_root}/omag-servers/{server_guid}/instance"
1277
1277
 
1278
- await self._async_make_request("POST", url)
1278
+ await self._async_make_request("POST", url, time_out=timeout)
1279
1279
  return
1280
1280
 
1281
1281
  def activate_server_with_stored_config(
1282
- self, server_guid: str = None, server_name: str = None
1282
+ self, server_guid: str = None, server_name: str = None, timeout: int = 120
1283
1283
  ) -> None:
1284
1284
  """Activate the named OMAG server using the appropriate configuration document found in the
1285
1285
  configuration store.
@@ -1306,7 +1306,9 @@ class RuntimeManager(Client):
1306
1306
  """
1307
1307
  loop = asyncio.get_event_loop()
1308
1308
  loop.run_until_complete(
1309
- self._async_activate_server_with_stored_config(server_guid, server_name)
1309
+ self._async_activate_server_with_stored_config(
1310
+ server_guid, server_name, timeout
1311
+ )
1310
1312
  )
1311
1313
  return
1312
1314
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.8.4.38"
3
+ version = "0.8.4.40"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -102,7 +102,7 @@ pytest = "^8.2.2"
102
102
 
103
103
  hey_egeria_ops = "commands.cli.egeria_ops:cli"
104
104
  hey_egeria_cat = "commands.cli.egeria_cat:cli"
105
- hey_egeria_tech = "commands.cli.egeria_cat:cli"
105
+ hey_egeria_tech = "commands.cli.egeria_tech:cli"
106
106
  hey_egeria_my = "commands.cli.egeria_my:cli"
107
107
  hey_egeria = "commands.cli.egeria:cli"
108
108
 
File without changes
File without changes