pyegeria 0.3.7__py3-none-any.whl → 0.3.9__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 (49) hide show
  1. pyegeria/Xasset_catalog_omvs.py +539 -0
  2. pyegeria/Xfeedback_manager_omvs.py +251 -0
  3. pyegeria/Xglossary_manager_omvs.py +3001 -0
  4. pyegeria/Xloaded_resources_omvs.py +91 -0
  5. pyegeria/__init__.py +6 -9
  6. pyegeria/_client.py +4 -6
  7. pyegeria/{gov_engine.py → _deprecated_gov_engine.py} +2 -59
  8. pyegeria/_exceptions.py +5 -6
  9. pyegeria/_globals.py +1 -1
  10. pyegeria/automated_curation_omvs.py +320 -315
  11. pyegeria/collection_manager_omvs.py +187 -248
  12. pyegeria/core_omag_server_config.py +1 -5
  13. pyegeria/full_omag_server_config.py +53 -83
  14. pyegeria/glossary_browser_omvs.py +2208 -0
  15. pyegeria/my_profile_omvs.py +8 -12
  16. pyegeria/platform_services.py +0 -3
  17. pyegeria/project_manager_omvs.py +9 -15
  18. pyegeria/registered_info.py +12 -52
  19. pyegeria/server_operations.py +1 -5
  20. pyegeria/valid_metadata_omvs.py +11 -23
  21. pyegeria-0.3.9.data/scripts/Create_Collection_Sample.py +292 -0
  22. pyegeria-0.3.9.data/scripts/Create_Sustainability_Collection_Sample.py +115 -0
  23. pyegeria-0.3.9.data/scripts/coco_status.py +98 -0
  24. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/collection_viewer.py +12 -31
  25. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/engine_action_status.py +14 -30
  26. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/find_todos.py +12 -41
  27. pyegeria-0.3.9.data/scripts/get_registered_services.py +135 -0
  28. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/get_relationship_types.py +16 -35
  29. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/glossary_view.py +2 -2
  30. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/gov_engine_status.py +0 -1
  31. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/list_asset_types.py +3 -25
  32. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/my_todos.py +1 -1
  33. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/open_todos.py +3 -24
  34. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/project_list_viewer.py +12 -26
  35. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/server_status.py +1 -20
  36. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/view_my_profile.py +8 -34
  37. {pyegeria-0.3.7.dist-info → pyegeria-0.3.9.dist-info}/METADATA +1 -3
  38. pyegeria-0.3.9.dist-info/RECORD +49 -0
  39. pyegeria/glossary_omvs.py +0 -789
  40. pyegeria-0.3.7.dist-info/RECORD +0 -41
  41. /pyegeria/{governance_author.py → Xaction_author_omvs.py} +0 -0
  42. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/get_tech_details.py +0 -0
  43. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/get_tech_types.py +0 -0
  44. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/integration_daemon_status.py +0 -0
  45. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/multi-server_status.py +0 -0
  46. {pyegeria-0.3.7.data → pyegeria-0.3.9.data}/scripts/server_status_widget.py +0 -0
  47. {pyegeria-0.3.7.dist-info → pyegeria-0.3.9.dist-info}/LICENSE +0 -0
  48. {pyegeria-0.3.7.dist-info → pyegeria-0.3.9.dist-info}/WHEEL +0 -0
  49. {pyegeria-0.3.7.dist-info → pyegeria-0.3.9.dist-info}/top_level.txt +0 -0
@@ -11,51 +11,31 @@ A simple status display for Engine Actions
11
11
 
12
12
  import argparse
13
13
  import json
14
+ import sys
14
15
  import time
15
16
 
16
17
  from rich import box
17
- from rich.live import Live
18
- from rich.table import Table
19
18
  from rich.console import Console
19
+ from rich.table import Table
20
20
 
21
+ from pyegeria import AutomatedCuration
21
22
  from pyegeria import (
22
23
  InvalidParameterException,
23
24
  PropertyServerException,
24
25
  UserNotAuthorizedException,
25
26
  print_exception_response,
26
27
  )
27
- from pyegeria import GovEng, AutomatedCuration
28
28
 
29
29
  disable_ssl_warnings = True
30
30
 
31
- good_platform1_url = "https://127.0.0.1:9443"
32
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
33
- bad_platform1_url = "https://localhost:9443"
34
-
35
- # good_platform1_url = "https://127.0.0.1:30080"
36
- # good_platform2_url = "https://127.0.0.1:30081"
37
- # bad_platform1_url = "https://localhost:9443"
38
-
39
- good_user_1 = "garygeeke"
40
- good_user_2 = "erinoverview"
41
- bad_user_1 = "eviledna"
42
- bad_user_2 = ""
43
31
 
44
- good_server_1 = "active-metadata-store"
45
- good_server_2 = "simple-metadata-store"
46
- good_server_3 = "view-server"
47
- good_server_4 = "engine-host"
48
- bad_server_1 = "coco"
49
- bad_server_2 = ""
50
-
51
-
52
- def display_status_engine_actions(server: str = good_server_3, url: str = good_platform1_url, user: str = good_user_1):
32
+ def display_status_engine_actions(server: str, url: str, user: str):
53
33
  g_client = AutomatedCuration(server, url, user, user_pwd="secret")
54
34
 
55
35
  def generate_table() -> Table:
56
36
  """Make a new table."""
57
37
  table = Table(
58
- title=f"Engine Action Status for Platform {good_platform1_url} @ {time.asctime()}",
38
+ title=f"Engine Action Status for Platform {url} @ {time.asctime()}",
59
39
  # style = "black on grey66",
60
40
  header_style="white on dark_blue",
61
41
  show_lines=True,
@@ -76,7 +56,7 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
76
56
 
77
57
  token = g_client.create_egeria_bearer_token()
78
58
  action_status = g_client.get_engine_actions()
79
- if "No Elements" in action_status:
59
+ if type(action_status) is str:
80
60
  requested_time = " "
81
61
  start_time = " "
82
62
  completion_time = " "
@@ -86,9 +66,9 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
86
66
  target_element = " "
87
67
  process_name = " "
88
68
  completion_message = " "
89
- else:
69
+ elif type(action_status) is list:
90
70
  for action in action_status:
91
- requested_time = action["requestedTime"]
71
+ requested_time = action.get("requestedTime", " ")
92
72
  start_time = action.get("startTime", " ")
93
73
  completion_time = action.get("completionTime", " ")
94
74
 
@@ -102,7 +82,7 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
102
82
  else:
103
83
  action_status = f"[red]{action['actionStatus']}"
104
84
 
105
- target= action.get("actionTargetElements","Empty")
85
+ target= action.get("actionTargetElements", "Empty")
106
86
  if type(target) is list:
107
87
  target_element = json.dumps(target[0]["targetElement"]["elementProperties"]["propertiesAsStrings"])
108
88
  else:
@@ -115,8 +95,10 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
115
95
  requested_time, start_time, action_guid,engine_name, request_type,
116
96
  action_status, target_element, completion_time, process_name, completion_message
117
97
  )
98
+ else:
99
+ print("Egeria integration daemon not running")
100
+ sys.exit()
118
101
 
119
- # g_client.close_session()
120
102
  return table
121
103
 
122
104
  try:
@@ -127,6 +109,8 @@ def display_status_engine_actions(server: str = good_server_3, url: str = good_p
127
109
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
128
110
  print_exception_response(e)
129
111
  assert e.related_http_code != "200", "Invalid parameters"
112
+ finally:
113
+ g_client.close_session()
130
114
 
131
115
 
132
116
  if __name__ == "__main__":
@@ -10,51 +10,24 @@ Unit tests for the Utils helper functions using the Pytest framework.
10
10
  A simple display for glossary terms
11
11
  """
12
12
 
13
- import time
14
- import json
15
13
  import argparse
14
+ import time
15
+
16
+ from rich import box
17
+ from rich.console import Console
18
+ from rich.prompt import Prompt
19
+ from rich.table import Table
20
+
16
21
  from pyegeria import (
17
22
  InvalidParameterException,
18
23
  PropertyServerException,
19
24
  UserNotAuthorizedException,
20
25
  print_exception_response,
21
26
  )
22
- from rich.table import Table
23
- from rich.live import Live
24
- from rich import box
25
- from rich.prompt import Prompt
26
- from rich.tree import Tree
27
- from rich import print
28
- from rich.console import Console
29
27
  from pyegeria.my_profile_omvs import MyProfile
30
28
 
31
- from pyegeria.server_operations import ServerOps
32
- from pyegeria.gov_engine import GovEng
33
- from pyegeria.glossary_omvs import GlossaryBrowser
34
- disable_ssl_warnings = True
35
-
36
- good_platform1_url = "https://127.0.0.1:9443"
37
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
38
- bad_platform1_url = "https://localhost:9443"
39
-
40
- # good_platform1_url = "https://127.0.0.1:30080"
41
- # good_platform2_url = "https://127.0.0.1:30081"
42
- # bad_platform1_url = "https://localhost:9443"
43
-
44
- good_user_1 = "garygeeke"
45
- good_user_2 = "erinoverview"
46
- bad_user_1 = "eviledna"
47
- bad_user_2 = ""
48
-
49
- good_server_1 = "active-metadata-store"
50
- good_server_2 = "simple-metadata-store"
51
- good_server_3 = "view-server"
52
- good_server_4 = "engine-host"
53
- bad_server_1 = "coco"
54
- bad_server_2 = ""
55
-
56
29
 
57
- def display_to_dos(search_string: str, guid: str=None, server: str = good_server_3, url: str = good_platform1_url, username: str = good_user_2):
30
+ def display_to_dos(search_string: str, guid:str, server: str, url: str, username: str):
58
31
 
59
32
  m_client = MyProfile(server, url, user_id=username)
60
33
  token = m_client.create_egeria_bearer_token(username, "secret")
@@ -62,7 +35,7 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
62
35
  def generate_table(search_string:str = '*') -> Table:
63
36
  """Make a new table."""
64
37
  table = Table(
65
- title=f"Open ToDos for Platform {good_platform1_url} @ {time.asctime()}",
38
+ title=f"Open ToDos for Platform {url} @ {time.asctime()}",
66
39
  # style = "black on grey66",
67
40
  header_style="white on dark_blue",
68
41
  show_lines=True,
@@ -81,9 +54,9 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
81
54
  table.add_column("Status")
82
55
  table.add_column("Sponsor")
83
56
 
84
- todo_items = m_client.find_to_do("*", starts_with=True)
57
+ todo_items = m_client.find_to_do(search_string)
85
58
 
86
- if todo_items is None:
59
+ if type(todo_items) is str:
87
60
  name = " "
88
61
  type_name = " "
89
62
  created = " "
@@ -107,7 +80,7 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
107
80
  sponsor = "erinoverview"
108
81
  if status in ("WAITING", "OPEN"):
109
82
  status = f"[yellow]{status}"
110
- elif status in ("INPROGRESS", "COMPLETE"):
83
+ elif status in ("IN_PROGRESS", "COMPLETE"):
111
84
  status = f"[green]{status}"
112
85
  else:
113
86
  status = f"[red]{status}"
@@ -134,7 +107,6 @@ def display_to_dos(search_string: str, guid: str=None, server: str = good_server
134
107
  assert e.related_http_code != "200", "Invalid parameters"
135
108
 
136
109
  if __name__ == "__main__":
137
- sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
138
110
  parser = argparse.ArgumentParser()
139
111
  parser.add_argument("--server", help="Name of the server to display status for")
140
112
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -145,7 +117,6 @@ if __name__ == "__main__":
145
117
  server = args.server if args.server is not None else "view-server"
146
118
  url = args.url if args.url is not None else "https://localhost:9443"
147
119
  userid = args.userid if args.userid is not None else 'erinoverview'
148
- # guid = args.guid if args.guid is not None else None
149
120
  guid = None
150
121
 
151
122
  search_string = Prompt.ask("Enter the ToDo you are searching for:", default="*")
@@ -0,0 +1,135 @@
1
+ #!python
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ A simple widget to retrieve the registered services.
7
+
8
+ """
9
+
10
+ import argparse
11
+ import sys
12
+ import time
13
+
14
+ from rich import box
15
+ from rich.console import Console
16
+ from rich.prompt import Prompt
17
+ from rich.table import Table
18
+
19
+ from pyegeria import (
20
+ InvalidParameterException,
21
+ PropertyServerException,
22
+ UserNotAuthorizedException,
23
+ RegisteredInfo,
24
+ )
25
+
26
+
27
+ def display_registered_svcs(service: str, server: str , url: str,
28
+ username: str, password: str ):
29
+ """ Display the registered services list
30
+ Parameters
31
+ ----------
32
+ service : str, optional
33
+ The type of service to display information for. Default is "help".
34
+
35
+ server : str, optional
36
+ The server to connect to. Default is `default_server`.
37
+
38
+ url : str, optional
39
+ The platform URL. Default is `default_platform`.
40
+
41
+ username : str, optional
42
+ The username for authentication. Default is `default_user`.
43
+
44
+ password : str, optional
45
+ The password for authentication. Default is `default_password`.
46
+ """
47
+ def generate_table(svc_list) -> Table:
48
+ """Make a new table."""
49
+ table = Table(
50
+ title=f"Technology Types for: {url} @ {time.asctime()}",
51
+ # style = "black on grey66",
52
+ header_style="white on dark_blue",
53
+ show_lines=True,
54
+ box=box.ROUNDED,
55
+ caption=f"Registered Services from Server '{server}' @ Platform - {url}",
56
+ expand=True
57
+ )
58
+ table.add_column("Service Id")
59
+ table.add_column("Service Name")
60
+ table.add_column("Service Development Status")
61
+ table.add_column("URL Marker")
62
+ table.add_column("Description")
63
+ table.add_column("Wiki")
64
+ table.add_column("Server Type")
65
+ table.add_column("Partner Service Name")
66
+ table.add_column("Partner Service Type")
67
+
68
+ if type(svc_list) is list:
69
+ for svc in svc_list:
70
+ svc_id = str(svc.get("serviceId", " "))
71
+ svc_name = svc.get("serviceName", "b")
72
+ svc_dev_status = svc.get("serviceDevelopmentStatus", " ")
73
+ svc_url_marker = svc.get("serviceUrlMarker", " ")
74
+ svc_description = svc.get("serviceDescription", " ")
75
+ svc_wiki = svc.get("serviceWiki", " ")
76
+ svc_partner_svc_name = svc.get("partnerServiceName", " ")
77
+ svc_partner_svc_type = svc.get("partnerServiceType", " ")
78
+
79
+ table.add_row(
80
+ svc_id, svc_name, svc_dev_status, svc_url_marker, svc_description, svc_wiki,
81
+ svc_partner_svc_name, svc_partner_svc_type
82
+ )
83
+ return table
84
+ elif type(svc_list) is str:
85
+ help = """
86
+ The kinds of services that you can get more information include:
87
+ all.....................lists all registered services
88
+ access-services.........lists all registered access services
89
+ common-services.........lists all registered common services
90
+ engine-services.........lists all registered engine services
91
+ governance-services.....lists all registered governance services
92
+ integration-services....lists all registered integration services
93
+ view-services...........lists all registered view services
94
+
95
+ Pass in a parameter from the left-hand column into the function to
96
+ get more details on the specified service category.
97
+ """
98
+ console.print(help)
99
+
100
+ else:
101
+ print("Unknown service type")
102
+ sys.exit(1)
103
+
104
+ console = Console()
105
+ try:
106
+ a_client = RegisteredInfo(server, url, username)
107
+ # token = a_client.create_egeria_bearer_token(username, password)
108
+ svc_list = a_client.list_registered_svcs(service)
109
+
110
+ with console.pager():
111
+ console.print(generate_table(svc_list))
112
+
113
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
114
+ console.print_exception(show_locals=True)
115
+ finally:
116
+ a_client.close_session()
117
+
118
+
119
+ if __name__ == "__main__":
120
+ parser = argparse.ArgumentParser()
121
+ parser.add_argument("--server", help="Name of the server to display status for")
122
+ parser.add_argument("--url", help="URL Platform to connect to")
123
+ parser.add_argument("--userid", help="User Id")
124
+ parser.add_argument("--password", help="Password")
125
+
126
+ args = parser.parse_args()
127
+
128
+ server = args.server if args.server is not None else "active-metadata-store"
129
+ url = args.url if args.url is not None else "https://localhost:9443"
130
+ userid = args.userid if args.userid is not None else 'garygeeke'
131
+ password = args.password if args.password is not None else 'secret'
132
+
133
+ svc_kind = Prompt.ask("Enter the service type you are searching for:", default="all")
134
+
135
+ display_registered_svcs(svc_kind, server, url, userid, password=password)
@@ -8,41 +8,26 @@ Copyright Contributors to the ODPi Egeria project.
8
8
  Get valid relationship types.
9
9
  """
10
10
 
11
- import time
12
- import json
13
11
  import argparse
12
+ import time
13
+
14
+ from rich import box
15
+ from rich import print
16
+ from rich.console import Console
17
+ from rich.prompt import Prompt
18
+ from rich.table import Table
19
+
14
20
  from pyegeria import (
15
21
  InvalidParameterException,
16
22
  PropertyServerException,
17
23
  UserNotAuthorizedException,
18
24
  print_exception_response,
19
25
  )
20
- from rich.table import Table
21
- from rich.live import Live
22
- from rich import box
23
- from rich.prompt import Prompt
24
- from rich.tree import Tree
25
- from rich import print
26
- from rich.console import Console
27
- from pyegeria import ValidMetadataManager, ProjectManager
28
-
29
- disable_ssl_warnings = True
30
-
31
- good_platform1_url = "https://127.0.0.1:9443"
32
-
33
-
34
- # good_platform1_url = "https://127.0.0.1:30080"
35
- # good_platform2_url = "https://127.0.0.1:30081"
36
- # bad_platform1_url = "https://localhost:9443"
26
+ from pyegeria import ValidMetadataManager
37
27
 
38
- good_user_1 = "garygeeke"
39
- good_user_2 = "erinoverview"
40
- good_server_3 = "view-server"
41
28
 
42
-
43
-
44
- def display_list(type_name:str, server: str = good_server_3, url: str = good_platform1_url,
45
- username: str = good_user_2, save_output: bool = False):
29
+ def display_list(type_name:str, server: str, url: str ,
30
+ username: str, save_output: bool = False):
46
31
 
47
32
  p_client = ValidMetadataManager(server, url, user_id=username)
48
33
  token = p_client.create_egeria_bearer_token(username, "secret")
@@ -63,15 +48,14 @@ def display_list(type_name:str, server: str = good_server_3, url: str = good_pla
63
48
  # table.add_column("GUID", no_wrap=True,)
64
49
  table.add_column("Status")
65
50
  table.add_column("Description")
66
- table.add_column("Description Wiki")
51
+ table.add_column("Description Wiki", no_wrap=True)
67
52
  table.add_column("Attribute Name")
68
53
  table.add_column("Attribute Status")
69
54
  table.add_column("Attribute Type")
70
- # table.add_column("Attribute Type")
71
55
  table.add_column("Attribute Description")
72
56
 
73
57
  types_list = p_client.get_valid_relationship_types(type_name)
74
- # print(json.dumps(types_list, indent=4))
58
+
75
59
  print(type(types_list))
76
60
  if types_list is None:
77
61
  name = " "
@@ -106,10 +90,7 @@ def display_list(type_name:str, server: str = good_server_3, url: str = good_pla
106
90
  return table
107
91
 
108
92
  try:
109
- # with Live(generate_table(), refresh_per_second=4, screen=True) as live:
110
- # while True:
111
- # time.sleep(2)
112
- # live.update(generate_table())
93
+
113
94
  console = Console(record=True)
114
95
  with console.pager():
115
96
  console.print(generate_table(type_name))
@@ -129,13 +110,13 @@ if __name__ == "__main__":
129
110
  parser.add_argument("--url", help="URL Platform to connect to")
130
111
  parser.add_argument("--userid", help="User Id")
131
112
  parser.add_argument("--save-output", help="Save output to file?")
132
- # parser.add_argument("--sponsor", help="Name of sponsor to search")
113
+
133
114
  args = parser.parse_args()
134
115
 
135
116
  server = args.server if args.server is not None else "view-server"
136
117
  url = args.url if args.url is not None else "https://localhost:9443"
137
118
  userid = args.userid if args.userid is not None else 'erinoverview'
138
119
  save_output = args.save_output if args.save_output is not None else False
139
- type_name = Prompt.ask("Enter the Type Name to retrieve:", default="*")
120
+ type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
140
121
 
141
122
  display_list(type_name, server, url, userid, save_output)
@@ -28,8 +28,8 @@ from rich.console import Console
28
28
 
29
29
 
30
30
  from pyegeria.server_operations import ServerOps
31
- from pyegeria.gov_engine import GovEng
32
- from pyegeria.glossary_omvs import GlossaryBrowser
31
+ from pyegeria._deprecated_gov_engine import GovEng
32
+ from pyegeria.glossary_browser_omvs import GlossaryBrowser
33
33
  disable_ssl_warnings = True
34
34
 
35
35
  good_platform1_url = "https://127.0.0.1:9443"
@@ -25,7 +25,6 @@ from rich import box
25
25
  from rich import console
26
26
 
27
27
  from pyegeria.server_operations import ServerOps
28
- from pyegeria.gov_engine import GovEng
29
28
 
30
29
  disable_ssl_warnings = True
31
30
 
@@ -24,38 +24,16 @@ from pyegeria import (
24
24
  RegisteredInfo
25
25
  )
26
26
 
27
- disable_ssl_warnings = True
28
27
 
29
- good_platform1_url = "https://127.0.0.1:9443"
30
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
31
- bad_platform1_url = "https://localhost:9443"
32
-
33
- # good_platform1_url = "https://127.0.0.1:30080"
34
- # good_platform2_url = "https://127.0.0.1:30081"
35
- # bad_platform1_url = "https://localhost:9443"
36
-
37
- good_user_1 = "garygeeke"
38
- good_user_2 = "erinoverview"
39
- bad_user_1 = "eviledna"
40
- bad_user_2 = ""
41
-
42
- good_server_1 = "active-metadata-store"
43
- good_server_2 = "simple-metadata-store"
44
- good_server_3 = "view-server"
45
- good_server_4 = "engine-host"
46
- bad_server_1 = "coco"
47
- bad_server_2 = ""
48
-
49
-
50
- def display_asset_types(server: str = good_server_3, url: str = good_platform1_url, username: str = good_user_2):
28
+ def display_asset_types(server: str, url: str, username: str):
51
29
  r_client = RegisteredInfo(server, url, username)
52
- token = r_client.create_egeria_bearer_token(good_user_2, "secret")
30
+ token = r_client.create_egeria_bearer_token(username, "secret")
53
31
  asset_types = r_client.list_asset_types()
54
32
 
55
33
  def generate_table() -> Table:
56
34
  """Make a new table."""
57
35
  table = Table(
58
- title=f"Asset Types for: {good_platform1_url} @ {time.asctime()}",
36
+ title=f"Asset Types for: {url} @ {time.asctime()}",
59
37
  # style = "black on grey66",
60
38
  header_style="white on dark_blue",
61
39
  show_lines=True,
@@ -24,7 +24,7 @@ from pyegeria import (
24
24
  UserNotAuthorizedException,
25
25
  print_exception_response,
26
26
  )
27
- from pyegeria.gov_engine import GovEng
27
+ from pyegeria._deprecated_gov_engine import GovEng
28
28
  from pyegeria.my_profile_omvs import MyProfile
29
29
  disable_ssl_warnings = True
30
30
 
@@ -10,7 +10,6 @@ A simple status display for Open To Dos
10
10
  """
11
11
 
12
12
  import argparse
13
- import json
14
13
  import time
15
14
 
16
15
  from rich import box
@@ -24,39 +23,19 @@ from pyegeria._exceptions import (
24
23
  UserNotAuthorizedException,
25
24
  print_exception_response,
26
25
  )
27
- from pyegeria.gov_engine import GovEng
26
+
28
27
  from pyegeria.my_profile_omvs import MyProfile
29
28
  disable_ssl_warnings = True
30
29
 
31
- good_platform1_url = "https://127.0.0.1:9443"
32
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
33
- bad_platform1_url = "https://localhost:9443"
34
-
35
- # good_platform1_url = "https://127.0.0.1:30080"
36
- # good_platform2_url = "https://127.0.0.1:30081"
37
- # bad_platform1_url = "https://localhost:9443"
38
-
39
- good_user_1 = "garygeeke"
40
- good_user_2 = "erinoverview"
41
- bad_user_1 = "eviledna"
42
- bad_user_2 = ""
43
-
44
- good_server_1 = "active-metadata-store"
45
- good_server_2 = "simple-metadata-store"
46
- good_server_3 = "view-server"
47
- good_server_4 = "engine-host"
48
- bad_server_1 = "coco"
49
- bad_server_2 = ""
50
-
51
30
 
52
- def display_todos(server: str = good_server_4, url: str = good_platform1_url, user: str = good_user_1):
31
+ def display_todos(server: str , url: str, user: str):
53
32
  m_client = MyProfile(server, url, user_id=user)
54
33
  token = m_client.create_egeria_bearer_token(user, "secret")
55
34
 
56
35
  def generate_table(search_string:str = '*') -> Table:
57
36
  """Make a new table."""
58
37
  table = Table(
59
- title=f"Open ToDos for Platform {good_platform1_url} @ {time.asctime()}",
38
+ title=f"Open ToDos for Platform {url} @ {time.asctime()}",
60
39
  # style = "black on grey66",
61
40
  header_style="white on dark_blue",
62
41
  show_lines=True,
@@ -10,41 +10,27 @@ Unit tests for the Utils helper functions using the Pytest framework.
10
10
  A simple display for glossary terms
11
11
  """
12
12
 
13
- import time
14
- import json
15
13
  import argparse
14
+ import json
15
+ import time
16
+
17
+ from rich import box
18
+ from rich import print
19
+ from rich.console import Console
20
+ from rich.prompt import Prompt
21
+ from rich.table import Table
22
+
16
23
  from pyegeria import (
17
24
  InvalidParameterException,
18
25
  PropertyServerException,
19
26
  UserNotAuthorizedException,
20
27
  print_exception_response,
21
28
  )
22
- from rich.table import Table
23
- from rich.live import Live
24
- from rich import box
25
- from rich.prompt import Prompt
26
- from rich.tree import Tree
27
- from rich import print
28
- from rich.console import Console
29
- from pyegeria import ValidMetadataManager, ProjectManager
30
-
31
- disable_ssl_warnings = True
32
-
33
- good_platform1_url = "https://127.0.0.1:9443"
34
-
35
-
36
- # good_platform1_url = "https://127.0.0.1:30080"
37
- # good_platform2_url = "https://127.0.0.1:30081"
38
- # bad_platform1_url = "https://localhost:9443"
39
-
40
- good_user_1 = "garygeeke"
41
- good_user_2 = "erinoverview"
42
- good_server_3 = "view-server"
43
-
29
+ from pyegeria import ProjectManager
44
30
 
45
31
 
46
- def display_list(project_name: str, server: str = good_server_3, url: str = good_platform1_url,
47
- username: str = good_user_2, save_output: bool = False):
32
+ def display_list(project_name: str, server: str, url: str,
33
+ username: str, save_output: bool):
48
34
 
49
35
  p_client = ProjectManager(server, url, user_id=username)
50
36
  token = p_client.create_egeria_bearer_token(username, "secret")
@@ -23,27 +23,8 @@ from rich.live import Live
23
23
 
24
24
  from pyegeria.server_operations import ServerOps
25
25
 
26
- disable_ssl_warnings = True
27
26
 
28
- good_platform1_url = "https://127.0.0.1:9443"
29
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
30
- bad_platform1_url = "https://localhost:9443"
31
-
32
-
33
- good_user_1 = "garygeeke"
34
- good_user_2 = "erinoverview"
35
- bad_user_1 = "eviledna"
36
- bad_user_2 = ""
37
-
38
- good_server_1 = "active-metadata-store"
39
- good_server_2 = "simple-metadata-store"
40
- good_server_3 = "view-server"
41
- good_server_4 = "engine-host"
42
- bad_server_1 = "coco"
43
- bad_server_2 = ""
44
-
45
-
46
- def test_display_status(server: str = good_server_1, url: str = good_platform2_url, username: str = good_user_1):
27
+ def test_display_status(server: str, url: str , username: str ):
47
28
  p_client = ServerOps(server, url, username)
48
29
 
49
30
  def generate_table() -> Table: