pyegeria 0.5.0__py3-none-any.whl → 0.5.2__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.
- examples/doc_samples/Create_Collection_Sample.py +292 -0
- examples/doc_samples/Create_Sustainability_Collection_Sample.py +115 -0
- examples/widgets/catalog_user/__init__.py +0 -10
- examples/widgets/catalog_user/list_assets.py +5 -2
- examples/widgets/catalog_user/view_asset_graph.py +15 -11
- examples/widgets/catalog_user/view_collection.py +4 -1
- examples/widgets/catalog_user/view_glossary.py +5 -2
- examples/widgets/developer/get_guid_info.py +7 -8
- examples/widgets/developer/get_tech_details.py +10 -21
- examples/widgets/developer/list_asset_types.py +4 -1
- examples/widgets/developer/list_registered_services.py +4 -1
- examples/widgets/developer/list_relationship_types.py +5 -3
- examples/widgets/developer/list_tech_templates.py +3 -2
- examples/widgets/developer/list_tech_types.py +4 -2
- examples/widgets/developer/list_valid_metadata_values.py +14 -12
- examples/widgets/operational/__init__.py +7 -0
- examples/widgets/operational/get_tech_type_elements.py +4 -1
- examples/widgets/operational/get_tech_type_template.py +10 -13
- examples/widgets/operational/view_asset_events.py +48 -47
- examples/widgets/operational/view_coco_status.py +4 -1
- examples/widgets/operational/view_eng_action_status.py +4 -1
- examples/widgets/operational/view_gov_eng_status.py +4 -1
- examples/widgets/operational/view_integ_daemon_status.py +4 -3
- examples/widgets/operational/view_platform_status.py +5 -1
- examples/widgets/operational/view_server_list.py +4 -1
- examples/widgets/operational/view_server_status.py +6 -1
- examples/widgets/personal_organizer/get_my_profile.py +5 -2
- examples/widgets/personal_organizer/list_projects.py +5 -3
- examples/widgets/personal_organizer/list_todos.py +5 -2
- examples/widgets/personal_organizer/view_my_todos.py +7 -10
- examples/widgets/personal_organizer/view_open_todos.py +5 -1
- {src/pyegeria → pyegeria}/__init__.py +3 -2
- {src/pyegeria → pyegeria}/utils.py +59 -61
- {pyegeria-0.5.0.dist-info → pyegeria-0.5.2.dist-info}/METADATA +8 -9
- pyegeria-0.5.2.dist-info/RECORD +67 -0
- pyegeria-0.5.2.dist-info/entry_points.txt +29 -0
- pyegeria-0.5.0.dist-info/RECORD +0 -66
- pyegeria-0.5.0.dist-info/entry_points.txt +0 -5
- src/pyegeria/config.toml +0 -11
- {src/pyegeria → pyegeria}/Xfeedback_manager_omvs.py +0 -0
- {src/pyegeria → pyegeria}/Xloaded_resources_omvs.py +0 -0
- {src/pyegeria → pyegeria}/_client.py +0 -0
- {src/pyegeria → pyegeria}/_deprecated_gov_engine.py +0 -0
- {src/pyegeria → pyegeria}/_exceptions.py +0 -0
- {src/pyegeria → pyegeria}/_globals.py +0 -0
- {src/pyegeria → pyegeria}/_validators.py +0 -0
- {src/pyegeria → pyegeria}/action_author_omvs.py +0 -0
- {src/pyegeria → pyegeria}/asset_catalog_omvs.py +0 -0
- {src/pyegeria → pyegeria}/automated_curation_omvs.py +0 -0
- {src/pyegeria → pyegeria}/collection_manager_omvs.py +0 -0
- {src/pyegeria → pyegeria}/core_guids.py +0 -0
- {src/pyegeria → pyegeria}/core_omag_server_config.py +0 -0
- {src/pyegeria → pyegeria}/full_omag_server_config.py +0 -0
- {src/pyegeria → pyegeria}/glossary_browser_omvs.py +0 -0
- {src/pyegeria → pyegeria}/glossary_manager_omvs.py +0 -0
- {src/pyegeria → pyegeria}/my_profile_omvs.py +0 -0
- {src/pyegeria → pyegeria}/platform_services.py +0 -0
- {src/pyegeria → pyegeria}/project_manager_omvs.py +0 -0
- {src/pyegeria → pyegeria}/registered_info.py +0 -0
- {src/pyegeria → pyegeria}/runtime_manager_omvs.py +0 -0
- {src/pyegeria → pyegeria}/server_operations.py +0 -0
- {src/pyegeria → pyegeria}/valid_metadata_omvs.py +0 -0
- {pyegeria-0.5.0.dist-info → pyegeria-0.5.2.dist-info}/LICENSE +0 -0
- {pyegeria-0.5.0.dist-info → pyegeria-0.5.2.dist-info}/WHEEL +0 -0
@@ -116,7 +116,7 @@ def display_registered_svcs(service: str, server: str , url: str,
|
|
116
116
|
a_client.close_session()
|
117
117
|
|
118
118
|
|
119
|
-
|
119
|
+
def main():
|
120
120
|
parser = argparse.ArgumentParser()
|
121
121
|
parser.add_argument("--server", help="Name of the server to display status for")
|
122
122
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -133,3 +133,6 @@ if __name__ == "__main__":
|
|
133
133
|
svc_kind = Prompt.ask("Enter the service type you are searching for:", default="all")
|
134
134
|
|
135
135
|
display_registered_svcs(svc_kind, server, url, userid, password=password)
|
136
|
+
|
137
|
+
if __name__ == "__main__":
|
138
|
+
main()
|
@@ -104,8 +104,7 @@ def display_list(type_name:str, server: str, url: str ,
|
|
104
104
|
else:
|
105
105
|
print_exception_response(e)
|
106
106
|
|
107
|
-
|
108
|
-
|
107
|
+
def main():
|
109
108
|
parser = argparse.ArgumentParser()
|
110
109
|
parser.add_argument("--server", help="Name of the server to display status for")
|
111
110
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -120,4 +119,7 @@ if __name__ == "__main__":
|
|
120
119
|
save_output = args.save_output if args.save_output is not None else False
|
121
120
|
type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
|
122
121
|
|
123
|
-
display_list(type_name, server, url, userid, save_output)
|
122
|
+
display_list(type_name, server, url, userid, save_output)
|
123
|
+
|
124
|
+
if __name__ == "__main__":
|
125
|
+
main()
|
@@ -109,7 +109,7 @@ def display_tech_types(search_string:str = "*", server: str = server,
|
|
109
109
|
a_client.close_session()
|
110
110
|
|
111
111
|
|
112
|
-
|
112
|
+
def main():
|
113
113
|
parser = argparse.ArgumentParser()
|
114
114
|
parser.add_argument("--server", help="Name of the server to display status for")
|
115
115
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -128,7 +128,8 @@ if __name__ == "__main__":
|
|
128
128
|
|
129
129
|
display_tech_types(search_string, server, url, userid, password)
|
130
130
|
|
131
|
-
|
131
|
+
if __name__ == "__main__":
|
132
|
+
main()
|
132
133
|
|
133
134
|
|
134
135
|
|
@@ -23,7 +23,6 @@ from pyegeria import (
|
|
23
23
|
PropertyServerException,
|
24
24
|
UserNotAuthorizedException,
|
25
25
|
print_exception_response,
|
26
|
-
RegisteredInfo,
|
27
26
|
AutomatedCuration
|
28
27
|
)
|
29
28
|
|
@@ -106,7 +105,7 @@ def display_tech_types(search_string:str = "*", server: str = good_server_3, url
|
|
106
105
|
a_client.close_session()
|
107
106
|
|
108
107
|
|
109
|
-
|
108
|
+
def main():
|
110
109
|
parser = argparse.ArgumentParser()
|
111
110
|
parser.add_argument("--server", help="Name of the server to display status for")
|
112
111
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -122,3 +121,6 @@ if __name__ == "__main__":
|
|
122
121
|
search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
|
123
122
|
|
124
123
|
display_tech_types(search_string, server, url, userid)
|
124
|
+
|
125
|
+
if __name__ == "__main__":
|
126
|
+
main()
|
@@ -10,22 +10,22 @@ 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
29
|
from pyegeria import ValidMetadataManager
|
30
30
|
|
31
31
|
disable_ssl_warnings = True
|
@@ -125,8 +125,7 @@ def display_values(property_name: str, type_name: str=None, server: str = good_s
|
|
125
125
|
else:
|
126
126
|
print_exception_response(e)
|
127
127
|
|
128
|
-
|
129
|
-
|
128
|
+
def main():
|
130
129
|
parser = argparse.ArgumentParser()
|
131
130
|
parser.add_argument("--server", help="Name of the server to display status for")
|
132
131
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -141,4 +140,7 @@ if __name__ == "__main__":
|
|
141
140
|
save_output = args.save_output if args.save_output is not None else False
|
142
141
|
property_name = Prompt.ask("Enter the Property to retrieve:", default="projectHealth")
|
143
142
|
type_name = Prompt.ask("Enter the Metadata Type to filter on:", default="Project")
|
144
|
-
display_values(property_name, type_name,server, url, userid, save_output)
|
143
|
+
display_values(property_name, type_name,server, url, userid, save_output)
|
144
|
+
|
145
|
+
if __name__ == "__main__":
|
146
|
+
main()
|
@@ -121,7 +121,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
|
|
121
121
|
print_exception_response(e)
|
122
122
|
|
123
123
|
|
124
|
-
|
124
|
+
def main():
|
125
125
|
parser = argparse.ArgumentParser()
|
126
126
|
|
127
127
|
parser.add_argument("--server", help="Name of the server to display status for")
|
@@ -135,3 +135,6 @@ if __name__ == "__main__":
|
|
135
135
|
|
136
136
|
tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
|
137
137
|
tech_viewer(tech_name,server, url, userid)
|
138
|
+
|
139
|
+
if __name__ == "__main__":
|
140
|
+
main()
|
@@ -5,12 +5,15 @@ Copyright Contributors to the ODPi Egeria project.
|
|
5
5
|
|
6
6
|
Display the status of cataloged platforms and servers.
|
7
7
|
"""
|
8
|
-
import sys
|
9
|
-
import time
|
10
8
|
import argparse
|
9
|
+
import sys
|
11
10
|
|
12
|
-
from rich import
|
11
|
+
from rich import print
|
12
|
+
from rich.console import Console
|
13
|
+
from rich.markdown import Markdown
|
13
14
|
from rich.panel import Panel
|
15
|
+
from rich.prompt import Prompt
|
16
|
+
from rich.tree import Tree
|
14
17
|
|
15
18
|
from pyegeria import (
|
16
19
|
InvalidParameterException,
|
@@ -19,15 +22,6 @@ from pyegeria import (
|
|
19
22
|
print_exception_response,
|
20
23
|
AutomatedCuration
|
21
24
|
)
|
22
|
-
from rich.table import Table
|
23
|
-
from rich.live import Live
|
24
|
-
from rich.console import Console
|
25
|
-
from rich.markdown import Markdown
|
26
|
-
from rich.tree import Tree
|
27
|
-
from rich.prompt import Prompt
|
28
|
-
from rich.panel import Panel
|
29
|
-
from rich.text import Text
|
30
|
-
from rich import print
|
31
25
|
|
32
26
|
disable_ssl_warnings = True
|
33
27
|
console = Console(width=200)
|
@@ -121,7 +115,7 @@ def tech_viewer(tech_name: str, server_name:str, platform_url:str, user:str):
|
|
121
115
|
print_exception_response(e)
|
122
116
|
|
123
117
|
|
124
|
-
|
118
|
+
def main():
|
125
119
|
parser = argparse.ArgumentParser()
|
126
120
|
|
127
121
|
parser.add_argument("--server", help="Name of the server to display status for")
|
@@ -135,3 +129,6 @@ if __name__ == "__main__":
|
|
135
129
|
|
136
130
|
tech_name = Prompt.ask("Enter the Asset Name to view:", default="Apache Kafka Server")
|
137
131
|
tech_viewer(tech_name,server, url, userid)
|
132
|
+
|
133
|
+
if __name__ == "__main__":
|
134
|
+
main()
|
@@ -9,69 +9,70 @@ import json
|
|
9
9
|
import sys
|
10
10
|
import time
|
11
11
|
import argparse
|
12
|
-
from confluent_kafka import Consumer, KafkaException
|
13
12
|
from datetime import datetime
|
14
13
|
from rich.prompt import Prompt
|
15
14
|
from rich.table import Table
|
16
15
|
from rich.live import Live
|
17
16
|
from rich.console import Console
|
18
17
|
from rich.markdown import Markdown
|
18
|
+
from confluent_kafka import Consumer, KafkaException
|
19
19
|
|
20
|
-
|
20
|
+
def main():
|
21
21
|
|
22
|
-
disable_ssl_warnings = True
|
23
|
-
console = Console(width=200)
|
24
|
-
now = datetime.now()
|
25
|
-
current_time = now.strftime("%H:%M:%S")
|
22
|
+
disable_ssl_warnings = True
|
23
|
+
console = Console(width=200)
|
24
|
+
now = datetime.now()
|
25
|
+
current_time = now.strftime("%H:%M:%S")
|
26
26
|
|
27
|
-
from
|
27
|
+
earliest_latest = Prompt.ask("Msgs from earliest or latest:", default="earliest")
|
28
28
|
|
29
|
-
|
29
|
+
# Define the Kafka consumer configuration.
|
30
|
+
config = {
|
31
|
+
'bootstrap.servers': 'localhost:9092', # replace with your Kafka broker(s)
|
32
|
+
'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
|
33
|
+
'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
|
34
|
+
}
|
30
35
|
|
31
|
-
#
|
32
|
-
|
33
|
-
'bootstrap.servers': 'localhost:9092', # replace with your Kafka broker(s)
|
34
|
-
'group.id': f"view_asset_events:{current_time}", # replace with your consumer group
|
35
|
-
'auto.offset.reset': earliest_latest # can be set to 'earliest' or 'latest'
|
36
|
-
}
|
36
|
+
# Initialize a Kafka consumer.
|
37
|
+
consumer = Consumer(config)
|
37
38
|
|
38
|
-
#
|
39
|
-
consumer
|
39
|
+
# Subscribe to a Kafka topic.
|
40
|
+
consumer.subscribe(['egeria.omag.server.active-metadata-store.omas.assetconsumer.outTopic']) # replace with your Kafka topic
|
40
41
|
|
41
|
-
|
42
|
-
|
42
|
+
try:
|
43
|
+
while True:
|
44
|
+
msg = consumer.poll(1.0) # timeout set to 1 second
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
if msg is None:
|
47
|
+
continue
|
48
|
+
elif msg.error():
|
49
|
+
raise KafkaException(msg.error())
|
50
|
+
else:
|
51
|
+
event = json.loads(msg.value())
|
52
|
+
event_time = event["eventTime"]
|
53
|
+
event_type = event["eventType"]
|
54
|
+
guid = event["elementHeader"]["guid"]
|
47
55
|
|
48
|
-
|
49
|
-
|
50
|
-
elif msg.error():
|
51
|
-
raise KafkaException(msg.error())
|
52
|
-
else:
|
53
|
-
event = json.loads(msg.value())
|
54
|
-
event_time = event["eventTime"]
|
55
|
-
event_type = event["eventType"]
|
56
|
-
guid = event["elementHeader"]["guid"]
|
56
|
+
type_name = event["elementHeader"]["type"]["typeName"]
|
57
|
+
origin = event["elementHeader"]["origin"]["sourceServer"]
|
57
58
|
|
58
|
-
|
59
|
-
|
59
|
+
element_properties = event["elementProperties"]
|
60
|
+
element_properties_keys = element_properties.keys()
|
61
|
+
props = " "
|
62
|
+
for key in element_properties_keys:
|
63
|
+
value = element_properties[key]
|
64
|
+
props += f"* {key}: {value}\n"
|
65
|
+
console.rule(style= "[bold red]")
|
66
|
+
console.rule(f"\tMessage TimeStamp: {event_time}\t eventType: {event_type}\t typeName: {type_name}\t guid: {guid}")
|
67
|
+
msg = (
|
60
68
|
|
61
|
-
|
62
|
-
|
63
|
-
props = " "
|
64
|
-
for key in element_properties_keys:
|
65
|
-
value = element_properties[key]
|
66
|
-
props += f"* {key}: {value}\n"
|
67
|
-
console.rule(style= "[bold red]")
|
68
|
-
console.rule(f"\tMessage TimeStamp: {event_time}\t eventType: {event_type}\t typeName: {type_name}\t guid: {guid}")
|
69
|
-
msg = (
|
69
|
+
f"properties: \n{props}\n\n")
|
70
|
+
msg = Markdown(msg)
|
70
71
|
|
71
|
-
|
72
|
-
|
72
|
+
console.print(msg)
|
73
|
+
finally:
|
74
|
+
# Close down consumer to commit final offsets.
|
75
|
+
consumer.close()
|
73
76
|
|
74
|
-
|
75
|
-
|
76
|
-
# Close down consumer to commit final offsets.
|
77
|
-
consumer.close()
|
77
|
+
if __name__ == "__main__":
|
78
|
+
main()
|
@@ -85,7 +85,7 @@ def display_status(server: str, url: str, username: str):
|
|
85
85
|
p_client2.close_session()
|
86
86
|
p_client3.close_session()
|
87
87
|
|
88
|
-
|
88
|
+
def main():
|
89
89
|
parser = argparse.ArgumentParser()
|
90
90
|
parser.add_argument("--server", help="Name of the server to display status for")
|
91
91
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -97,3 +97,6 @@ if __name__ == "__main__":
|
|
97
97
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
98
98
|
|
99
99
|
display_status(server, url, userid)
|
100
|
+
|
101
|
+
if __name__ == "__main__":
|
102
|
+
main()
|
@@ -118,7 +118,7 @@ def display_status_engine_actions(server: str, url: str, user: str):
|
|
118
118
|
g_client.close_session()
|
119
119
|
|
120
120
|
|
121
|
-
|
121
|
+
def main():
|
122
122
|
parser = argparse.ArgumentParser()
|
123
123
|
parser.add_argument("--server", help="Name of the server to display status for")
|
124
124
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -130,3 +130,6 @@ if __name__ == "__main__":
|
|
130
130
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
131
131
|
print(f"Starting display_status_engine_actions with {server}, {url}, {userid}")
|
132
132
|
display_status_engine_actions(server=server, url=url, user=userid)
|
133
|
+
|
134
|
+
if __name__ == "__main__":
|
135
|
+
main()
|
@@ -106,7 +106,7 @@ def display_gov_actions_status(server: str = good_server_3, url: str = good_plat
|
|
106
106
|
s_client.close_session()
|
107
107
|
|
108
108
|
|
109
|
-
|
109
|
+
def main():
|
110
110
|
parser = argparse.ArgumentParser()
|
111
111
|
parser.add_argument("--server", help="Name of the server to display status for")
|
112
112
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -117,3 +117,6 @@ if __name__ == "__main__":
|
|
117
117
|
url = args.url if args.url is not None else "https://localhost:9443"
|
118
118
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
119
119
|
display_gov_actions_status(server=server, url=url, username=userid)
|
120
|
+
|
121
|
+
if __name__ == "__main__":
|
122
|
+
main()
|
@@ -17,9 +17,7 @@ import time
|
|
17
17
|
|
18
18
|
from rich import box
|
19
19
|
from rich.live import Live
|
20
|
-
from rich.markdown import Markdown
|
21
20
|
from rich.table import Table
|
22
|
-
from rich.text import Text
|
23
21
|
|
24
22
|
from pyegeria import ServerOps, AutomatedCuration
|
25
23
|
from pyegeria._exceptions import (
|
@@ -121,7 +119,7 @@ def display_integration_daemon_status(integ_server: str, integ_url: str,
|
|
121
119
|
a_client.close_session()
|
122
120
|
|
123
121
|
|
124
|
-
|
122
|
+
def main():
|
125
123
|
parser = argparse.ArgumentParser()
|
126
124
|
parser.add_argument("--integ_server", help="Name of the integration server to display status for")
|
127
125
|
parser.add_argument("--integ_url", help="URL Platform to connect to")
|
@@ -138,3 +136,6 @@ if __name__ == "__main__":
|
|
138
136
|
display_integration_daemon_status(integ_server=integ_server, integ_url=integ_url,
|
139
137
|
view_server = view_server, view_url = view_url,
|
140
138
|
user=userid)
|
139
|
+
|
140
|
+
if __name__ == "__main__":
|
141
|
+
main()
|
@@ -109,7 +109,7 @@ def display_status(server: str, url: str, username: str):
|
|
109
109
|
r_client.close_session()
|
110
110
|
|
111
111
|
|
112
|
-
|
112
|
+
def main():
|
113
113
|
parser = argparse.ArgumentParser()
|
114
114
|
parser.add_argument("--server", help="Name of the server to display status for")
|
115
115
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -121,3 +121,7 @@ if __name__ == "__main__":
|
|
121
121
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
122
122
|
|
123
123
|
display_status(server, url, userid)
|
124
|
+
|
125
|
+
|
126
|
+
if __name__ == "__main__":
|
127
|
+
main()
|
@@ -79,7 +79,7 @@ def display_status(server: str, url: str, username: str):
|
|
79
79
|
c_client.close_session()
|
80
80
|
|
81
81
|
|
82
|
-
|
82
|
+
def main():
|
83
83
|
parser = argparse.ArgumentParser()
|
84
84
|
parser.add_argument("--server", help="Name of the server to display status for")
|
85
85
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -91,3 +91,6 @@ if __name__ == "__main__":
|
|
91
91
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
92
92
|
|
93
93
|
display_status(server, url, userid)
|
94
|
+
|
95
|
+
if __name__ == "__main__":
|
96
|
+
main()
|
@@ -11,6 +11,7 @@ A simple server status display
|
|
11
11
|
|
12
12
|
import time
|
13
13
|
import argparse
|
14
|
+
|
14
15
|
from pyegeria import (
|
15
16
|
InvalidParameterException,
|
16
17
|
PropertyServerException,
|
@@ -22,6 +23,7 @@ from rich.table import Table
|
|
22
23
|
from rich.live import Live
|
23
24
|
|
24
25
|
|
26
|
+
|
25
27
|
def test_display_status(server: str, url: str , username: str ):
|
26
28
|
p_client = ServerOps(server, url, username)
|
27
29
|
|
@@ -70,7 +72,7 @@ def test_display_status(server: str, url: str , username: str ):
|
|
70
72
|
assert e.related_http_code != "200", "Invalid parameters"
|
71
73
|
|
72
74
|
|
73
|
-
|
75
|
+
def main():
|
74
76
|
parser = argparse.ArgumentParser()
|
75
77
|
parser.add_argument("--server", help="Name of the server to display status for")
|
76
78
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -82,3 +84,6 @@ if __name__ == "__main__":
|
|
82
84
|
userid = args.userid if args.userid is not None else 'garygeeke'
|
83
85
|
|
84
86
|
test_display_status(server, url, userid)
|
87
|
+
|
88
|
+
if __name__ == "__main__":
|
89
|
+
main()
|
@@ -97,7 +97,7 @@ def display_my_profiles(server: str, url: str, username: str):
|
|
97
97
|
print_exception_response(e)
|
98
98
|
assert e.related_http_code != "200", "Invalid parameters"
|
99
99
|
|
100
|
-
|
100
|
+
def main():
|
101
101
|
parser = argparse.ArgumentParser()
|
102
102
|
parser.add_argument("--server", help="Name of the server to display status for")
|
103
103
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -111,4 +111,7 @@ if __name__ == "__main__":
|
|
111
111
|
# guid = args.guid if args.guid is not None else None
|
112
112
|
guid = None
|
113
113
|
|
114
|
-
display_my_profiles(server, url, userid)
|
114
|
+
display_my_profiles(server, url, userid)
|
115
|
+
|
116
|
+
if __name__ == "__main__":
|
117
|
+
main()
|
@@ -120,8 +120,7 @@ def display_list(project_name: str, server: str, url: str,
|
|
120
120
|
else:
|
121
121
|
print_exception_response(e)
|
122
122
|
|
123
|
-
|
124
|
-
|
123
|
+
def main():
|
125
124
|
parser = argparse.ArgumentParser()
|
126
125
|
parser.add_argument("--server", help="Name of the server to display status for")
|
127
126
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -136,4 +135,7 @@ if __name__ == "__main__":
|
|
136
135
|
save_output = args.save_output if args.save_output is not None else False
|
137
136
|
project_name = Prompt.ask("Enter the Project to retrieve:", default="*")
|
138
137
|
|
139
|
-
display_list(project_name, server, url, userid, save_output)
|
138
|
+
display_list(project_name, server, url, userid, save_output)
|
139
|
+
|
140
|
+
if __name__ == "__main__":
|
141
|
+
main()
|
@@ -107,7 +107,7 @@ def display_to_dos(search_string: str, guid:str, server: str, url: str, username
|
|
107
107
|
print_exception_response(e)
|
108
108
|
assert e.related_http_code != "200", "Invalid parameters"
|
109
109
|
|
110
|
-
|
110
|
+
def main():
|
111
111
|
parser = argparse.ArgumentParser()
|
112
112
|
parser.add_argument("--server", help="Name of the server to display status for")
|
113
113
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -121,4 +121,7 @@ if __name__ == "__main__":
|
|
121
121
|
guid = None
|
122
122
|
|
123
123
|
search_string = Prompt.ask("Enter the ToDo you are searching for:", default="*")
|
124
|
-
display_to_dos(search_string, guid,server, url, userid)
|
124
|
+
display_to_dos(search_string, guid,server, url, userid)
|
125
|
+
|
126
|
+
if __name__ == "__main__":
|
127
|
+
main()
|
@@ -10,13 +10,11 @@ A simple status display of a user's todos
|
|
10
10
|
"""
|
11
11
|
|
12
12
|
import argparse
|
13
|
-
import json
|
14
13
|
import time
|
15
14
|
|
16
15
|
from rich import box
|
17
16
|
from rich.live import Live
|
18
17
|
from rich.table import Table
|
19
|
-
from rich import console
|
20
18
|
|
21
19
|
from pyegeria import (
|
22
20
|
InvalidParameterException,
|
@@ -24,18 +22,14 @@ from pyegeria import (
|
|
24
22
|
UserNotAuthorizedException,
|
25
23
|
print_exception_response,
|
26
24
|
)
|
27
|
-
from pyegeria._deprecated_gov_engine import GovEng
|
28
25
|
from pyegeria.my_profile_omvs import MyProfile
|
26
|
+
|
29
27
|
disable_ssl_warnings = True
|
30
28
|
|
31
29
|
good_platform1_url = "https://127.0.0.1:9443"
|
32
30
|
good_platform2_url = "https://egeria.pdr-associates.com:7443"
|
33
31
|
bad_platform1_url = "https://localhost:9443"
|
34
32
|
|
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
33
|
good_user_1 = "garygeeke"
|
40
34
|
good_user_2 = "erinoverview"
|
41
35
|
bad_user_1 = "eviledna"
|
@@ -74,7 +68,7 @@ def display_todos(server: str = good_server_4, url: str = good_platform1_url, us
|
|
74
68
|
props = item["properties"]
|
75
69
|
name = props["name"]
|
76
70
|
todo_type_name = props.get("toDoType", " ")
|
77
|
-
todo_guid = item["elementHeader"]
|
71
|
+
todo_guid = item["elementHeader"].get("guid", "---")
|
78
72
|
created = props.get("creationTime", " ")
|
79
73
|
priority = str(props.get("priority", " "))
|
80
74
|
due = props.get("dueTime", " ")
|
@@ -118,7 +112,7 @@ def display_todos(server: str = good_server_4, url: str = good_platform1_url, us
|
|
118
112
|
table.add_column("Sponsor")
|
119
113
|
|
120
114
|
my_profile = m_client.get_my_profile()
|
121
|
-
my_guid = my_profile["elementHeader"]
|
115
|
+
my_guid = my_profile["elementHeader"].get("guid","---")
|
122
116
|
my_ids = my_profile["userIdentities"]
|
123
117
|
my_title = my_profile["profileProperties"].get("jobTitle", "No Title")
|
124
118
|
user_ids = []
|
@@ -148,7 +142,7 @@ def display_todos(server: str = good_server_4, url: str = good_platform1_url, us
|
|
148
142
|
assert e.related_http_code != "200", "Invalid parameters"
|
149
143
|
|
150
144
|
|
151
|
-
|
145
|
+
def main():
|
152
146
|
parser = argparse.ArgumentParser()
|
153
147
|
parser.add_argument("--server", help="Name of the view server to connect to")
|
154
148
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -160,3 +154,6 @@ if __name__ == "__main__":
|
|
160
154
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
161
155
|
print(f"Starting display_todos with {server}, {url}, {userid}")
|
162
156
|
display_todos(server=server, url=url, user=userid)
|
157
|
+
|
158
|
+
if __name__ == "__main__":
|
159
|
+
main()
|
@@ -105,7 +105,7 @@ def display_todos(server: str , url: str, user: str):
|
|
105
105
|
m_client.close_session()
|
106
106
|
|
107
107
|
|
108
|
-
|
108
|
+
def main():
|
109
109
|
parser = argparse.ArgumentParser()
|
110
110
|
parser.add_argument("--server", help="Name of the view server to connect to")
|
111
111
|
parser.add_argument("--url", help="URL Platform to connect to")
|
@@ -117,3 +117,7 @@ if __name__ == "__main__":
|
|
117
117
|
userid = args.userid if args.userid is not None else 'erinoverview'
|
118
118
|
print(f"Starting display_todos with {server}, {url}, {userid}")
|
119
119
|
display_todos(server=server, url=url, user=userid)
|
120
|
+
|
121
|
+
|
122
|
+
if __name__ == "__main__":
|
123
|
+
main()
|
@@ -23,7 +23,8 @@ if disable_ssl_warnings:
|
|
23
23
|
|
24
24
|
from ._exceptions import (InvalidParameterException, PropertyServerException, UserNotAuthorizedException,
|
25
25
|
print_exception_response)
|
26
|
-
from .utils import print_response, body_slimmer, wrap_text
|
26
|
+
# from .utils import print_response, body_slimmer, wrap_text
|
27
|
+
from .utils import print_response, body_slimmer
|
27
28
|
from ._client import Client
|
28
29
|
from .automated_curation_omvs import AutomatedCuration
|
29
30
|
from .core_omag_server_config import CoreServerConfig
|
@@ -47,4 +48,4 @@ from .runtime_manager_omvs import RuntimeManager
|
|
47
48
|
from .action_author_omvs import GovernanceAuthor
|
48
49
|
from .glossary_manager_omvs import GlossaryManager
|
49
50
|
|
50
|
-
__version__ = "0.
|
51
|
+
__version__ = "0.5.2"
|