pyegeria 0.5.5.18__py3-none-any.whl → 0.5.5.20__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 (25) hide show
  1. examples/widgets/catalog_user/view_asset_graph.py +1 -1
  2. examples/widgets/developer/list_relationship_types.py +19 -7
  3. examples/widgets/developer/list_tech_templates.py +19 -12
  4. examples/widgets/developer/list_tech_types.py +22 -30
  5. examples/widgets/developer/list_valid_metadata_values.py +23 -34
  6. examples/widgets/operational/get_tech_type_elements.py +20 -6
  7. examples/widgets/operational/get_tech_type_template.py +20 -7
  8. examples/widgets/operational/refresh_integration_daemon.py +64 -0
  9. examples/widgets/operational/view_asset_events.py +13 -1
  10. examples/widgets/operational/view_eng_action_status.py +23 -9
  11. examples/widgets/operational/view_gov_eng_status.py +20 -7
  12. examples/widgets/operational/view_integ_daemon_status.py +22 -9
  13. examples/widgets/operational/view_platform_status.py +7 -4
  14. examples/widgets/operational/view_server_list.py +21 -7
  15. examples/widgets/operational/view_server_status.py +21 -9
  16. examples/widgets/personal_organizer/get_my_profile.py +27 -13
  17. examples/widgets/personal_organizer/list_projects.py +22 -7
  18. examples/widgets/personal_organizer/list_todos.py +21 -7
  19. examples/widgets/personal_organizer/view_my_todos.py +23 -24
  20. examples/widgets/personal_organizer/view_open_todos.py +25 -10
  21. {pyegeria-0.5.5.18.dist-info → pyegeria-0.5.5.20.dist-info}/METADATA +1 -1
  22. {pyegeria-0.5.5.18.dist-info → pyegeria-0.5.5.20.dist-info}/RECORD +25 -24
  23. {pyegeria-0.5.5.18.dist-info → pyegeria-0.5.5.20.dist-info}/entry_points.txt +1 -0
  24. {pyegeria-0.5.5.18.dist-info → pyegeria-0.5.5.20.dist-info}/LICENSE +0 -0
  25. {pyegeria-0.5.5.18.dist-info → pyegeria-0.5.5.20.dist-info}/WHEEL +0 -0
@@ -11,7 +11,7 @@ versions. First, we assume that the view-server used by AutomatedCuration is cal
11
11
  assume that the user password is always "secret".
12
12
 
13
13
  """
14
-
14
+ import os
15
15
  import argparse
16
16
  import time
17
17
 
@@ -26,14 +26,25 @@ from pyegeria._exceptions import (
26
26
  UserNotAuthorizedException,
27
27
  print_exception_response,
28
28
  )
29
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
31
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
32
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
36
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
39
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
29
40
 
30
41
  disable_ssl_warnings = True
31
42
 
32
43
 
33
44
  def display_integration_daemon_status(integ_server: str, integ_url: str,
34
- view_server:str, view_url: str, user: str):
45
+ view_server:str, view_url: str, user: str, user_pass:str):
35
46
  s_client = ServerOps(integ_server, integ_url, user)
36
- a_client = AutomatedCuration(view_server, view_url, user, "secret")
47
+ a_client = AutomatedCuration(view_server, view_url, user, user_pass)
37
48
  token = a_client.create_egeria_bearer_token()
38
49
 
39
50
  def generate_table() -> Table:
@@ -126,16 +137,18 @@ def main():
126
137
  parser.add_argument("--view_server", help="Name of the view server to use")
127
138
  parser.add_argument("--view_url", help="view server URL Platform to connect to")
128
139
  parser.add_argument("--userid", help="User Id")
140
+ parser.add_argument("--password", help="User Password")
129
141
  args = parser.parse_args()
130
142
 
131
- integ_server = args.integ_server if args.integ_server is not None else "integration-daemon"
132
- integ_url = args.integ_url if args.integ_url is not None else "https://localhost:9443"
133
- view_server = args.view_server if args.view_server is not None else "view-server"
134
- view_url = args.view_url if args.view_url is not None else "https://localhost:9443"
135
- userid = args.userid if args.userid is not None else 'garygeeke'
143
+ integ_server = args.integ_server if args.integ_server is not None else EGERIA_INTEGRATION_DAEMON
144
+ integ_url = args.integ_url if args.integ_url is not None else EGERIA_INTEGRATION_DAEMON_URL
145
+ view_server = args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
146
+ view_url = args.view_url if args.view_url is not None else EGERIA_VIEW_SERVER_URL
147
+ userid = args.userid if args.userid is not None else EGERIA_USER
148
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
136
149
  display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
137
150
  view_server = view_server, view_url = view_url,
138
- user=userid)
151
+ user=userid, user_pass = user_pass)
139
152
 
140
153
  if __name__ == "__main__":
141
154
  main()
@@ -22,23 +22,24 @@ from rich.console import Console
22
22
 
23
23
  from pyegeria import RuntimeManager
24
24
 
25
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
25
26
  EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
26
27
  EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
27
28
  EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
28
29
  EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
29
30
  EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
31
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
30
32
  EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
31
33
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
32
34
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
33
35
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
34
36
 
35
-
36
37
  disable_ssl_warnings = True
37
38
  console = Console(width=200)
38
39
 
39
- def display_status(server: str, url: str, username: str):
40
+ def display_status(server: str, url: str, username: str, user_pass:str):
40
41
  r_client = RuntimeManager(server, url, username)
41
- token = r_client.create_egeria_bearer_token(username, "secret")
42
+ token = r_client.create_egeria_bearer_token(username, user_pass)
42
43
  def generate_table() -> Table:
43
44
  """Make a new table."""
44
45
  table = Table(
@@ -126,13 +127,15 @@ def main():
126
127
  parser.add_argument("--server", help="Name of the server to display status for")
127
128
  parser.add_argument("--url", help="URL Platform to connect to")
128
129
  parser.add_argument("--userid", help="User Id")
130
+ parser.add_argument("--password", help="User Password")
129
131
  args = parser.parse_args()
130
132
 
131
133
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
132
134
  url = args.url if args.url is not None else EGERIA_PLATFORM_URL
133
135
  userid = args.userid if args.userid is not None else EGERIA_USER
136
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
134
137
 
135
- display_status(server, url, userid)
138
+ display_status(server, url, userid, user_pass)
136
139
 
137
140
 
138
141
  if __name__ == "__main__":
@@ -8,7 +8,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple server status display
10
10
  """
11
-
11
+ import os
12
12
  import time
13
13
  import argparse
14
14
 
@@ -26,9 +26,21 @@ from pyegeria.core_omag_server_config import CoreServerConfig
26
26
 
27
27
  disable_ssl_warnings = True
28
28
 
29
- def display_status(server: str, url: str, username: str):
29
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
31
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
32
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
36
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
39
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
40
+
41
+ def display_status(server: str, url: str, username: str, user_pass:str):
30
42
  p_client = ServerOps(server, url, username)
31
- c_client = CoreServerConfig(server, url, username)
43
+ c_client = CoreServerConfig(server, url, username, user_pass)
32
44
 
33
45
  def generate_table() -> Table:
34
46
  """Make a new table."""
@@ -84,13 +96,15 @@ def main():
84
96
  parser.add_argument("--server", help="Name of the server to display status for")
85
97
  parser.add_argument("--url", help="URL Platform to connect to")
86
98
  parser.add_argument("--userid", help="User Id")
99
+ parser.add_argument("--password", help="User Password")
87
100
  args = parser.parse_args()
88
101
 
89
- server = args.server if args.server is not None else "active-metadata-store"
90
- url = args.url if args.url is not None else "https://localhost:9443"
91
- userid = args.userid if args.userid is not None else 'garygeeke'
102
+ server = args.server if args.server is not None else EGERIA_METADATA_STORE
103
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
104
+ userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
105
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
92
106
 
93
- display_status(server, url, userid)
107
+ display_status(server, url, userid, user_pass)
94
108
 
95
109
  if __name__ == "__main__":
96
110
  main()
@@ -8,7 +8,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple server status display
10
10
  """
11
-
11
+ import os
12
12
  import time
13
13
  import argparse
14
14
 
@@ -22,10 +22,20 @@ from pyegeria import (
22
22
  from rich.table import Table
23
23
  from rich.live import Live
24
24
 
25
-
26
-
27
- def test_display_status(server: str, url: str , username: str ):
28
- p_client = ServerOps(server, url, username)
25
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
26
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
27
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
28
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
29
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
30
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
31
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
32
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
33
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
34
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
35
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
36
+
37
+ def test_display_status(server: str, url: str , username: str , user_pass:str):
38
+ p_client = ServerOps(server, url, username, user_pass)
29
39
 
30
40
  def generate_table() -> Table:
31
41
  """Make a new table."""
@@ -77,13 +87,15 @@ def main():
77
87
  parser.add_argument("--server", help="Name of the server to display status for")
78
88
  parser.add_argument("--url", help="URL Platform to connect to")
79
89
  parser.add_argument("--userid", help="User Id")
90
+ parser.add_argument("--password", help="User Password")
80
91
  args = parser.parse_args()
81
92
 
82
- server = args.server if args.server is not None else "active-metadata-store"
83
- url = args.url if args.url is not None else "https://localhost:9443"
84
- userid = args.userid if args.userid is not None else 'garygeeke'
93
+ server = args.server if args.server is not None else EGERIA_METADATA_STORE
94
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
95
+ userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
96
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
85
97
 
86
- test_display_status(server, url, userid)
98
+ test_display_status(server, url, userid, user_pass)
87
99
 
88
100
  if __name__ == "__main__":
89
101
  main()
@@ -8,9 +8,10 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple display for my profile
10
10
  """
11
-
11
+ import os
12
12
  import argparse
13
13
  import time
14
+ import sys
14
15
 
15
16
  from rich import box
16
17
  from rich.console import Console
@@ -25,13 +26,26 @@ from pyegeria import (
25
26
  from pyegeria.my_profile_omvs import MyProfile
26
27
 
27
28
  disable_ssl_warnings = True
28
-
29
-
30
- def display_my_profiles(server: str, url: str, username: str):
31
-
32
- m_client = MyProfile(server, url, user_id=username)
33
- token = m_client.create_egeria_bearer_token(username, "secret")
29
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
31
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
32
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
36
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
39
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
40
+
41
+ def display_my_profiles(server: str, url: str, username: str, user_pass:str):
42
+
43
+ m_client = MyProfile(server, url, user_id=username, user_pwd=user_pass)
44
+ token = m_client.create_egeria_bearer_token(username, user_pass)
34
45
  my_profiles = m_client.get_my_profile()
46
+ if type(my_profiles) is str:
47
+ print(f"No profiles found for {username}")
48
+ sys.exit(1)
35
49
 
36
50
  def generate_table() -> Table:
37
51
  """Make a new table."""
@@ -102,16 +116,16 @@ def main():
102
116
  parser.add_argument("--server", help="Name of the server to display status for")
103
117
  parser.add_argument("--url", help="URL Platform to connect to")
104
118
  parser.add_argument("--userid", help="User Id")
119
+ parser.add_argument("--password", help="User Password")
105
120
 
106
121
  args = parser.parse_args()
107
122
 
108
- server = args.server if args.server is not None else "view-server"
109
- url = args.url if args.url is not None else "https://localhost:9443"
110
- userid = args.userid if args.userid is not None else 'erinoverview'
111
- # guid = args.guid if args.guid is not None else None
112
- guid = None
123
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
124
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
125
+ userid = args.userid if args.userid is not None else EGERIA_USER
126
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
113
127
 
114
- display_my_profiles(server, url, userid)
128
+ display_my_profiles(server, url, userid, user_pass)
115
129
 
116
130
  if __name__ == "__main__":
117
131
  main()
@@ -9,7 +9,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
9
9
 
10
10
  A simple display for glossary terms
11
11
  """
12
-
12
+ import os
13
13
  import argparse
14
14
  import json
15
15
  import time
@@ -28,12 +28,24 @@ from pyegeria import (
28
28
  )
29
29
  from pyegeria import ProjectManager
30
30
 
31
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
32
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
33
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
34
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
35
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
36
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
37
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
38
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
39
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
40
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
41
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
42
+
31
43
 
32
44
  def display_list(project_name: str, server: str, url: str,
33
- username: str, save_output: bool):
45
+ username: str, user_pass: str, save_output: bool):
34
46
 
35
47
  p_client = ProjectManager(server, url, user_id=username)
36
- token = p_client.create_egeria_bearer_token(username, "secret")
48
+ token = p_client.create_egeria_bearer_token(username, user_pass)
37
49
 
38
50
  def generate_table(project_name: str) -> Table:
39
51
  """Make a new table."""
@@ -126,16 +138,19 @@ def main():
126
138
  parser.add_argument("--url", help="URL Platform to connect to")
127
139
  parser.add_argument("--userid", help="User Id")
128
140
  parser.add_argument("--save-output", help="Save output to file?")
141
+ parser.add_argument("--password", help="User Password")
129
142
  # parser.add_argument("--sponsor", help="Name of sponsor to search")
130
143
  args = parser.parse_args()
131
144
 
132
- server = args.server if args.server is not None else "view-server"
133
- url = args.url if args.url is not None else "https://localhost:9443"
134
- userid = args.userid if args.userid is not None else 'erinoverview'
145
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
146
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
147
+ userid = args.userid if args.userid is not None else EGERIA_USER
148
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
149
+
135
150
  save_output = args.save_output if args.save_output is not None else False
136
151
  project_name = Prompt.ask("Enter the Project to retrieve:", default="*")
137
152
 
138
- display_list(project_name, server, url, userid, save_output)
153
+ display_list(project_name, server, url, userid, user_pass, save_output)
139
154
 
140
155
  if __name__ == "__main__":
141
156
  main()
@@ -9,7 +9,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
9
9
 
10
10
  A simple display for glossary terms
11
11
  """
12
-
12
+ import os
13
13
  import argparse
14
14
  import time
15
15
 
@@ -26,11 +26,23 @@ from pyegeria import (
26
26
  )
27
27
  from pyegeria.my_profile_omvs import MyProfile
28
28
 
29
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
31
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
32
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
33
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
34
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
35
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
36
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
39
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
40
+
29
41
 
30
- def display_to_dos(search_string: str, guid:str, server: str, url: str, username: str):
42
+ def display_to_dos(search_string: str, guid:str, server: str, url: str, username: str, user_pass:str):
31
43
 
32
44
  m_client = MyProfile(server, url, user_id=username)
33
- token = m_client.create_egeria_bearer_token(username, "secret")
45
+ token = m_client.create_egeria_bearer_token(username, user_pass)
34
46
 
35
47
  def generate_table(search_string:str = '*') -> Table:
36
48
  """Make a new table."""
@@ -112,16 +124,18 @@ def main():
112
124
  parser.add_argument("--server", help="Name of the server to display status for")
113
125
  parser.add_argument("--url", help="URL Platform to connect to")
114
126
  parser.add_argument("--userid", help="User Id")
127
+ parser.add_argument("--password", help="User Password")
115
128
  # parser.add_argument("--sponsor", help="Name of sponsor to search")
116
129
  args = parser.parse_args()
117
130
 
118
- server = args.server if args.server is not None else "view-server"
119
- url = args.url if args.url is not None else "https://localhost:9443"
120
- userid = args.userid if args.userid is not None else 'erinoverview'
131
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
132
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
133
+ userid = args.userid if args.userid is not None else EGERIA_USER
134
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
121
135
  guid = None
122
136
 
123
137
  search_string = Prompt.ask("Enter the ToDo you are searching for:", default="*")
124
- display_to_dos(search_string, guid,server, url, userid)
138
+ display_to_dos(search_string, guid,server, url, userid, user_pass)
125
139
 
126
140
  if __name__ == "__main__":
127
141
  main()
@@ -8,7 +8,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple status display of a user's todos
10
10
  """
11
-
11
+ import os
12
12
  import argparse
13
13
  import time
14
14
 
@@ -24,28 +24,24 @@ from pyegeria import (
24
24
  )
25
25
  from pyegeria.my_profile_omvs import MyProfile
26
26
 
27
- disable_ssl_warnings = True
28
-
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"
27
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
28
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
29
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
30
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
31
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
32
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
33
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
34
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
35
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
36
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
37
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
32
38
 
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 = ""
39
+ disable_ssl_warnings = True
44
40
 
45
41
 
46
- def display_todos(server: str = good_server_4, url: str = good_platform1_url, user: str = good_user_1):
42
+ def display_todos(server: str, url: str, user: str, user_pass:str):
47
43
  m_client = MyProfile(server, url, user_id=user)
48
- token = m_client.create_egeria_bearer_token(user, "secret")
44
+ token = m_client.create_egeria_bearer_token(user, user_pass)
49
45
 
50
46
  def add_rows(table: Table, guid: str, identity: str) -> None:
51
47
  todo_items = m_client.get_assigned_actions(guid)
@@ -92,7 +88,7 @@ def display_todos(server: str = good_server_4, url: str = good_platform1_url, us
92
88
  def generate_table() -> Table:
93
89
  """Make a new table."""
94
90
  table = Table(
95
- title=f"Open ToDos for Platform {good_platform1_url} @ {time.asctime()}",
91
+ title=f"Open ToDos for Platform {url} @ {time.asctime()}",
96
92
  # style = "black on grey66",
97
93
  header_style="white on dark_blue",
98
94
  show_lines=True,
@@ -147,13 +143,16 @@ def main():
147
143
  parser.add_argument("--server", help="Name of the view server to connect to")
148
144
  parser.add_argument("--url", help="URL Platform to connect to")
149
145
  parser.add_argument("--userid", help="User Id")
146
+ parser.add_argument("--password", help="User Password")
150
147
  args = parser.parse_args()
151
148
 
152
- server = args.server if args.server is not None else "view-server"
153
- url = args.url if args.url is not None else "https://localhost:9443"
154
- userid = args.userid if args.userid is not None else 'erinoverview'
149
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
150
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
151
+ userid = args.userid if args.userid is not None else EGERIA_USER
152
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
153
+
155
154
  print(f"Starting display_todos with {server}, {url}, {userid}")
156
- display_todos(server=server, url=url, user=userid)
155
+ display_todos(server=server, url=url, user=userid, user_pass=user_pass)
157
156
 
158
157
  if __name__ == "__main__":
159
158
  main()
@@ -8,10 +8,10 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple status display for Open To Dos
10
10
  """
11
-
11
+ import os
12
12
  import argparse
13
13
  import time
14
-
14
+ import sys
15
15
  from rich import box
16
16
  from rich.live import Live
17
17
  from rich.table import Table
@@ -27,10 +27,22 @@ from pyegeria._exceptions import (
27
27
  from pyegeria.my_profile_omvs import MyProfile
28
28
  disable_ssl_warnings = True
29
29
 
30
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
32
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
33
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
34
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
35
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
36
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
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')
30
41
 
31
- def display_todos(server: str , url: str, user: str):
42
+
43
+ def display_todos(server: str , url: str, user: str, user_pass:str):
32
44
  m_client = MyProfile(server, url, user_id=user)
33
- token = m_client.create_egeria_bearer_token(user, "secret")
45
+ token = m_client.create_egeria_bearer_token(user, user_pass)
34
46
 
35
47
  def generate_table(search_string:str = '*') -> Table:
36
48
  """Make a new table."""
@@ -55,7 +67,9 @@ def display_todos(server: str , url: str, user: str):
55
67
  table.add_column("Sponsor")
56
68
 
57
69
  todo_items = m_client.find_to_do("*", starts_with=True)
58
-
70
+ if type(todo_items) is str:
71
+ print("===> No To Do items found")
72
+ sys.exit()
59
73
  if todo_items is None:
60
74
  name = " "
61
75
  type_name = " "
@@ -110,13 +124,14 @@ def main():
110
124
  parser.add_argument("--server", help="Name of the view server to connect to")
111
125
  parser.add_argument("--url", help="URL Platform to connect to")
112
126
  parser.add_argument("--userid", help="User Id")
127
+ parser.add_argument("--password", help="User Password")
113
128
  args = parser.parse_args()
114
129
 
115
- server = args.server if args.server is not None else "view-server"
116
- url = args.url if args.url is not None else "https://localhost:9443"
117
- userid = args.userid if args.userid is not None else 'erinoverview'
118
- print(f"Starting display_todos with {server}, {url}, {userid}")
119
- display_todos(server=server, url=url, user=userid)
130
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
131
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
132
+ userid = args.userid if args.userid is not None else EGERIA_USER
133
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
134
+ display_todos(server=server, url=url, user=userid, user_pass=user_pass)
120
135
 
121
136
 
122
137
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.5.18
3
+ Version: 0.5.5.20
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -3,7 +3,7 @@ examples/doc_samples/Create_Sustainability_Collection_Sample.py,sha256=iLBm1LwRL
3
3
  examples/widgets/catalog_user/README.md,sha256=aCCVo7iqyE-XGEvmoYXnkIGM0VskF95JTj6Egzec7LM,883
4
4
  examples/widgets/catalog_user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  examples/widgets/catalog_user/list_assets.py,sha256=EjVFRMyDLsyK_PCO0Zw4tyXemHXiyfj30O1WhjcmdE8,4687
6
- examples/widgets/catalog_user/view_asset_graph.py,sha256=VBj8jrdulhyteSAgDve6JYihd6UArWOeXwWVzeZaQgg,10447
6
+ examples/widgets/catalog_user/view_asset_graph.py,sha256=WXKOPn03-FrSTutRGsSEsCEYCZp_ArxblOLYiF0dwOU,10552
7
7
  examples/widgets/catalog_user/view_collection.py,sha256=8MAsHZL9ooDOdMnxREWC7mLGxG419WUAliThjkSee_M,4331
8
8
  examples/widgets/catalog_user/view_glossary.py,sha256=CGqKMiS-qENi67T2igQXvprIHm3tfYfE8ApDEAppGos,4898
9
9
  examples/widgets/developer/README.md,sha256=nxDnfr3BCiGgW5G1VxWxiwUWJXIe5wreNuUeRyIt_hY,1343
@@ -12,29 +12,30 @@ examples/widgets/developer/get_guid_info.py,sha256=CVNq56pNFC1kKk3ZnnLJsDx83e1Ww
12
12
  examples/widgets/developer/get_tech_details.py,sha256=gLhuvUo1MP-qJdal38b6duOclbixWbDk4ySZqM8EBtQ,5386
13
13
  examples/widgets/developer/list_asset_types.py,sha256=waXn2DW9dHfRLnHYdCeGrafwPcAv029ZFAYTy51U40g,3791
14
14
  examples/widgets/developer/list_registered_services.py,sha256=Ch8gtvhNIE-XIt2Gr6lLYGJKJ6zSX-mkgQ7HhQ-EMpA,5897
15
- examples/widgets/developer/list_relationship_types.py,sha256=ruXH_6vIcnCuJvLc-zokvjnbIit1WQ33uRGSpipRuPo,4216
16
- examples/widgets/developer/list_tech_templates.py,sha256=UPeuLq9jITpiPT3q_FM-k8-4tKYUNQHaYfqw1VOOlDY,5110
17
- examples/widgets/developer/list_tech_types.py,sha256=K8lBr6o0-rk3niyRAe76E1X5M70yI38F556rzeZGSTQ,3941
18
- examples/widgets/developer/list_valid_metadata_values.py,sha256=JMfkJe-hscrNJAqgQO7ehA6BaiB71r9Fs2eWvwUBheE,5275
15
+ examples/widgets/developer/list_relationship_types.py,sha256=F2uYEgPPOBqRilTJU980rIi4fdgPaFmeUqDsSeoLqA4,5149
16
+ examples/widgets/developer/list_tech_templates.py,sha256=xP7X1TLkS8mIDzBnk_bQ94_Gw1YtZlNFlwcYF8MVusw,5732
17
+ examples/widgets/developer/list_tech_types.py,sha256=SJF3KKsuwdoH-Sg0puh-r76i8f9LhkHdDhE8cmWOhks,4152
18
+ examples/widgets/developer/list_valid_metadata_values.py,sha256=jBKiM_xSihYvzkveDgPM6ZIELkdGqVYBFaVLVl4ujv8,5531
19
19
  examples/widgets/operational/README.md,sha256=PJsSDcvMv6E6og6y-cwvxFX5lhCII0UCwgKiM1T17MQ,1595
20
20
  examples/widgets/operational/__init__.py,sha256=8ebdyTD7i-XXyZr0vDx6jnXalE6QjhCvu7n6YXxwgL0,112
21
- examples/widgets/operational/get_tech_type_elements.py,sha256=3hrVRVXm7HnzcEhQSUuKMtidXM-fgMcUh69nbqORQ2w,4902
22
- examples/widgets/operational/get_tech_type_template.py,sha256=3BVnvAAB01n69UAAwJxTnh_uS2PKNsEEeEqs2cSbysc,4932
23
- examples/widgets/operational/view_asset_events.py,sha256=bVGQ1OLg6yK3z1CIqAhytoAb3NP1TWSK2gSTdDDUHpE,2633
21
+ examples/widgets/operational/get_tech_type_elements.py,sha256=zSyY3RMXDNqifG3w28LJo6cnKL4hGUKnXByfhJeAyQE,5838
22
+ examples/widgets/operational/get_tech_type_template.py,sha256=4dL7mm2BMftTysoMpajRgUlisw1cjvx_w2CT2MwPotU,5857
23
+ examples/widgets/operational/refresh_integration_daemon.py,sha256=7GF_xzO83nhvTaxJR2DMI7fsHg6TA4xaIy7z8YNbSlk,2274
24
+ examples/widgets/operational/view_asset_events.py,sha256=D_3jVN2PiTdXdvrUpo6f-m8E-MWXEG23-CQcHqyR2zs,3396
24
25
  examples/widgets/operational/view_coco_status.py,sha256=QloMgVcXL2Fx2XHyk71PKCwmzRfc_Q_cAvpyomcYi_Y,3322
25
- examples/widgets/operational/view_eng_action_status.py,sha256=sCkQh5XRDq0u6ZObxmUA0-wUhUoVMdV6_ho_d4PAdqw,4973
26
- examples/widgets/operational/view_gov_eng_status.py,sha256=EApPezGh6p_WkejmLLm9OudgJnMGGagu7UCU2HwLZb4,3369
27
- examples/widgets/operational/view_integ_daemon_status.py,sha256=9GEqKl_ZYmnEa4-WmBjoTefaxFhqt0ShcyxybqC7lmA,5850
28
- examples/widgets/operational/view_platform_status.py,sha256=LT7AfTEJwty_lSWOVB6uDzBDZ64xTt4LPzoTkwHnuag,5133
29
- examples/widgets/operational/view_server_list.py,sha256=j1V5RJ8kwGkyQO8nbygtD5W-85TVO4TsR3SbnKD2eDM,3125
30
- examples/widgets/operational/view_server_status.py,sha256=slooQbjhdbTdRXZcRCHbZGUBtlHCO61xHa1J1P-iRKE,2826
26
+ examples/widgets/operational/view_eng_action_status.py,sha256=5KHNKMSHxe4-nEIyLJjcaWUBrbV3JcP6ijri5KmmVaA,5969
27
+ examples/widgets/operational/view_gov_eng_status.py,sha256=vcXUSNIuZNh2JxhtNHskmNLa7FnaHJj-tmWfuCvRdnw,4404
28
+ examples/widgets/operational/view_integ_daemon_status.py,sha256=Ivuz0gHLWonVw9cWRs6EuH4U2HQgMLsLOnvTW-KPmlU,6918
29
+ examples/widgets/operational/view_platform_status.py,sha256=kRSOWhhcKUr5w5RWC2igYDTxQQjso200zGb0AOJS-XU,5499
30
+ examples/widgets/operational/view_server_list.py,sha256=GVEZ9iMg85haZA3kHE6dZxTYI6Ph94wkC8zhwo5JiU0,4178
31
+ examples/widgets/operational/view_server_status.py,sha256=kwJYe5iOrlfdGLlpAYWS29iBw9JkLOWPimZhMg6f_-Y,3877
31
32
  examples/widgets/personal_organizer/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
32
33
  examples/widgets/personal_organizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- examples/widgets/personal_organizer/get_my_profile.py,sha256=RCtEIKnvJZLTT3N2xU4zewSoEwpnj1r3HCAyidFfcbM,3743
34
- examples/widgets/personal_organizer/list_projects.py,sha256=jybGE1Ve0LfoAiwZd5ltIGJL4nmR37Bwma0cWbloOsY,5027
35
- examples/widgets/personal_organizer/list_todos.py,sha256=selzDcncGluu8Q3UYRa7Y3O-IkXblKVcR-fd1rctR1w,4203
36
- examples/widgets/personal_organizer/view_my_todos.py,sha256=7MGGoxWeoBOuUSsFgu0nlDypJh35n0uruk-IHNsCclA,5497
37
- examples/widgets/personal_organizer/view_open_todos.py,sha256=W_C1yT8usJV9E5BTQP7UeA1ISuDUanszqlWf75mtLZk,3995
34
+ examples/widgets/personal_organizer/get_my_profile.py,sha256=Xt2anVXadJdJDgmCJEb0I_rRfcZ44mMM0ltRrA9KZJM,4843
35
+ examples/widgets/personal_organizer/list_projects.py,sha256=AYCvKnxYKInRIB2FIFax0kjUH4zyZhKoV2vefgPmwVo,6070
36
+ examples/widgets/personal_organizer/list_todos.py,sha256=55mUAx1hCANh2WGeDT54ByXiN3VTWXGKtdx-P4TopWQ,5244
37
+ examples/widgets/personal_organizer/view_my_todos.py,sha256=oIWmIObQSOizGE0Z-lYRzPUBr2MSFDHhC-BUvyoMseY,6052
38
+ examples/widgets/personal_organizer/view_open_todos.py,sha256=TLXpRpkJrTxz87_2KHZDlPbJNWXGO4wRouSQM9pVuw4,5093
38
39
  pyegeria/Xfeedback_manager_omvs.py,sha256=uNQMOPG08UyIuLzBfYt4uezDyLWdpBgJ2ZuvqumaWuY,9231
39
40
  pyegeria/Xloaded_resources_omvs.py,sha256=cseWZTIwNhkzhZ0fhujI66DslNAQcjuwsz_p1GRmSPQ,3392
40
41
  pyegeria/__init__.py,sha256=EI2XPKvlin9TOyELgzmVl8nToZukeZpmbaEbZkx1PX0,2074
@@ -60,8 +61,8 @@ pyegeria/runtime_manager_omvs.py,sha256=WekK7Yeyn6Qu9YmbSDo3m57MN0xOsIm9M8kGHfRO
60
61
  pyegeria/server_operations.py,sha256=hEaU6YC0iNEQFvcXYvcE4J6BQKlqMJk33nViCNIEBE4,16349
61
62
  pyegeria/utils.py,sha256=lWd0FrHh7DFR1UeOzk3Y1I_xR_zmlFYWL1Pci-ZuZmw,5342
62
63
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
63
- pyegeria-0.5.5.18.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
64
- pyegeria-0.5.5.18.dist-info/METADATA,sha256=Ij6B2xi9dwFwN5Z-T6QYSwVrZdFlfuz-fPfBKRKNHeE,2612
65
- pyegeria-0.5.5.18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
66
- pyegeria-0.5.5.18.dist-info/entry_points.txt,sha256=yR22RzRO974vzRMeo7_ysc-_5pxHmgnvyk8FHTZviOw,1950
67
- pyegeria-0.5.5.18.dist-info/RECORD,,
64
+ pyegeria-0.5.5.20.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
65
+ pyegeria-0.5.5.20.dist-info/METADATA,sha256=DIsZPSRkC4aFyirkDGNtpF7K7iVLzhvs7St0D7vIsSE,2612
66
+ pyegeria-0.5.5.20.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
67
+ pyegeria-0.5.5.20.dist-info/entry_points.txt,sha256=WgNY6OkZlWQ5uwE_qtyfVyuOX-dnOKyH0cW2JlKRIJ0,2038
68
+ pyegeria-0.5.5.20.dist-info/RECORD,,