pyegeria 0.8.4.19__py3-none-any.whl → 0.8.4.21__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.
@@ -126,7 +126,7 @@ from commands.ops.restart_integration_daemon import restart_connector
126
126
  @click.option(
127
127
  "--password",
128
128
  default="secret",
129
- envvar="EGERIA_PASSWORD",
129
+ envvar="EGERIA_USER_PASSWORD",
130
130
  help="Egeria user password",
131
131
  )
132
132
  @click.option("--timeout", default=60, help="Number of seconds to wait")
@@ -377,8 +377,14 @@ def tell(ctx):
377
377
  pass
378
378
 
379
379
 
380
- tell.add_command(start_server)
381
- tell.add_command(stop_server)
380
+ @tell.group("servers")
381
+ @click.pass_context
382
+ def servers(ctx):
383
+ """Perform actions on OMAG Servers"""
384
+
385
+
386
+ servers.add_command(start_server)
387
+ servers.add_command(stop_server)
382
388
 
383
389
 
384
390
  @tell.group("integration-daemon")
@@ -21,40 +21,42 @@ from pyegeria._exceptions import (
21
21
  print_exception_response,
22
22
  )
23
23
 
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(
29
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
30
- )
31
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
32
- EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
33
- "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
34
- )
35
-
36
- EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
37
- EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_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(
29
+ # "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
30
+ # )
31
+ # EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
32
+ # EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
33
+ # "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
34
+ # )
35
+ #
36
+ # EGERIA_USER = os.environ.get("EGERIA_USER", "garygeeke")
37
+ # EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
38
38
 
39
39
 
40
40
  @click.command("stop")
41
41
  @click.option("--server", help="OMAG Server to stop")
42
- @click.option(
43
- "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
44
- )
45
- @click.option(
46
- "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
47
- )
48
- @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
49
- @click.option(
50
- "--password",
51
- default="secret",
52
- envvar="EGERIA_PASSWORD",
53
- help="Egeria user password",
54
- )
55
- def stop_server(view_server, server, url, userid, password):
42
+ # @click.option(
43
+ # "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
44
+ # )
45
+ # @click.option(
46
+ # "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
47
+ # )
48
+ # @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
49
+ # @click.option(
50
+ # "--password",
51
+ # default="secret",
52
+ # envvar="EGERIA_PASSWORD",
53
+ # help="Egeria user password",
54
+ # )
55
+ @click.pass_context
56
+ def stop_server(ctx, server):
56
57
  """Stop an engine-host daemon"""
57
- p_client = EgeriaTech(view_server, url, userid, password)
58
+ c = ctx.obj
59
+ p_client = EgeriaTech(c.view_server, c.view_server_url, c.userid, c.password)
58
60
  token = p_client.create_egeria_bearer_token()
59
61
  try:
60
62
  server_guid = p_client.get_guid_for_name(server)
@@ -69,25 +71,26 @@ def stop_server(view_server, server, url, userid, password):
69
71
 
70
72
  @click.command("start")
71
73
  @click.option("--server", help="OMAG Server to start")
72
- @click.option(
73
- "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
74
- )
75
- @click.option(
76
- "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
77
- )
78
- @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
79
- @click.option(
80
- "--password",
81
- default="secret",
82
- envvar="EGERIA_PASSWORD",
83
- help="Egeria user password",
84
- )
85
- def start_server(view_server, server, url, userid, password):
74
+ # @click.option(
75
+ # "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
76
+ # )
77
+ # @click.option(
78
+ # "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
79
+ # )
80
+ # @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
81
+ # @click.option(
82
+ # "--password",
83
+ # default="secret",
84
+ # envvar="EGERIA_USER_PASSWORD",
85
+ # help="Egeria user password",
86
+ # )
87
+ def start_server(ctx, server):
86
88
  """Start or restart an engine-host from its known configuration"""
87
- p_client = EgeriaTech(view_server, url, userid, password)
89
+ c = ctx.obj
90
+ p_client = EgeriaTech(c.view_server, c.view_server_url, c.userid, c.password)
88
91
  token = p_client.create_egeria_bearer_token()
89
92
  try:
90
- server_guid = p_client.get_guid_for_name(server)
93
+ server_guid = p_client.get_element_guid_by_unique_name(server, "name")
91
94
  p_client.activate_server_with_stored_config(server_guid)
92
95
 
93
96
  click.echo(f"Started server {server}")
@@ -99,31 +102,33 @@ def start_server(view_server, server, url, userid, password):
99
102
 
100
103
 
101
104
  @click.command("refresh-gov-eng-config")
102
- @click.option(
103
- "--engine-host", default=EGERIA_ENGINE_HOST, help="Engine Host to refresh"
104
- )
105
- @click.option(
106
- "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
107
- )
108
- @click.option(
109
- "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
110
- )
111
- @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
112
- @click.option(
113
- "--password",
114
- default="secret",
115
- envvar="EGERIA_PASSWORD",
116
- help="Egeria user password",
117
- )
118
- def refresh_gov_eng_config(engine_host, view_server, url, userid, password):
105
+ @click.pass_context
106
+ # @click.option(
107
+ # "--engine-host", default=EGERIA_ENGINE_HOST, help="Engine Host to refresh"
108
+ # )
109
+ # @click.option(
110
+ # "--view-server", default=EGERIA_VIEW_SERVER, help="View Server to communicate with"
111
+ # )
112
+ # @click.option(
113
+ # "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
114
+ # )
115
+ # @click.option("--userid", default="garygeeke", envvar="EGERIA_USER", help="Egeria user")
116
+ # @click.option(
117
+ # "--password",
118
+ # default="secret",
119
+ # envvar="EGERIA_PASSWORD",
120
+ # help="Egeria user password",
121
+ # )
122
+ def refresh_gov_eng_config(ctx):
119
123
  """Start or restart an engine-host from its known configuration"""
120
- p_client = EgeriaTech(view_server, url, userid, password)
124
+ c = ctx.obj
125
+ p_client = EgeriaTech(c.view_server, c.view_server_url, c.userid, c.password)
121
126
  token = p_client.create_egeria_bearer_token()
122
127
  try:
123
- engine_host_guid = p_client.get_guid_for_name(engine_host)
128
+ engine_host_guid = p_client.get_guid_for_name(c.engine_host)
124
129
  p_client.refresh_gov_eng_config(engine_host_guid)
125
130
 
126
- click.echo(f"Refreshed server {engine_host}")
131
+ click.echo(f"Refreshed server {c.engine_host}")
127
132
 
128
133
  except (InvalidParameterException, PropertyServerException) as e:
129
134
  print_exception_response(e)
@@ -1037,7 +1037,7 @@ class RuntimeManager(Client):
1037
1037
 
1038
1038
  """
1039
1039
 
1040
- url = f"{self.cur_command_root}/omag-server/{server_guid}"
1040
+ url = f"{self.cur_command_root}/omag-servers/{server_guid}"
1041
1041
 
1042
1042
  await self._async_make_request("DELETE", url)
1043
1043
 
@@ -1145,7 +1145,7 @@ class RuntimeManager(Client):
1145
1145
 
1146
1146
  """
1147
1147
 
1148
- url = f"{self.cur_command_root}/omag-server/{server_guid}/instance"
1148
+ url = f"{self.cur_command_root}/omag-servers/{server_guid}/instance"
1149
1149
 
1150
1150
  await self._async_make_request("DELETE", url)
1151
1151
 
@@ -1952,56 +1952,6 @@ class RuntimeManager(Client):
1952
1952
  response = loop.run_until_complete(self._async_get_server_report(server_guid))
1953
1953
  return response
1954
1954
 
1955
- #
1956
- # Activate
1957
- #
1958
-
1959
- async def _async_activate_with_stored_config(self, server_guid: str) -> None:
1960
- """Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this
1961
- server. Async Version
1962
-
1963
- Parameters
1964
- ----------
1965
- server_guid: str
1966
- Identity of the server to activate.
1967
-
1968
- Returns
1969
- -------
1970
- None
1971
-
1972
-
1973
- Raises
1974
- ------
1975
- InvalidParameterException
1976
- PropertyServerException
1977
- UserNotAuthorizedException
1978
-
1979
- """
1980
- pass
1981
-
1982
- def activate_with_stored_config(self, server_guid: str) -> None:
1983
- """Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this
1984
- server.
1985
-
1986
- Parameters
1987
- ----------
1988
- server_guid: str
1989
- Identity of the server to activate.
1990
-
1991
- Returns
1992
- -------
1993
- None
1994
-
1995
-
1996
- Raises
1997
- ------
1998
- InvalidParameterException
1999
- PropertyServerException
2000
- UserNotAuthorizedException
2001
-
2002
- """
2003
- pass
2004
-
2005
1955
 
2006
1956
  if __name__ == "__main__":
2007
1957
  print("Main-Runtime Manager")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.8.4.19
3
+ Version: 0.8.4.21
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -19,7 +19,7 @@ commands/cli/__init__.py,sha256=6d_R0KZBNnJy9EBz9J2xvGFlx-3j_ZPqPCxKgdvYeDQ,291
19
19
  commands/cli/egeria.py,sha256=diSjRmatdj9RNsHEZbcstxvH4TPf99PXdILp7DyqgTQ,28411
20
20
  commands/cli/egeria_cat.py,sha256=LWspOYRcdJIIx2n9wvhBhkNnACGDIpFTWfsoVTGeiV0,12957
21
21
  commands/cli/egeria_my.py,sha256=9zIpUDLeA_R-0rgCSQfEZTtVmkxPcEAsYcCTn1wQFrE,6181
22
- commands/cli/egeria_ops.py,sha256=63OUXCoyPedzvuc39xcop6UGffrJxErjXXXY0r0GzEs,10955
22
+ commands/cli/egeria_ops.py,sha256=wRBZIB0V4VkpM9jIe-hYHRCQ3HlMfuY7tJXi9azKY7o,11071
23
23
  commands/cli/egeria_tech.py,sha256=PfEIf8pLgbCiPlUikZss97R78XOue0P3aZG5PswUtQ4,11161
24
24
  commands/cli/ops_config.py,sha256=m4AfPjf-fR4EBTx8Dc2mcgrfWwAxb30YGeV-v79bg4U,1450
25
25
  commands/my/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
@@ -32,7 +32,7 @@ commands/my/my_profile_actions.py,sha256=ytPBLw7_UgYCv1ljxxHtaDCNG65djKZdfMYF6wF
32
32
  commands/my/todo_actions.py,sha256=uihltirrAPtwYNygnNBAVWgfS0W7acoETz1_h3XW_4o,8369
33
33
  commands/ops/README.md,sha256=PJsSDcvMv6E6og6y-cwvxFX5lhCII0UCwgKiM1T17MQ,1595
34
34
  commands/ops/__init__.py,sha256=SCfzF3-aMx8EpqLWmH7JQf13gTmMAtHRbg69oseLvi8,480
35
- commands/ops/engine_actions.py,sha256=f9LowUfOdc8dH1f-bEP4u-8FR1kCuAlJtY356JSyg-w,4425
35
+ commands/ops/engine_actions.py,sha256=00s_wkzs0zlZ6PyZ0J5J9lHhw4Viyzbeox7b1K1lmyc,4609
36
36
  commands/ops/integration_daemon_actions.py,sha256=zf0sOOBF0cV1iG8eGkDaa51jnZJgViT_XLTGHrbflRA,4199
37
37
  commands/ops/list_catalog_targets.py,sha256=0FIZqZu7DSh7tnrme6EOhNiVvK8wyvN1iTZKEDuwTmw,6620
38
38
  commands/ops/load_archive.py,sha256=duf3wq2ANRBiOj9KTFsw8TseEkJLKdzITAeTCjsMvI0,2453
@@ -87,13 +87,13 @@ pyegeria/my_profile_omvs.py,sha256=eDnDK8LQIg7yrmiG8x20xMw-Yu6xuL0yXRm0vSc4T8k,4
87
87
  pyegeria/platform_services.py,sha256=hlbbG1iGuMj7JhLkz60V9xaG4m0pheYvs0bhbjF64rE,41624
88
88
  pyegeria/project_manager_omvs.py,sha256=OCdJKECI0sTZWgXcQ5TcupK5JPxHJG78-kHXyflDu1k,74521
89
89
  pyegeria/registered_info.py,sha256=3PbmqKusFX5m9KYVwbT69PIN1oSL4PhZDbbU_an7dvE,6356
90
- pyegeria/runtime_manager_omvs.py,sha256=0-LmUHOjRpo9gcbIFAOH4e4TwBj4t3QV4tti8q0bfRw,63023
90
+ pyegeria/runtime_manager_omvs.py,sha256=zGrm7XAwRsRYNgG1a7huM1jVroGGuhAeF2qi_K1YOU4,61922
91
91
  pyegeria/server_operations.py,sha256=ciH890hYT85YQ6OpByn4w7s3a7TtvWZpIG5rkRqbcI0,16766
92
92
  pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
93
93
  pyegeria/valid_metadata_omvs.py,sha256=6Hc4g9BOS8w1ILfTG3_A1tfIX3HLtpgZZvcC-z9GePU,36185
94
94
  pyegeria/x_action_author_omvs.py,sha256=za472slZ5tN9Pkd-ukyHS5Sn6MlKkJyIlbLlU3bL_Go,6451
95
- pyegeria-0.8.4.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
96
- pyegeria-0.8.4.19.dist-info/METADATA,sha256=LjRSPjHruZwKqB3AdnQpTX0k4FMvGM_tXPGcqQNtEZI,2820
97
- pyegeria-0.8.4.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
98
- pyegeria-0.8.4.19.dist-info/entry_points.txt,sha256=CkFcA_eJ_pXLSlpZ7AAPDiNVHyFuW0tDHc_y9LTlLx8,3344
99
- pyegeria-0.8.4.19.dist-info/RECORD,,
95
+ pyegeria-0.8.4.21.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
96
+ pyegeria-0.8.4.21.dist-info/METADATA,sha256=tT7CTAaiCHr2fDb-pMG2POs50H3l-lW3nbhX7qN0mhs,2820
97
+ pyegeria-0.8.4.21.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
98
+ pyegeria-0.8.4.21.dist-info/entry_points.txt,sha256=CkFcA_eJ_pXLSlpZ7AAPDiNVHyFuW0tDHc_y9LTlLx8,3344
99
+ pyegeria-0.8.4.21.dist-info/RECORD,,