vantage6 4.2.1__py3-none-any.whl → 4.3.0b3__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.
Potentially problematic release.
This version of vantage6 might be problematic. Click here for more details.
- tests_cli/test_example.py +0 -1
- tests_cli/test_node_cli.py +74 -79
- tests_cli/test_server_cli.py +22 -22
- tests_cli/test_wizard.py +41 -29
- vantage6/cli/__build__ +1 -1
- vantage6/cli/_version.py +11 -8
- vantage6/cli/algorithm/create.py +14 -14
- vantage6/cli/algorithm/update.py +9 -6
- vantage6/cli/algostore/attach.py +32 -0
- vantage6/cli/algostore/new.py +55 -0
- vantage6/cli/algostore/start.py +102 -0
- vantage6/cli/algostore/stop.py +60 -0
- vantage6/cli/cli.py +32 -12
- vantage6/cli/common/decorator.py +92 -0
- vantage6/cli/common/start.py +232 -0
- vantage6/cli/configuration_manager.py +22 -32
- vantage6/cli/configuration_wizard.py +255 -193
- vantage6/cli/context/__init__.py +86 -0
- vantage6/cli/context/algorithm_store.py +130 -0
- vantage6/cli/context/base_server.py +89 -0
- vantage6/cli/context/node.py +254 -0
- vantage6/cli/context/server.py +127 -0
- vantage6/cli/dev/create.py +180 -113
- vantage6/cli/dev/remove.py +20 -19
- vantage6/cli/dev/start.py +10 -10
- vantage6/cli/dev/stop.py +7 -5
- vantage6/cli/globals.py +24 -0
- vantage6/cli/node/attach.py +21 -10
- vantage6/cli/node/clean.py +4 -2
- vantage6/cli/node/common/__init__.py +15 -11
- vantage6/cli/node/create_private_key.py +58 -27
- vantage6/cli/node/files.py +14 -6
- vantage6/cli/node/list.py +18 -24
- vantage6/cli/node/new.py +21 -12
- vantage6/cli/node/remove.py +31 -22
- vantage6/cli/node/set_api_key.py +18 -12
- vantage6/cli/node/start.py +38 -12
- vantage6/cli/node/stop.py +32 -18
- vantage6/cli/node/version.py +23 -13
- vantage6/cli/rabbitmq/__init__.py +9 -9
- vantage6/cli/rabbitmq/definitions.py +24 -28
- vantage6/cli/rabbitmq/queue_manager.py +37 -40
- vantage6/cli/server/attach.py +16 -11
- vantage6/cli/server/common/__init__.py +37 -25
- vantage6/cli/server/files.py +1 -1
- vantage6/cli/server/import_.py +45 -37
- vantage6/cli/server/list.py +22 -23
- vantage6/cli/server/new.py +20 -14
- vantage6/cli/server/remove.py +5 -4
- vantage6/cli/server/shell.py +17 -6
- vantage6/cli/server/start.py +118 -174
- vantage6/cli/server/stop.py +31 -23
- vantage6/cli/server/version.py +16 -13
- vantage6/cli/test/common/diagnostic_runner.py +30 -34
- vantage6/cli/test/feature_tester.py +51 -25
- vantage6/cli/test/integration_test.py +69 -29
- vantage6/cli/utils.py +6 -5
- {vantage6-4.2.1.dist-info → vantage6-4.3.0b3.dist-info}/METADATA +5 -3
- vantage6-4.3.0b3.dist-info/RECORD +68 -0
- vantage6/cli/context.py +0 -416
- vantage6-4.2.1.dist-info/RECORD +0 -58
- {vantage6-4.2.1.dist-info → vantage6-4.3.0b3.dist-info}/WHEEL +0 -0
- {vantage6-4.2.1.dist-info → vantage6-4.3.0b3.dist-info}/entry_points.txt +0 -0
- {vantage6-4.2.1.dist-info → vantage6-4.3.0b3.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
from schema import And, Or, Use, Optional
|
|
2
2
|
|
|
3
|
-
from vantage6.common.configuration_manager import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
from vantage6.common.configuration_manager import Configuration, ConfigurationManager
|
|
4
|
+
|
|
5
|
+
LOGGING_VALIDATORS = {
|
|
6
|
+
"level": And(
|
|
7
|
+
Use(str), lambda lvl: lvl in ("DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL")
|
|
8
|
+
),
|
|
9
|
+
"use_console": Use(bool),
|
|
10
|
+
"backup_count": And(Use(int), lambda n: n > 0),
|
|
11
|
+
"max_size": And(Use(int), lambda b: b > 16),
|
|
12
|
+
"format": Use(str),
|
|
13
|
+
"datefmt": Use(str),
|
|
14
|
+
}
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
class ServerConfiguration(Configuration):
|
|
@@ -11,6 +19,7 @@ class ServerConfiguration(Configuration):
|
|
|
11
19
|
Stores the server's configuration and defines a set of server-specific
|
|
12
20
|
validators.
|
|
13
21
|
"""
|
|
22
|
+
|
|
14
23
|
VALIDATORS = {
|
|
15
24
|
"description": Use(str),
|
|
16
25
|
"ip": Use(str),
|
|
@@ -18,17 +27,7 @@ class ServerConfiguration(Configuration):
|
|
|
18
27
|
"api_path": Use(str),
|
|
19
28
|
"uri": Use(str),
|
|
20
29
|
"allow_drop_all": Use(bool),
|
|
21
|
-
"logging": {
|
|
22
|
-
"level": And(Use(str), lambda lvl: lvl in (
|
|
23
|
-
"DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
|
|
24
|
-
)),
|
|
25
|
-
"file": Use(str),
|
|
26
|
-
"use_console": Use(bool),
|
|
27
|
-
"backup_count": And(Use(int), lambda n: n > 0),
|
|
28
|
-
"max_size": And(Use(int), lambda b: b > 16),
|
|
29
|
-
"format": Use(str),
|
|
30
|
-
"datefmt": Use(str)
|
|
31
|
-
}
|
|
30
|
+
"logging": {**LOGGING_VALIDATORS, "file": Use(str)},
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
|
|
@@ -46,20 +45,10 @@ class NodeConfiguration(Configuration):
|
|
|
46
45
|
# TODO: remove `dict` validation from databases
|
|
47
46
|
"databases": Or([Use(dict)], dict, None),
|
|
48
47
|
"api_path": Use(str),
|
|
49
|
-
"logging":
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"use_console": Use(bool),
|
|
54
|
-
"backup_count": And(Use(int), lambda n: n > 0),
|
|
55
|
-
"max_size": And(Use(int), lambda b: b > 16),
|
|
56
|
-
"format": Use(str),
|
|
57
|
-
"datefmt": Use(str)
|
|
58
|
-
},
|
|
59
|
-
"encryption": {
|
|
60
|
-
"enabled": bool,
|
|
61
|
-
Optional("private_key"): Use(str)
|
|
62
|
-
}
|
|
48
|
+
"logging": LOGGING_VALIDATORS,
|
|
49
|
+
"encryption": {"enabled": bool, Optional("private_key"): Use(str)},
|
|
50
|
+
Optional("node_extra_env"): dict,
|
|
51
|
+
Optional("node_extra_mounts"): [str],
|
|
63
52
|
}
|
|
64
53
|
|
|
65
54
|
|
|
@@ -76,11 +65,12 @@ class NodeConfigurationManager(ConfigurationManager):
|
|
|
76
65
|
name : str
|
|
77
66
|
Name of the configuration file.
|
|
78
67
|
"""
|
|
68
|
+
|
|
79
69
|
def __init__(self, name, *args, **kwargs) -> None:
|
|
80
70
|
super().__init__(conf_class=NodeConfiguration, name=name)
|
|
81
71
|
|
|
82
72
|
@classmethod
|
|
83
|
-
def from_file(cls, path: str) ->
|
|
73
|
+
def from_file(cls, path: str) -> "NodeConfigurationManager":
|
|
84
74
|
"""
|
|
85
75
|
Create a new instance of the NodeConfigurationManager from a
|
|
86
76
|
configuration file.
|
|
@@ -107,11 +97,12 @@ class ServerConfigurationManager(ConfigurationManager):
|
|
|
107
97
|
name : str
|
|
108
98
|
Name of the configuration file.
|
|
109
99
|
"""
|
|
100
|
+
|
|
110
101
|
def __init__(self, name, *args, **kwargs) -> None:
|
|
111
102
|
super().__init__(conf_class=ServerConfiguration, name=name)
|
|
112
103
|
|
|
113
104
|
@classmethod
|
|
114
|
-
def from_file(cls, path) ->
|
|
105
|
+
def from_file(cls, path) -> "ServerConfigurationManager":
|
|
115
106
|
"""
|
|
116
107
|
Create a new instance of the ServerConfigurationManager from a
|
|
117
108
|
configuration file.
|
|
@@ -130,7 +121,6 @@ class ServerConfigurationManager(ConfigurationManager):
|
|
|
130
121
|
|
|
131
122
|
|
|
132
123
|
class TestingConfigurationManager(ConfigurationManager):
|
|
133
|
-
|
|
134
124
|
def __init__(self, name, *args, **kwargs):
|
|
135
125
|
super().__init__(conf_class=TestConfiguration, name=name)
|
|
136
126
|
|