vantage6 5.0.0a7__tar.gz → 5.0.0a9__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 (84) hide show
  1. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/PKG-INFO +1 -1
  2. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/tests_cli/test_node_cli.py +4 -21
  3. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/tests_cli/test_server_cli.py +32 -11
  4. vantage6-5.0.0a9/vantage6/cli/__build__ +1 -0
  5. vantage6-5.0.0a9/vantage6/cli/algostore/attach.py +13 -0
  6. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/cli.py +4 -11
  7. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/common/utils.py +15 -0
  8. vantage6-5.0.0a9/vantage6/cli/node/attach.py +13 -0
  9. vantage6-5.0.0a9/vantage6/cli/server/attach.py +13 -0
  10. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/test/common/diagnostic_runner.py +2 -4
  11. vantage6-5.0.0a9/vantage6/cli/test/integration_test.py +122 -0
  12. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6.egg-info/PKG-INFO +1 -1
  13. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6.egg-info/SOURCES.txt +0 -5
  14. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6.egg-info/requires.txt +2 -2
  15. vantage6-5.0.0a7/vantage6/cli/__build__ +0 -1
  16. vantage6-5.0.0a7/vantage6/cli/algostore/attach.py +0 -49
  17. vantage6-5.0.0a7/vantage6/cli/dev/create.py +0 -633
  18. vantage6-5.0.0a7/vantage6/cli/dev/remove.py +0 -94
  19. vantage6-5.0.0a7/vantage6/cli/dev/start.py +0 -123
  20. vantage6-5.0.0a7/vantage6/cli/dev/stop.py +0 -47
  21. vantage6-5.0.0a7/vantage6/cli/dev/utils.py +0 -24
  22. vantage6-5.0.0a7/vantage6/cli/node/attach.py +0 -74
  23. vantage6-5.0.0a7/vantage6/cli/server/attach.py +0 -63
  24. vantage6-5.0.0a7/vantage6/cli/test/integration_test.py +0 -122
  25. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/setup.cfg +0 -0
  26. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/setup.py +0 -0
  27. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/tests_cli/__init__.py +0 -0
  28. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/tests_cli/test_example.py +0 -0
  29. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/tests_cli/test_wizard.py +0 -0
  30. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/__init__.py +0 -0
  31. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/_version.py +0 -0
  32. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algorithm/create.py +0 -0
  33. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algorithm/update.py +0 -0
  34. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/files.py +0 -0
  35. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/list.py +0 -0
  36. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/new.py +0 -0
  37. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/remove.py +0 -0
  38. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/start.py +0 -0
  39. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/algostore/stop.py +0 -0
  40. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/common/decorator.py +0 -0
  41. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/common/start.py +0 -0
  42. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/configuration_manager.py +0 -0
  43. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/configuration_wizard.py +0 -0
  44. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/context/__init__.py +0 -0
  45. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/context/algorithm_store.py +0 -0
  46. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/context/base_server.py +0 -0
  47. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/context/node.py +0 -0
  48. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/context/server.py +0 -0
  49. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/globals.py +0 -0
  50. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/clean.py +0 -0
  51. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/common/__init__.py +0 -0
  52. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/create_private_key.py +0 -0
  53. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/files.py +0 -0
  54. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/list.py +0 -0
  55. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/new.py +0 -0
  56. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/remove.py +0 -0
  57. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/restart.py +0 -0
  58. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/set_api_key.py +0 -0
  59. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/start.py +0 -0
  60. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/stop.py +0 -0
  61. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/node/version.py +0 -0
  62. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/rabbitmq/__init__.py +0 -0
  63. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/rabbitmq/definitions.py +0 -0
  64. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/rabbitmq/queue_manager.py +0 -0
  65. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/rabbitmq/rabbitmq.config +0 -0
  66. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/common/__init__.py +0 -0
  67. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/files.py +0 -0
  68. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/import_.py +0 -0
  69. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/list.py +0 -0
  70. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/new.py +0 -0
  71. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/remove.py +0 -0
  72. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/shell.py +0 -0
  73. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/start.py +0 -0
  74. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/stop.py +0 -0
  75. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/server/version.py +0 -0
  76. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/template/algo_store_config.j2 +0 -0
  77. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/template/node_config.j2 +0 -0
  78. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/template/server_config.j2 +0 -0
  79. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/template/server_import_config.j2 +0 -0
  80. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/test/feature_tester.py +0 -0
  81. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6/cli/utils.py +0 -0
  82. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6.egg-info/dependency_links.txt +0 -0
  83. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/vantage6.egg-info/entry_points.txt +0 -0
  84. {vantage6-5.0.0a7 → vantage6-5.0.0a9}/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.0a7
3
+ Version: 5.0.0a9
4
4
  Summary: vantage6 command line interface
5
5
  Home-page: https://github.com/vantage6/vantage6
6
6
  Requires-Python: >=3.10
@@ -295,29 +295,12 @@ class NodeCLITest(unittest.TestCase):
295
295
  result = runner.invoke(cli_node_restart, ["--name", "iknl"])
296
296
  self.assertEqual(result.exit_code, 0)
297
297
 
298
- @patch("vantage6.cli.node.attach.time")
299
- @patch("vantage6.cli.node.attach.print_log_worker")
300
- @patch("docker.DockerClient.containers")
301
- @patch("vantage6.cli.node.attach.check_docker_running", return_value=True)
302
- def test_attach(self, check_docker, containers, log_worker, time_):
298
+ @patch("vantage6.cli.node.attach.attach_logs")
299
+ def test_attach(self, attach_logs):
303
300
  """Attach docker logs without errors."""
304
- container1 = MagicMock()
305
- container1.name = f"{APPNAME}-iknl-user"
306
- containers.list.return_value = [container1]
307
-
308
- log_worker.return_value = ""
309
- time_.sleep.side_effect = KeyboardInterrupt()
310
-
311
301
  runner = CliRunner()
312
- result = runner.invoke(cli_node_attach, ["--name", "iknl"])
313
-
314
- self.assertEqual(
315
- result.output,
316
- "[info ] - Closing log file. Keyboard Interrupt.\n"
317
- "[info ] - Note that your node is still running! Shut it down "
318
- "with 'v6 node stop'\n",
319
- )
320
- self.assertEqual(result.exit_code, 0)
302
+ runner.invoke(cli_node_attach)
303
+ attach_logs.assert_called_once_with("app=node")
321
304
 
322
305
  @patch("vantage6.cli.node.clean.q")
323
306
  @patch("docker.DockerClient.volumes")
@@ -5,6 +5,7 @@ from pathlib import Path
5
5
  from click.testing import CliRunner
6
6
 
7
7
  from vantage6.common.globals import APPNAME, InstanceType
8
+ from vantage6.cli.common.utils import attach_logs
8
9
  from vantage6.cli.server.start import cli_server_start
9
10
  from vantage6.cli.server.list import cli_server_configuration_list
10
11
  from vantage6.cli.server.files import cli_server_files
@@ -141,18 +142,38 @@ class ServerCLITest(unittest.TestCase):
141
142
  self.assertIsNone(result.exception)
142
143
  self.assertEqual(result.exit_code, 0)
143
144
 
144
- @patch("vantage6.cli.server.attach.time.sleep")
145
- @patch("docker.DockerClient.containers")
146
- def test_attach(self, containers, sleep):
147
- """Attach log to the console without errors."""
148
- container1 = MagicMock()
149
- container1.name = f"{APPNAME}-iknl-system-{InstanceType.SERVER}"
150
- containers.list.return_value = [container1]
151
-
152
- sleep.side_effect = KeyboardInterrupt("Boom!")
153
-
145
+ @patch("vantage6.cli.server.attach.attach_logs")
146
+ def test_attach(self, attach_logs):
147
+ """Attach logs to the console without errors."""
154
148
  runner = CliRunner()
155
- result = runner.invoke(cli_server_attach, ["--name", "iknl"])
149
+ result = runner.invoke(cli_server_attach)
156
150
 
157
151
  self.assertIsNone(result.exception)
158
152
  self.assertEqual(result.exit_code, 0)
153
+ attach_logs.assert_called_once_with(
154
+ "app=vantage6-server", "component=vantage6-server"
155
+ )
156
+
157
+ @patch("vantage6.cli.common.utils.Popen")
158
+ def test_attach_logs(self, mock_popen):
159
+ # Mock the Popen instance and its methods
160
+ mock_process = mock_popen.return_value
161
+ mock_process.wait.return_value = None
162
+
163
+ # Call the function with a sample label
164
+ attach_logs("app=node", "env=dev")
165
+
166
+ # Construct the expected command
167
+ expected_command = [
168
+ "devspace",
169
+ "logs",
170
+ "--follow",
171
+ "--label-selector",
172
+ "app=node,env=dev",
173
+ ]
174
+
175
+ # Verify that Popen was called with the expected command
176
+ mock_popen.assert_called_once_with(expected_command, stdout=None, stderr=None)
177
+
178
+ # Verify that wait was called on the process
179
+ mock_process.wait.assert_called_once()
@@ -0,0 +1 @@
1
+ 9
@@ -0,0 +1,13 @@
1
+ import click
2
+
3
+ from vantage6.common import info
4
+ from vantage6.cli.common.utils import attach_logs
5
+
6
+
7
+ @click.command()
8
+ def cli_algo_store_attach() -> None:
9
+ """
10
+ Show the store logs in the current console.
11
+ """
12
+ info("Attaching to store logs...")
13
+ attach_logs("app=store", "component=store-server")
@@ -22,14 +22,11 @@ from vantage6.cli.node.set_api_key import cli_node_set_api_key
22
22
  from vantage6.cli.node.start import cli_node_start
23
23
  from vantage6.cli.node.stop import cli_node_stop
24
24
  from vantage6.cli.node.version import cli_node_version
25
- from vantage6.cli.dev.create import create_demo_network
26
- from vantage6.cli.dev.remove import remove_demo_network
27
- from vantage6.cli.dev.start import start_demo_network
28
- from vantage6.cli.dev.stop import stop_demo_network
29
25
  from vantage6.cli.algorithm.create import cli_algorithm_create
30
26
  from vantage6.cli.algorithm.update import cli_algorithm_update
31
27
  from vantage6.cli.test.feature_tester import cli_test_features
32
- from vantage6.cli.test.integration_test import cli_test_integration
28
+
29
+ # from vantage6.cli.test.integration_test import cli_test_integration
33
30
  from vantage6.cli.algostore.attach import cli_algo_store_attach
34
31
  from vantage6.cli.algostore.new import cli_algo_store_new
35
32
  from vantage6.cli.algostore.start import cli_algo_store_start
@@ -93,11 +90,7 @@ def cli_dev() -> None:
93
90
  """
94
91
 
95
92
 
96
- # Define the commands for the dev group
97
- cli_dev.add_command(create_demo_network, name="create-demo-network")
98
- cli_dev.add_command(remove_demo_network, name="remove-demo-network")
99
- cli_dev.add_command(start_demo_network, name="start-demo-network")
100
- cli_dev.add_command(stop_demo_network, name="stop-demo-network")
93
+ # TODO add commands for the dev group
101
94
 
102
95
 
103
96
  # Define the algorithm group
@@ -123,7 +116,7 @@ def cli_test() -> None:
123
116
 
124
117
  # Define the commands for the test group
125
118
  cli_test.add_command(cli_test_features, name="feature-test")
126
- cli_test.add_command(cli_test_integration, name="integration-test")
119
+ # cli_test.add_command(cli_test_integration, name="integration-test")
127
120
 
128
121
 
129
122
  # Define the algorithm-store group
@@ -3,6 +3,7 @@ from colorama import Fore, Style
3
3
  import click
4
4
  from typing import Iterable
5
5
  import docker
6
+ from subprocess import Popen
6
7
 
7
8
 
8
9
  from vantage6.common import warning, error
@@ -158,3 +159,17 @@ def get_name_from_container_name(container_name: str) -> str:
158
159
  # Container name is structured as: f"{APPNAME}-{name}-{post_fix}"
159
160
  # Take into account that name can contain '-'
160
161
  return "-".join(container_name.split("-")[1:-1])
162
+
163
+
164
+ def attach_logs(*labels: list[str]) -> None:
165
+ """
166
+ Attach to the logs of the given labels.
167
+
168
+ Parameters
169
+ ----------
170
+ labels : list[str]
171
+ The labels to attach to
172
+ """
173
+ command = ["devspace", "logs", "--follow", "--label-selector", ",".join(labels)]
174
+ process = Popen(command, stdout=None, stderr=None)
175
+ process.wait()
@@ -0,0 +1,13 @@
1
+ import click
2
+
3
+ from vantage6.common import info
4
+ from vantage6.cli.common.utils import attach_logs
5
+
6
+
7
+ @click.command()
8
+ def cli_node_attach() -> None:
9
+ """
10
+ Show the node logs in the current console.
11
+ """
12
+ info("Attaching to node logs...")
13
+ attach_logs("app=node")
@@ -0,0 +1,13 @@
1
+ import click
2
+
3
+ from vantage6.common import info
4
+ from vantage6.cli.common.utils import attach_logs
5
+
6
+
7
+ @click.command()
8
+ def cli_server_attach() -> None:
9
+ """
10
+ Show the server logs in the current console.
11
+ """
12
+ info("Attaching to server logs...")
13
+ attach_logs("app=vantage6-server", "component=vantage6-server")
@@ -97,9 +97,7 @@ class DiagnosticRunner:
97
97
  name="test",
98
98
  description="Basic Diagnostic test",
99
99
  image=DIAGNOSTICS_IMAGE,
100
- input_={
101
- "method": "base_features",
102
- },
100
+ method="base_features",
103
101
  organizations=self.organization_ids,
104
102
  databases=[{"label": "default"}],
105
103
  )
@@ -123,8 +121,8 @@ class DiagnosticRunner:
123
121
  name="test",
124
122
  description="VPN Diagnostic test",
125
123
  image=DIAGNOSTICS_IMAGE,
124
+ method="vpn_features",
126
125
  input_={
127
- "method": "vpn_features",
128
126
  "kwargs": {"other_nodes": self.organization_ids},
129
127
  },
130
128
  organizations=self.organization_ids,
@@ -0,0 +1,122 @@
1
+ # from pathlib import Path
2
+ # import click
3
+
4
+ # from vantage6.common.globals import Ports
5
+ # from vantage6.cli.utils import info
6
+ # from vantage6.cli.dev.create import create_demo_network
7
+ # from vantage6.cli.dev.start import start_demo_network
8
+ # from vantage6.cli.dev.stop import stop_demo_network
9
+ # from vantage6.cli.dev.remove import remove_demo_network
10
+ # from vantage6.cli.utils import prompt_config_name, check_config_name_allowed
11
+ # from vantage6.cli.test.feature_tester import cli_test_features
12
+
13
+
14
+ # @click.command()
15
+ # @click.option(
16
+ # "-n", "--name", default=None, type=str, help="Name for your development setup"
17
+ # )
18
+ # @click.option(
19
+ # "--server-url",
20
+ # type=str,
21
+ # default="http://host.docker.internal",
22
+ # help="Server URL to point to. If you are using Docker Desktop, "
23
+ # "the default http://host.docker.internal should not be changed.",
24
+ # )
25
+ # @click.option(
26
+ # "-i", "--image", type=str, default=None, help="Server Docker image to use"
27
+ # )
28
+ # @click.option(
29
+ # "--keep",
30
+ # type=bool,
31
+ # default=False,
32
+ # help="Keep the dev network after finishing the test",
33
+ # )
34
+ # @click.option(
35
+ # "--extra-server-config",
36
+ # type=click.Path(exists=True),
37
+ # default=None,
38
+ # help="YAML File with additional server "
39
+ # "configuration. This will be appended to the server "
40
+ # "configuration file",
41
+ # )
42
+ # @click.option(
43
+ # "--extra-node-config",
44
+ # type=click.Path("rb"),
45
+ # default=None,
46
+ # help="YAML File with additional node configuration. This will be"
47
+ # " appended to each of the node configuration files",
48
+ # )
49
+ # @click.pass_context
50
+ # def cli_test_integration(
51
+ # click_ctx: click.Context,
52
+ # name: str,
53
+ # server_url: str,
54
+ # image: str,
55
+ # keep: bool = False,
56
+ # extra_server_config: Path = None,
57
+ # extra_node_config: Path = None,
58
+ # ) -> list[dict]:
59
+ # """
60
+ # Create dev network and run diagnostic checks on it.
61
+
62
+ # This is a full integration test of the vantage6 network. It will create
63
+ # a test server with some nodes using the `vdev` commands, and then run the
64
+ # v6-diagnostics algorithm to test all functionality.
65
+ # """
66
+ # # get name for the development setup - if not given - and check if it is
67
+ # # allowed
68
+ # name = prompt_config_name(name)
69
+ # check_config_name_allowed(name)
70
+
71
+ # # create server & node configurations and create test resources (
72
+ # # collaborations, organizations, etc)
73
+ # click_ctx.invoke(
74
+ # create_demo_network,
75
+ # name=name,
76
+ # num_nodes=3,
77
+ # server_url=server_url,
78
+ # server_port=Ports.DEV_SERVER.value,
79
+ # image=image,
80
+ # extra_server_config=extra_server_config,
81
+ # extra_node_config=extra_node_config,
82
+ # )
83
+
84
+ # # start the server and nodes
85
+ # click_ctx.invoke(
86
+ # start_demo_network,
87
+ # name=name,
88
+ # server_image=image,
89
+ # node_image=image,
90
+ # )
91
+
92
+ # # run the diagnostic tests
93
+ # # TODO the username and password should be coordinated with the vdev
94
+ # # command - at present it spits out this username/password combination by
95
+ # # default but both should be defined in the same place
96
+ # # TODO VPN testing is always excluded - allow to include it with a flag
97
+ # # when vdev commands can handle extra config parameters
98
+ # diagnose_results = click_ctx.invoke(
99
+ # cli_test_features,
100
+ # host="http://localhost",
101
+ # port=Ports.DEV_SERVER.value,
102
+ # api_path="/api",
103
+ # username="dev_admin",
104
+ # password="password",
105
+ # collaboration=1,
106
+ # organizations=None,
107
+ # all_nodes=True,
108
+ # online_only=False,
109
+ # no_vpn=True,
110
+ # )
111
+
112
+ # # clean up the test resources
113
+ # click_ctx.invoke(stop_demo_network, name=name)
114
+ # if not keep:
115
+ # click_ctx.invoke(remove_demo_network, name=name)
116
+ # else:
117
+ # info(
118
+ # f"Keeping the demo network {name}. You can start it with `v6 dev "
119
+ # "start-demo-network`"
120
+ # )
121
+
122
+ # return diagnose_results
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vantage6
3
- Version: 5.0.0a7
3
+ Version: 5.0.0a9
4
4
  Summary: vantage6 command line interface
5
5
  Home-page: https://github.com/vantage6/vantage6
6
6
  Requires-Python: >=3.10
@@ -35,11 +35,6 @@ vantage6/cli/context/algorithm_store.py
35
35
  vantage6/cli/context/base_server.py
36
36
  vantage6/cli/context/node.py
37
37
  vantage6/cli/context/server.py
38
- vantage6/cli/dev/create.py
39
- vantage6/cli/dev/remove.py
40
- vantage6/cli/dev/start.py
41
- vantage6/cli/dev/stop.py
42
- vantage6/cli/dev/utils.py
43
38
  vantage6/cli/node/attach.py
44
39
  vantage6/cli/node/clean.py
45
40
  vantage6/cli/node/create_private_key.py
@@ -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.0a7
13
- vantage6-client==5.0.0a7
12
+ vantage6-common==5.0.0a9
13
+ vantage6-client==5.0.0a9
14
14
 
15
15
  [dev]
16
16
  coverage==6.4.4
@@ -1 +0,0 @@
1
- 7
@@ -1,49 +0,0 @@
1
- import click
2
- import docker
3
- import questionary as q
4
-
5
- from colorama import Fore, Style
6
-
7
- from vantage6.common import error
8
- from vantage6.common.docker.addons import check_docker_running
9
- from vantage6.common.globals import APPNAME, InstanceType
10
- from vantage6.cli.common.start import attach_logs
11
- from vantage6.cli.globals import DEFAULT_SERVER_SYSTEM_FOLDERS
12
-
13
-
14
- @click.command()
15
- @click.option("-n", "--name", default=None, help="configuration name")
16
- @click.option("--system", "system_folders", flag_value=True)
17
- @click.option(
18
- "--user", "system_folders", flag_value=False, default=DEFAULT_SERVER_SYSTEM_FOLDERS
19
- )
20
- def cli_algo_store_attach(name: str, system_folders: bool) -> None:
21
- """
22
- Show the server logs in the current console.
23
- """
24
- check_docker_running()
25
- client = docker.from_env()
26
-
27
- running_servers = client.containers.list(
28
- filters={"label": f"{APPNAME}-type={InstanceType.ALGORITHM_STORE}"}
29
- )
30
- running_server_names = [container.name for container in running_servers]
31
-
32
- if not name:
33
- try:
34
- name = q.select(
35
- "Select the algorithm store you wish to attach:",
36
- choices=running_server_names,
37
- ).unsafe_ask()
38
- except KeyboardInterrupt:
39
- error("Aborted by user!")
40
- return
41
- else:
42
- post_fix = "system" if system_folders else "user"
43
- name = f"{APPNAME}-{name}-{post_fix}-{InstanceType.ALGORITHM_STORE}"
44
-
45
- if name in running_server_names:
46
- container = client.containers.get(name)
47
- attach_logs(container, InstanceType.ALGORITHM_STORE)
48
- else:
49
- error(f"{Fore.RED}{name}{Style.RESET_ALL} is not running!")