vantage6 5.0.0a19__tar.gz → 5.0.0a20__tar.gz

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.

Potentially problematic release.


This version of vantage6 might be problematic. Click here for more details.

Files changed (77) hide show
  1. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/PKG-INFO +6 -2
  2. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/tests_cli/test_node_cli.py +1 -2
  3. vantage6-5.0.0a20/vantage6/cli/__build__ +1 -0
  4. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/configuration_wizard.py +4 -3
  5. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/common/__init__.py +7 -3
  6. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/test/feature_tester.py +33 -7
  7. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/PKG-INFO +6 -2
  8. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/requires.txt +2 -2
  9. vantage6-5.0.0a19/vantage6/cli/__build__ +0 -1
  10. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/setup.cfg +0 -0
  11. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/setup.py +0 -0
  12. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/tests_cli/__init__.py +0 -0
  13. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/tests_cli/test_example.py +0 -0
  14. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/tests_cli/test_server_cli.py +0 -0
  15. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/tests_cli/test_wizard.py +0 -0
  16. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/__init__.py +0 -0
  17. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/_version.py +0 -0
  18. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algorithm/create.py +0 -0
  19. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algorithm/update.py +0 -0
  20. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/attach.py +0 -0
  21. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/files.py +0 -0
  22. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/list.py +0 -0
  23. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/new.py +0 -0
  24. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/remove.py +0 -0
  25. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/start.py +0 -0
  26. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/algostore/stop.py +0 -0
  27. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/cli.py +0 -0
  28. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/common/decorator.py +0 -0
  29. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/common/start.py +0 -0
  30. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/common/utils.py +0 -0
  31. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/configuration_manager.py +0 -0
  32. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/context/__init__.py +0 -0
  33. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/context/algorithm_store.py +0 -0
  34. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/context/base_server.py +0 -0
  35. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/context/node.py +0 -0
  36. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/context/server.py +0 -0
  37. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/dev/create.py +0 -0
  38. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/dev/remove.py +0 -0
  39. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/globals.py +0 -0
  40. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/attach.py +0 -0
  41. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/clean.py +0 -0
  42. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/create_private_key.py +0 -0
  43. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/files.py +0 -0
  44. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/list.py +0 -0
  45. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/new.py +0 -0
  46. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/remove.py +0 -0
  47. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/restart.py +0 -0
  48. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/set_api_key.py +0 -0
  49. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/start.py +0 -0
  50. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/stop.py +0 -0
  51. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/node/version.py +0 -0
  52. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/rabbitmq/__init__.py +0 -0
  53. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/rabbitmq/definitions.py +0 -0
  54. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/rabbitmq/queue_manager.py +0 -0
  55. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/rabbitmq/rabbitmq.config +0 -0
  56. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/attach.py +0 -0
  57. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/common/__init__.py +0 -0
  58. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/files.py +0 -0
  59. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/import_.py +0 -0
  60. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/list.py +0 -0
  61. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/new.py +0 -0
  62. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/remove.py +0 -0
  63. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/shell.py +0 -0
  64. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/start.py +0 -0
  65. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/stop.py +0 -0
  66. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/server/version.py +0 -0
  67. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/template/algo_store_config.j2 +0 -0
  68. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/template/node_config.j2 +0 -0
  69. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/template/server_config.j2 +0 -0
  70. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/template/server_import_config.j2 +0 -0
  71. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/test/common/diagnostic_runner.py +0 -0
  72. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/test/integration_test.py +0 -0
  73. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6/cli/utils.py +0 -0
  74. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/SOURCES.txt +0 -0
  75. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/dependency_links.txt +0 -0
  76. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/entry_points.txt +0 -0
  77. {vantage6-5.0.0a19 → vantage6-5.0.0a20}/vantage6.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vantage6
3
- Version: 5.0.0a19
3
+ Version: 5.0.0a20
4
4
  Summary: vantage6 command line interface
5
5
  Home-page: https://github.com/vantage6/vantage6
6
6
  Requires-Python: >=3.10
@@ -112,7 +112,11 @@ For example, you can create a new organization by running:
112
112
  ```python
113
113
  from vantage6.client import Client
114
114
 
115
- client = Client('http://127.0.0.1', 7601, '/api', log_level='debug')
115
+ client = Client(
116
+ server_url='http://127.0.0.1:7601/api',
117
+ auth_url='http://127.0.0.1:8080',
118
+ log_level='debug'
119
+ )
116
120
  client.authenticate()
117
121
  client.setup_encryption(None)
118
122
 
@@ -417,8 +417,7 @@ class NodeCLITest(unittest.TestCase):
417
417
  @patch("vantage6.cli.node.common.debug")
418
418
  @patch("vantage6.cli.node.common.error")
419
419
  @patch("vantage6.cli.node.common.UserClient")
420
- @patch("vantage6.cli.node.common.q")
421
- def test_client(self, q, client, error, debug, info):
420
+ def test_client(self, client, error, debug, info):
422
421
  ctx = MagicMock(
423
422
  config={
424
423
  "server_url": "localhost",
@@ -0,0 +1 @@
1
+ 20
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from pathlib import Path
2
3
 
3
4
  import questionary as q
@@ -9,6 +10,7 @@ from vantage6.common.globals import (
9
10
  NodePolicy,
10
11
  Ports,
11
12
  DEFAULT_API_PATH,
13
+ RequiredNodeEnvVars,
12
14
  )
13
15
  from vantage6.common.client.node_client import NodeClient
14
16
  from vantage6.common.context import AppContext
@@ -171,9 +173,8 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
171
173
  client = NodeClient(
172
174
  instance_name,
173
175
  config["api_key"],
174
- config["server_url"],
175
- config["port"],
176
- config["api_path"],
176
+ server_url=f"{config['server_url']}:{config['port']}{config['api_path']}",
177
+ auth_url=os.environ.get(RequiredNodeEnvVars.KEYCLOAK_URL.value),
177
178
  )
178
179
  try:
179
180
  client.authenticate()
@@ -2,12 +2,12 @@
2
2
  Common functions that are used in node CLI commands
3
3
  """
4
4
 
5
- import questionary as q
5
+ import os
6
6
  import docker
7
7
  from colorama import Fore, Style
8
8
 
9
9
  from vantage6.common import error, info, debug
10
- from vantage6.common.globals import APPNAME, InstanceType
10
+ from vantage6.common.globals import APPNAME, InstanceType, RequiredNodeEnvVars
11
11
  from vantage6.client import UserClient
12
12
 
13
13
  from vantage6.cli.context.node import NodeContext
@@ -35,7 +35,11 @@ def create_client(ctx: NodeContext) -> UserClient:
35
35
  port = ctx.config["port"]
36
36
  api_path = ctx.config["api_path"]
37
37
  info(f"Connecting to server at '{host}:{port}{api_path}'")
38
- return UserClient(host, port, api_path, log_level="warn")
38
+ return UserClient(
39
+ server_url=f"{host}:{port}{api_path}",
40
+ auth_url=os.environ.get(RequiredNodeEnvVars.KEYCLOAK_URL.value),
41
+ log_level="warn",
42
+ )
39
43
 
40
44
 
41
45
  def create_client_and_authenticate(ctx: NodeContext) -> UserClient:
@@ -8,11 +8,30 @@ from vantage6.cli.test.common.diagnostic_runner import DiagnosticRunner
8
8
 
9
9
 
10
10
  @click.command()
11
- @click.option("--host", type=str, default="http://localhost", help="URL of the server")
12
11
  @click.option(
13
- "--port", type=int, default=Ports.DEV_SERVER.value, help="Port of the server"
12
+ "--server-url",
13
+ type=str,
14
+ default=f"http://localhost:{Ports.DEV_SERVER.value}/api",
15
+ help="URL of the server",
16
+ )
17
+ @click.option(
18
+ "--auth-url",
19
+ type=str,
20
+ default="http://localhost:8080",
21
+ help="URL of the authentication server (Keycloak)",
22
+ )
23
+ @click.option(
24
+ "--auth-realm",
25
+ type=str,
26
+ default="vantage6",
27
+ help="Realm of the authentication server (Keycloak)",
28
+ )
29
+ @click.option(
30
+ "--auth-client",
31
+ type=str,
32
+ default="public_client",
33
+ help="Client ID of the authentication server (Keycloak)",
14
34
  )
15
- @click.option("--api-path", type=str, default="/api", help="API path of the server")
16
35
  @click.option(
17
36
  "--collaboration",
18
37
  type=int,
@@ -45,9 +64,10 @@ from vantage6.cli.test.common.diagnostic_runner import DiagnosticRunner
45
64
  help="Path to the private key for end-to-end encryption",
46
65
  )
47
66
  def cli_test_features(
48
- host: str,
49
- port: int,
50
- api_path: str,
67
+ server_url: str,
68
+ auth_url: str,
69
+ auth_realm: str,
70
+ auth_client: str,
51
71
  collaboration: int,
52
72
  organizations: list[int] | None,
53
73
  all_nodes: bool,
@@ -68,7 +88,13 @@ def cli_test_features(
68
88
  if all_nodes or not organizations:
69
89
  organizations = None
70
90
 
71
- client = UserClient(host=host, port=port, path=api_path, log_level="critical")
91
+ client = UserClient(
92
+ server_url=server_url,
93
+ auth_url=auth_url,
94
+ auth_realm=auth_realm,
95
+ auth_client=auth_client,
96
+ log_level="critical",
97
+ )
72
98
  client.authenticate()
73
99
  client.setup_encryption(private_key)
74
100
  diagnose = DiagnosticRunner(client, collaboration, organizations, online_only)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vantage6
3
- Version: 5.0.0a19
3
+ Version: 5.0.0a20
4
4
  Summary: vantage6 command line interface
5
5
  Home-page: https://github.com/vantage6/vantage6
6
6
  Requires-Python: >=3.10
@@ -112,7 +112,11 @@ For example, you can create a new organization by running:
112
112
  ```python
113
113
  from vantage6.client import Client
114
114
 
115
- client = Client('http://127.0.0.1', 7601, '/api', log_level='debug')
115
+ client = Client(
116
+ server_url='http://127.0.0.1:7601/api',
117
+ auth_url='http://127.0.0.1:8080',
118
+ log_level='debug'
119
+ )
116
120
  client.authenticate()
117
121
  client.setup_encryption(None)
118
122
 
@@ -9,8 +9,8 @@ questionary==1.10.0
9
9
  rich==13.5.2
10
10
  schema==0.7.5
11
11
  sqlalchemy==2.0.37
12
- vantage6-common==5.0.0a19
13
- vantage6-client==5.0.0a19
12
+ vantage6-common==5.0.0a20
13
+ vantage6-client==5.0.0a20
14
14
 
15
15
  [dev]
16
16
  coverage==6.4.4
@@ -1 +0,0 @@
1
- 19
File without changes
File without changes