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
@@ -28,12 +28,12 @@ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9
28
28
  EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
29
29
  EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
30
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')
31
32
  EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
32
33
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
33
34
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
34
35
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
35
36
 
36
-
37
37
  disable_ssl_warnings = True
38
38
  console = Console(width=200)
39
39
 
@@ -7,7 +7,7 @@ Copyright Contributors to the ODPi Egeria project.
7
7
 
8
8
  Get valid relationship types.
9
9
  """
10
-
10
+ import os
11
11
  import argparse
12
12
  import time
13
13
 
@@ -24,13 +24,23 @@ from pyegeria import (
24
24
  print_exception_response,
25
25
  )
26
26
  from pyegeria import ValidMetadataManager
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_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')
27
37
 
28
38
 
29
39
  def display_list(type_name:str, server: str, url: str ,
30
- username: str, save_output: bool = False):
40
+ username: str, user_pass:str, save_output: bool = False):
31
41
 
32
42
  p_client = ValidMetadataManager(server, url, user_id=username)
33
- token = p_client.create_egeria_bearer_token(username, "secret")
43
+ token = p_client.create_egeria_bearer_token(username, user_pass)
34
44
 
35
45
  def generate_table(type_name: str) -> Table:
36
46
  """Make a new table."""
@@ -109,17 +119,19 @@ def main():
109
119
  parser.add_argument("--server", help="Name of the server to display status for")
110
120
  parser.add_argument("--url", help="URL Platform to connect to")
111
121
  parser.add_argument("--userid", help="User Id")
122
+ parser.add_argument("--password", help="User Password")
112
123
  parser.add_argument("--save-output", help="Save output to file?")
113
124
 
114
125
  args = parser.parse_args()
115
126
 
116
- server = args.server if args.server is not None else "view-server"
117
- url = args.url if args.url is not None else "https://localhost:9443"
118
- userid = args.userid if args.userid is not None else 'erinoverview'
127
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
128
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
129
+ userid = args.userid if args.userid is not None else EGERIA_USER
130
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
119
131
  save_output = args.save_output if args.save_output is not None else False
120
132
  type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
121
133
 
122
- display_list(type_name, server, url, userid, save_output)
134
+ display_list(type_name, server, url, userid, user_pass,save_output)
123
135
 
124
136
  if __name__ == "__main__":
125
137
  main()
@@ -1,7 +1,7 @@
1
1
  """This creates a templates guid file from the core metadata archive"""
2
2
  from rich.markdown import Markdown
3
3
  from rich.prompt import Prompt
4
-
4
+ import os
5
5
  from pyegeria import AutomatedCuration
6
6
  from datetime import datetime
7
7
  import argparse
@@ -21,16 +21,23 @@ from pyegeria import (
21
21
 
22
22
 
23
23
  console = Console()
24
- server = "active-metadata-server"
25
- platform = "https://localhost:9443"
26
- user = "erinoverview"
27
- password = "secret"
24
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
25
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
26
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
27
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
28
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
29
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
30
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
31
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
32
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
33
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
34
+
28
35
 
29
- def display_tech_types(search_string:str = "*", server: str = server,
30
- url: str = platform, username: str = user, password: str = password,):
36
+ def display_tech_types(search_string:str, server: str,
37
+ url: str, username: str, password: str):
31
38
 
32
39
  a_client = AutomatedCuration(server, url, username)
33
- token = a_client.create_egeria_bearer_token(user, password)
40
+ token = a_client.create_egeria_bearer_token(username, password)
34
41
  tech_list = a_client.find_technology_types(search_string, page_size=0)
35
42
 
36
43
  def generate_table() -> Table:
@@ -118,10 +125,10 @@ def main():
118
125
 
119
126
  args = parser.parse_args()
120
127
 
121
- server = args.server if args.server is not None else "view-server"
122
- url = args.url if args.url is not None else "https://localhost:9443"
123
- userid = args.userid if args.userid is not None else 'erinoverview'
124
- password = args.password if args.password is not None else 'secret'
128
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
129
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
130
+ userid = args.userid if args.userid is not None else EGERIA_USER
131
+ password = args.password if args.password is not None else EGERIA_USER_PASSWORD
125
132
  guid = None
126
133
 
127
134
  search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
@@ -8,7 +8,7 @@ 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 sys
14
14
  import time
@@ -26,38 +26,29 @@ from pyegeria import (
26
26
  AutomatedCuration
27
27
  )
28
28
 
29
- disable_ssl_warnings = True
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"
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_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
36
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
37
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
38
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
38
39
 
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 = ""
40
+ disable_ssl_warnings = True
50
41
 
51
42
 
52
- def display_tech_types(search_string:str = "*", server: str = good_server_3, url: str = good_platform1_url, username: str = good_user_2):
43
+ def display_tech_types(search_string:str, server: str, url: str, username: str, user_pass: str):
53
44
  a_client = AutomatedCuration(server, url, username)
54
- token = a_client.create_egeria_bearer_token(good_user_2, "secret")
45
+ token = a_client.create_egeria_bearer_token(username, user_pass)
55
46
  tech_list = a_client.find_technology_types(search_string, page_size=0)
56
47
 
57
48
  def generate_table() -> Table:
58
49
  """Make a new table."""
59
50
  table = Table(
60
- title=f"Technology Types for: {good_platform1_url} @ {time.asctime()}",
51
+ title=f"Technology Types for: {url} @ {time.asctime()}",
61
52
  # style = "black on grey66",
62
53
  header_style="white on dark_blue",
63
54
  show_lines=True,
@@ -110,17 +101,18 @@ def main():
110
101
  parser.add_argument("--server", help="Name of the server to display status for")
111
102
  parser.add_argument("--url", help="URL Platform to connect to")
112
103
  parser.add_argument("--userid", help="User Id")
104
+ parser.add_argument("--password", help="User Password")
113
105
 
114
106
  args = parser.parse_args()
115
107
 
116
- server = args.server if args.server is not None else "view-server"
117
- url = args.url if args.url is not None else "https://localhost:9443"
118
- userid = args.userid if args.userid is not None else 'erinoverview'
119
- # guid = args.guid if args.guid is not None else None
120
- guid = None
108
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
109
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
110
+ userid = args.userid if args.userid is not None else EGERIA_USER
111
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
112
+
121
113
  search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
122
114
 
123
- display_tech_types(search_string, server, url, userid)
115
+ display_tech_types(search_string, server, url, userid, user_pass)
124
116
 
125
117
  if __name__ == "__main__":
126
118
  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
@@ -27,35 +27,22 @@ from pyegeria import (
27
27
  print_exception_response,
28
28
  )
29
29
  from pyegeria import ValidMetadataManager
30
-
31
- disable_ssl_warnings = True
32
-
33
- good_platform1_url = "https://127.0.0.1:9443"
34
- good_platform2_url = "https://egeria.pdr-associates.com:7443"
35
- bad_platform1_url = "https://localhost:9443"
36
-
37
- # good_platform1_url = "https://127.0.0.1:30080"
38
- # good_platform2_url = "https://127.0.0.1:30081"
39
- # bad_platform1_url = "https://localhost:9443"
40
-
41
- good_user_1 = "garygeeke"
42
- good_user_2 = "erinoverview"
43
- bad_user_1 = "eviledna"
44
- bad_user_2 = ""
45
-
46
- good_server_1 = "active-metadata-store"
47
- good_server_2 = "simple-metadata-store"
48
- good_server_3 = "view-server"
49
- good_server_4 = "engine-host"
50
- bad_server_1 = "coco"
51
- bad_server_2 = ""
52
-
53
-
54
- def display_values(property_name: str, type_name: str=None, server: str = good_server_3, url: str = good_platform1_url,
55
- username: str = good_user_2, save_output: bool = False):
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_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_values(property_name: str, type_name: str, server: str, url: str,
42
+ username: str, user_pass:str, save_output: bool):
56
43
 
57
44
  m_client = ValidMetadataManager(server, url, user_id=username)
58
- token = m_client.create_egeria_bearer_token(username, "secret")
45
+ token = m_client.create_egeria_bearer_token(username, user_pass)
59
46
 
60
47
  def generate_table(property_name: str, type_name: str) -> Table:
61
48
  """Make a new table."""
@@ -131,16 +118,18 @@ def main():
131
118
  parser.add_argument("--url", help="URL Platform to connect to")
132
119
  parser.add_argument("--userid", help="User Id")
133
120
  parser.add_argument("--save-output", help="Save output to file?")
121
+ parser.add_argument("--password", help="User Password")
134
122
  # parser.add_argument("--sponsor", help="Name of sponsor to search")
135
123
  args = parser.parse_args()
136
124
 
137
- server = args.server if args.server is not None else "view-server"
138
- url = args.url if args.url is not None else "https://localhost:9443"
139
- userid = args.userid if args.userid is not None else 'erinoverview'
125
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
126
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
127
+ userid = args.userid if args.userid is not None else EGERIA_USER
128
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
140
129
  save_output = args.save_output if args.save_output is not None else False
141
130
  property_name = Prompt.ask("Enter the Property to retrieve:", default="projectHealth")
142
131
  type_name = Prompt.ask("Enter the Metadata Type to filter on:", default="Project")
143
- display_values(property_name, type_name,server, url, userid, save_output)
132
+ display_values(property_name, type_name,server, url, userid, user_pass, save_output)
144
133
 
145
- if __name__ == "__main__":
146
- main()
134
+ if __name__ == "__main__":
135
+ main()
@@ -8,6 +8,7 @@ Display the status of cataloged platforms and servers.
8
8
  import sys
9
9
  import time
10
10
  import argparse
11
+ import os
11
12
 
12
13
  from rich import json
13
14
  from rich.panel import Panel
@@ -29,12 +30,23 @@ from rich.panel import Panel
29
30
  from rich.text import Text
30
31
  from rich import print
31
32
 
33
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
34
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
35
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
36
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
37
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
38
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
39
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
40
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
41
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
42
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
43
+
32
44
  disable_ssl_warnings = True
33
45
  console = Console(width=200)
34
46
 
35
47
  guid_list = []
36
48
 
37
- def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
49
+ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str):
38
50
 
39
51
  def build_classifications(classification: dict) -> Markdown:
40
52
 
@@ -62,7 +74,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
62
74
  a_client = AutomatedCuration(server_name, platform_url,
63
75
  user_id=user)
64
76
 
65
- token = a_client.create_egeria_bearer_token(user, "secret")
77
+ token = a_client.create_egeria_bearer_token(user, user_pass)
66
78
  tech_elements = a_client.get_technology_type_elements(tech_name, get_templates=False)
67
79
  if type(tech_elements) is str:
68
80
  console.print(f"No elements found for {tech_name}")
@@ -123,14 +135,16 @@ def main():
123
135
  parser.add_argument("--server", help="Name of the server to display status for")
124
136
  parser.add_argument("--url", help="URL Platform to connect to")
125
137
  parser.add_argument("--userid", help="User Id")
138
+ parser.add_argument("--password", help="User Password")
126
139
  args = parser.parse_args()
127
140
 
128
- server = args.server if args.server is not None else "view-server"
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 'erinoverview'
141
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
142
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
143
+ userid = args.userid if args.userid is not None else EGERIA_USER
144
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
131
145
 
132
146
  tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
133
- tech_viewer(tech_name,server, url, userid)
147
+ tech_viewer(tech_name,server, url, userid, user_pass)
134
148
 
135
149
  if __name__ == "__main__":
136
150
  main()
@@ -6,8 +6,8 @@ Copyright Contributors to the ODPi Egeria project.
6
6
  Display the status of cataloged platforms and servers.
7
7
  """
8
8
  import argparse
9
- import sys
10
9
 
10
+ import os
11
11
  from rich import print
12
12
  from rich.console import Console
13
13
  from rich.markdown import Markdown
@@ -23,12 +23,23 @@ from pyegeria import (
23
23
  AutomatedCuration
24
24
  )
25
25
 
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_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
+
26
37
  disable_ssl_warnings = True
27
38
  console = Console(width=200)
28
39
 
29
40
  guid_list = []
30
41
 
31
- def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
42
+ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str, user_pass:str):
32
43
 
33
44
  def build_classifications(classification: dict) -> Markdown:
34
45
 
@@ -56,7 +67,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
56
67
  a_client = AutomatedCuration(server_name, platform_url,
57
68
  user_id=user)
58
69
 
59
- token = a_client.create_egeria_bearer_token(user, "secret")
70
+ token = a_client.create_egeria_bearer_token(user, user_pass)
60
71
  tech_elements = a_client.get_technology_type_elements(tech_name, get_templates=True)
61
72
  if (len(tech_elements) >= 1) and (type(tech_elements) is list):
62
73
  tree = Tree(f"Deployed Technology Type: {tech_name}", style="bold bright_white", guide_style="bold bright_blue")
@@ -116,14 +127,16 @@ def main():
116
127
  parser.add_argument("--server", help="Name of the server to display status for")
117
128
  parser.add_argument("--url", help="URL Platform to connect to")
118
129
  parser.add_argument("--userid", help="User Id")
130
+ parser.add_argument("--password", help="User Password")
119
131
  args = parser.parse_args()
120
132
 
121
- server = args.server if args.server is not None else "view-server"
122
- url = args.url if args.url is not None else "https://localhost:9443"
123
- userid = args.userid if args.userid is not None else 'erinoverview'
133
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
134
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
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
124
137
 
125
138
  tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
126
- tech_viewer(tech_name,server, url, userid)
139
+ tech_viewer(tech_name,server, url, userid, user_pass)
127
140
 
128
141
  if __name__ == "__main__":
129
142
  main()
@@ -0,0 +1,64 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+
5
+
6
+
7
+ This script refreshed an integration daemon.
8
+
9
+ """
10
+
11
+ import os
12
+ import argparse
13
+ import time
14
+
15
+ from pyegeria import ServerOps, AutomatedCuration
16
+ from pyegeria._exceptions import (
17
+ InvalidParameterException,
18
+ PropertyServerException,
19
+ UserNotAuthorizedException,
20
+ print_exception_response,
21
+ )
22
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
24
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
25
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
26
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
27
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
28
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get('EGERIA_INTEGRATION_DAEMON_URL', 'https://localhost:9443')
29
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
30
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
31
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
32
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
33
+
34
+
35
+
36
+
37
+ def main():
38
+ parser = argparse.ArgumentParser()
39
+ parser.add_argument("--server", help="Name of the integration daemon to refresh")
40
+ parser.add_argument("--url", help="URL Platform to connect to")
41
+ parser.add_argument("--userid", help="User Id")
42
+ parser.add_argument("--password", help="User Password")
43
+ args = parser.parse_args()
44
+
45
+ server = args.server if args.server is not None else EGERIA_INTEGRATION_DAEMON
46
+ url = args.url if args.url is not None else EGERIA_INTEGRATION_DAEMON_URL
47
+ userid = args.userid if args.userid is not None else EGERIA_ADMIN_USER
48
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
49
+
50
+ try:
51
+
52
+ s_client = ServerOps(server, url, userid)
53
+
54
+ s_client.refresh_integration_connectors(None, server)
55
+
56
+ print(f"\n===> Integration Daemon: \'{server}\' was refreshed.")
57
+
58
+
59
+ except (InvalidParameterException, PropertyServerException) as e:
60
+ print_exception_response(e)
61
+
62
+
63
+ if __name__ == "__main__":
64
+ main()
@@ -17,6 +17,18 @@ from rich.console import Console
17
17
  from rich.markdown import Markdown
18
18
  from confluent_kafka import Consumer, KafkaException
19
19
 
20
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
21
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
22
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
23
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
24
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
25
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
26
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
27
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
28
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
29
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
30
+
31
+
20
32
  def main():
21
33
 
22
34
  disable_ssl_warnings = True
@@ -28,7 +40,7 @@ def main():
28
40
 
29
41
  # Define the Kafka consumer configuration.
30
42
  config = {
31
- 'bootstrap.servers': 'localhost:9092', # replace with your Kafka broker(s)
43
+ 'bootstrap.servers': EGERIA_KAFKA_ENDPOINT, # replace with your Kafka broker(s)
32
44
  'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
33
45
  'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
34
46
  }
@@ -11,13 +11,13 @@ A simple status display for Engine Actions
11
11
 
12
12
  import argparse
13
13
  import json
14
+ import os
14
15
  import sys
15
16
  import time
16
17
 
17
18
  from rich import box
18
- from rich.console import Console
19
- from rich.table import Table
20
19
  from rich.live import Live
20
+ from rich.table import Table
21
21
 
22
22
  from pyegeria import AutomatedCuration
23
23
  from pyegeria import (
@@ -27,11 +27,23 @@ from pyegeria import (
27
27
  print_exception_response,
28
28
  )
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_ENGINE_HOST = os.environ.get('INTEGRATION_ENGINE_HOST', 'engine-host')
36
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
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
+
30
42
  disable_ssl_warnings = True
31
43
 
32
44
 
33
- def display_status_engine_actions(server: str, url: str, user: str):
34
- g_client = AutomatedCuration(server, url, user, user_pwd="secret")
45
+ def display_status_engine_actions(server: str, url: str, user: str, user_pass:str):
46
+ g_client = AutomatedCuration(server, url, user, user_pwd=user_pass)
35
47
 
36
48
  def generate_table() -> Table:
37
49
  """Make a new table."""
@@ -123,13 +135,15 @@ def main():
123
135
  parser.add_argument("--server", help="Name of the server to display status for")
124
136
  parser.add_argument("--url", help="URL Platform to connect to")
125
137
  parser.add_argument("--userid", help="User Id")
138
+ parser.add_argument("--password", help="User Password")
126
139
  args = parser.parse_args()
127
140
 
128
- server = args.server if args.server is not None else "view-server"
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
- print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
132
- display_status_engine_actions(server=server, url=url, user=userid)
141
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
142
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
143
+ userid = args.userid if args.userid is not None else EGERIA_USER
144
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
145
+ # print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
146
+ display_status_engine_actions(server=server, url=url, user=userid, user_pass=user_pass)
133
147
 
134
148
  if __name__ == "__main__":
135
149
  main()
@@ -8,7 +8,7 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple status display for Governance Actions
10
10
  """
11
-
11
+ import os
12
12
  import time
13
13
  import json
14
14
  import argparse
@@ -25,12 +25,23 @@ from rich import box
25
25
  from rich import console
26
26
 
27
27
  from pyegeria.server_operations import ServerOps
28
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
29
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
30
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
31
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
32
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
33
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
34
+ EGERIA_ENGINE_HOST = os.environ.get('INTEGRATION_ENGINE_HOST', 'engine-host')
35
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
36
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
37
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
38
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
28
39
 
29
40
  disable_ssl_warnings = True
30
41
 
31
- def display_gov_actions_status(server: str, url: str, username: str):
42
+ def display_gov_actions_status(server: str, url: str, username: str, user_pass:str):
32
43
  server_name = server
33
- s_client = ServerOps(server_name, url, username)
44
+ s_client = ServerOps(server_name, url, username, user_pass)
34
45
 
35
46
  def generate_table() -> Table:
36
47
  """Make a new table."""
@@ -90,12 +101,14 @@ def main():
90
101
  parser.add_argument("--server", help="Name of the server to display status for")
91
102
  parser.add_argument("--url", help="URL Platform to connect to")
92
103
  parser.add_argument("--userid", help="User Id")
104
+ parser.add_argument("--password", help="User Password")
93
105
  args = parser.parse_args()
94
106
 
95
- server = args.server if args.server is not None else "engine-host"
96
- url = args.url if args.url is not None else "https://localhost:9443"
97
- userid = args.userid if args.userid is not None else 'garygeeke'
98
- display_gov_actions_status(server=server, url=url, username=userid)
107
+ server = args.server if args.server is not None else EGERIA_ENGINE_HOST
108
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
109
+ userid = args.userid if args.userid is not None else EGERIA_USER
110
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
111
+ display_gov_actions_status(server=server, url=url, username=userid, user_pass=user_pass)
99
112
 
100
113
  if __name__ == "__main__":
101
114
  main()