pyegeria 0.5.6.2__py3-none-any.whl → 0.5.6.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -142,16 +142,14 @@ def main_live():
142
142
  parser.add_argument("--url", help="URL Platform to connect to")
143
143
  parser.add_argument("--userid", help="User Id")
144
144
  parser.add_argument("--password", help="User Password")
145
- parser.add_argument("--paging", help="Paging (True) or Monitoring (False)")
145
+
146
146
  args = parser.parse_args()
147
147
 
148
148
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
149
149
  url = args.url if args.url is not None else EGERIA_PLATFORM_URL
150
150
  userid = args.userid if args.userid is not None else EGERIA_USER
151
151
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
152
- paging = args.paging if args.paging is not None else False
153
- # print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
154
- # print(f"Paging is {paging}")
152
+
155
153
  display_status_engine_actions(server=server, url=url, user=userid, user_pass=user_pass, paging=False)
156
154
 
157
155
  def main_paging():
@@ -160,16 +158,14 @@ def main_paging():
160
158
  parser.add_argument("--url", help="URL Platform to connect to")
161
159
  parser.add_argument("--userid", help="User Id")
162
160
  parser.add_argument("--password", help="User Password")
163
- parser.add_argument("--paging", help="Paging (True) or Monitoring (False)")
161
+
164
162
  args = parser.parse_args()
165
163
 
166
164
  server = args.server if args.server is not None else EGERIA_VIEW_SERVER
167
165
  url = args.url if args.url is not None else EGERIA_PLATFORM_URL
168
166
  userid = args.userid if args.userid is not None else EGERIA_USER
169
167
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
170
- paging = args.paging if args.paging is not None else False
171
- # print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
172
- # print(f"Paging is {paging}")
168
+
173
169
  display_status_engine_actions(server=server, url=url, user=userid, user_pass=user_pass, paging=True)
174
170
 
175
171
  if __name__ == "__main_live__":
@@ -21,7 +21,7 @@ from pyegeria import (
21
21
  )
22
22
  from rich.table import Table
23
23
  from rich.live import Live
24
- from rich import box
24
+ from rich import box, Console
25
25
  from rich import console
26
26
 
27
27
  from pyegeria.server_operations import ServerOps
@@ -39,7 +39,7 @@ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
39
39
 
40
40
  disable_ssl_warnings = True
41
41
 
42
- def display_gov_actions_status(server: str, url: str, username: str, user_pass:str):
42
+ def display_gov_actions_status(server: str, url: str, username: str, user_pass:str, paging:bool):
43
43
  server_name = server
44
44
  s_client = ServerOps(server_name, url, username, user_pass)
45
45
 
@@ -86,10 +86,15 @@ def display_gov_actions_status(server: str, url: str, username: str, user_pass:s
86
86
  return table
87
87
 
88
88
  try:
89
- with Live(generate_table(), refresh_per_second=1, screen=True, vertical_overflow="visible") as live:
90
- while True:
91
- time.sleep(2)
92
- live.update(generate_table())
89
+ if paging is True:
90
+ console = Console()
91
+ with console.pager():
92
+ console.print(generate_table())
93
+ else:
94
+ with Live(generate_table(), refresh_per_second=1, screen=True, vertical_overflow="visible") as live:
95
+ while True:
96
+ time.sleep(2)
97
+ live.update(generate_table())
93
98
 
94
99
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
95
100
  print_exception_response(e)
@@ -99,7 +104,7 @@ def display_gov_actions_status(server: str, url: str, username: str, user_pass:s
99
104
  s_client.close_session()
100
105
 
101
106
 
102
- def main():
107
+ def main_live():
103
108
  parser = argparse.ArgumentParser()
104
109
  parser.add_argument("--server", help="Name of the server to display status for")
105
110
  parser.add_argument("--url", help="URL Platform to connect to")
@@ -111,7 +116,25 @@ def main():
111
116
  url = args.url if args.url is not None else EGERIA_PLATFORM_URL
112
117
  userid = args.userid if args.userid is not None else EGERIA_USER
113
118
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
114
- display_gov_actions_status(server=server, url=url, username=userid, user_pass=user_pass)
119
+ display_gov_actions_status(server=server, url=url, username=userid, user_pass=user_pass, paging=False)
115
120
 
116
- if __name__ == "__main__":
117
- main()
121
+ def main_paging():
122
+ parser = argparse.ArgumentParser()
123
+ parser.add_argument("--server", help="Name of the server to display status for")
124
+ parser.add_argument("--url", help="URL Platform to connect to")
125
+ parser.add_argument("--userid", help="User Id")
126
+ parser.add_argument("--password", help="User Password")
127
+ args = parser.parse_args()
128
+
129
+ server = args.server if args.server is not None else EGERIA_ENGINE_HOST
130
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
131
+ userid = args.userid if args.userid is not None else EGERIA_USER
132
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
133
+ display_gov_actions_status(server=server, url=url, username=userid, user_pass=user_pass, paging=True)
134
+
135
+ if __name__ == "__main_live__":
136
+ main_live()
137
+
138
+
139
+ if __name__ == "__main_paging__":
140
+ main_paging()
@@ -16,7 +16,7 @@ import argparse
16
16
  import time
17
17
  from datetime import datetime
18
18
 
19
- from rich import box
19
+ from rich import box, Console
20
20
  from rich.live import Live
21
21
  from rich.table import Table
22
22
 
@@ -43,7 +43,7 @@ disable_ssl_warnings = True
43
43
 
44
44
 
45
45
  def display_integration_daemon_status(integ_server: str, integ_url: str,
46
- view_server:str, view_url: str, user: str, user_pass:str):
46
+ view_server:str, view_url: str, user: str, user_pass:str, paging: bool):
47
47
  s_client = ServerOps(integ_server, integ_url, user)
48
48
  a_client = AutomatedCuration(view_server, view_url, user, user_pass)
49
49
  token = a_client.create_egeria_bearer_token()
@@ -119,11 +119,16 @@ def display_integration_daemon_status(integ_server: str, integ_url: str,
119
119
  return table
120
120
 
121
121
  try:
122
- with Live(generate_table(), refresh_per_second=4, screen=True) as live:
123
- while True:
124
- time.sleep(2)
125
- live.update(generate_table())
126
- live.console.pager()
122
+ if paging is True:
123
+ console = Console()
124
+ with console.pager():
125
+ console.print(generate_table())
126
+ else:
127
+ with Live(generate_table(), refresh_per_second=1, screen=True, vertical_overflow="visible") as live:
128
+ while True:
129
+ time.sleep(2)
130
+ live.update(generate_table())
131
+
127
132
 
128
133
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
129
134
  print_exception_response(e)
@@ -134,7 +139,27 @@ def display_integration_daemon_status(integ_server: str, integ_url: str,
134
139
  a_client.close_session()
135
140
 
136
141
 
137
- def main():
142
+ def main_live():
143
+ parser = argparse.ArgumentParser()
144
+ parser.add_argument("--integ_server", help="Name of the integration server to display status for")
145
+ parser.add_argument("--integ_url", help="URL Platform to connect to")
146
+ parser.add_argument("--view_server", help="Name of the view server to use")
147
+ parser.add_argument("--view_url", help="view server URL Platform to connect to")
148
+ parser.add_argument("--userid", help="User Id")
149
+ parser.add_argument("--password", help="User Password")
150
+ args = parser.parse_args()
151
+
152
+ integ_server = args.integ_server if args.integ_server is not None else EGERIA_INTEGRATION_DAEMON
153
+ integ_url = args.integ_url if args.integ_url is not None else EGERIA_INTEGRATION_DAEMON_URL
154
+ view_server = args.view_server if args.view_server is not None else EGERIA_VIEW_SERVER
155
+ view_url = args.view_url if args.view_url is not None else EGERIA_VIEW_SERVER_URL
156
+ userid = args.userid if args.userid is not None else EGERIA_USER
157
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
158
+ display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
159
+ view_server = view_server, view_url = view_url,
160
+ user=userid, user_pass = user_pass, paging = False)
161
+
162
+ def main_paging():
138
163
  parser = argparse.ArgumentParser()
139
164
  parser.add_argument("--integ_server", help="Name of the integration server to display status for")
140
165
  parser.add_argument("--integ_url", help="URL Platform to connect to")
@@ -152,7 +177,9 @@ def main():
152
177
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
153
178
  display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
154
179
  view_server = view_server, view_url = view_url,
155
- user=userid, user_pass = user_pass)
180
+ user=userid, user_pass = user_pass, paging = True)
181
+ if __name__ == "__main_live__":
182
+ main_live()
156
183
 
157
- if __name__ == "__main__":
158
- main()
184
+ if __name__ == "__main_paging__":
185
+ main_paging()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.6.2
3
+ Version: 0.5.6.3
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -22,9 +22,9 @@ examples/widgets/operational/get_tech_type_elements.py,sha256=_wSZOShJ17kuMlgh8x
22
22
  examples/widgets/operational/get_tech_type_template.py,sha256=qIb-JYcoI_YR7NHUKH7TSdq56QI1H4QuyqWTvldNKNo,5866
23
23
  examples/widgets/operational/monitor_asset_events.py,sha256=u9kNtkdVxOwi1LYYlaKup_fG5b2vJj8zdF74mvEHGek,3686
24
24
  examples/widgets/operational/monitor_coco_status.py,sha256=QloMgVcXL2Fx2XHyk71PKCwmzRfc_Q_cAvpyomcYi_Y,3322
25
- examples/widgets/operational/monitor_eng_action_status.py,sha256=HgqdUKv4twOJiybtJ-Dj9p5w-U6tlUJ0V2e4E6JIxYY,7527
26
- examples/widgets/operational/monitor_gov_eng_status.py,sha256=6HI_cp_cOPptWYQ5WMoDdWctwwfzTqYLmJMOoIGb6ec,4543
27
- examples/widgets/operational/monitor_integ_daemon_status.py,sha256=WJKqdQcWrW9R_OGD5lj34-4oQFOt8mVlPGONIp17kj0,7172
25
+ examples/widgets/operational/monitor_eng_action_status.py,sha256=oK0BT9OeuRw47R8vJbCQP_UbGta6Dt-F1DAO3Ib_bC8,7003
26
+ examples/widgets/operational/monitor_gov_eng_status.py,sha256=WUVKJSULsLH2_wO4C9xluHgSsFcNquPpG_tT2UfKveA,5579
27
+ examples/widgets/operational/monitor_integ_daemon_status.py,sha256=cNgcvmhzIdSQWsVZwpmg8Shc8vLNKoiE8ja-QxohIgQ,8776
28
28
  examples/widgets/operational/monitor_platform_status.py,sha256=xjTgRIj9JvUWQ5BVAp7qmyS5fSxa6MnfY3SWHsuWx6w,5700
29
29
  examples/widgets/operational/monitor_server_list.py,sha256=nOPeMjUAxMqfv0aq5zZtgkKa5Yqo6wXdC3nImQQNRmI,4317
30
30
  examples/widgets/operational/monitor_server_status.py,sha256=rjVMacuwTLwKZ_bmZ_2TkyZTY2QpiMRZM3MCX3ERHMc,4016
@@ -62,8 +62,8 @@ pyegeria/runtime_manager_omvs.py,sha256=WekK7Yeyn6Qu9YmbSDo3m57MN0xOsIm9M8kGHfRO
62
62
  pyegeria/server_operations.py,sha256=5AhT2gUQwFjbwFOK3d1s1Xc0x8J1FGBdl6xQrLCsJ34,16534
63
63
  pyegeria/utils.py,sha256=f8isUaKDy-GJxhwswWgP_bw6q1CUzBUNVcCtin8N1cA,5433
64
64
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
65
- pyegeria-0.5.6.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
66
- pyegeria-0.5.6.2.dist-info/METADATA,sha256=UUt31IVPBbfHMFAogrrBW6Y9Yskf27RaoskLTqOQAXI,2611
67
- pyegeria-0.5.6.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
68
- pyegeria-0.5.6.2.dist-info/entry_points.txt,sha256=vT_U01-puPptZXvUDlHAi4jpJCAn6qrDS0pClmOGjXI,2191
69
- pyegeria-0.5.6.2.dist-info/RECORD,,
65
+ pyegeria-0.5.6.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
66
+ pyegeria-0.5.6.3.dist-info/METADATA,sha256=bCi9r8GF5Fsu5ka7RF7Y_PzOLDYmTzYJZuJVqKXG3uI,2611
67
+ pyegeria-0.5.6.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
68
+ pyegeria-0.5.6.3.dist-info/entry_points.txt,sha256=7KEZOLbKUX_wVBjbKWfnGYQmwiuRR1yeIKeyXIGcJHk,2379
69
+ pyegeria-0.5.6.3.dist-info/RECORD,,
@@ -9,6 +9,8 @@ list_asset_types=examples.widgets.developer.list_asset_types:main
9
9
  list_assets=examples.widgets.catalog_user.list_assets:main
10
10
  list_eng_action_status=examples.widgets.operational.monitor_eng_action_status:main_paging
11
11
  list_glossary=examples.widgets.catalog_user.list_glossary:main
12
+ list_gov_eng_status=examples.widgets.operational.monitor_gov_eng_status:main_paging
13
+ list_integ_daemon_status=examples.widgets.operational.monitor_integ_daemon_status:main_paging
12
14
  list_my_profile=examples.widgets.personal_organizer.list_my_profile:main
13
15
  list_projects=examples.widgets.personal_organizer.list_projects:main
14
16
  list_registered_services=examples.widgets.developer.list_registered_services:main
@@ -20,8 +22,8 @@ list_valid_metadata_values=examples.widgets.developer.list_valid_metadata_values
20
22
  monitor_asset_events=examples.widgets.operational.monitor_asset_events:main
21
23
  monitor_coco_status=examples.widgets.operational.monitor_coco_status:main
22
24
  monitor_eng_action_status=examples.widgets.operational.monitor_eng_action_status:main_live
23
- monitor_gov_eng_status=examples.widgets.operational.monitor_gov_eng_status:main
24
- monitor_integ_daemon_status=examples.widgets.operational.monitor_integ_daemon_status:main
25
+ monitor_gov_eng_status=examples.widgets.operational.monitor_gov_eng_status:main_live
26
+ monitor_integ_daemon_status=examples.widgets.operational.monitor_integ_daemon_status:main_live
25
27
  monitor_my_todos=examples.widgets.personal_organizer.monitor_my_todos:main
26
28
  monitor_open_todos=examples.widgets.personal_organizer.monitor_open_todos:main
27
29
  monitor_platform_status=examples.widgets.operational.monitor_platform_status:main