eva-shell 0.2.16__tar.gz → 0.2.18__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.
- {eva-shell-0.2.16 → eva-shell-0.2.18}/PKG-INFO +1 -1
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/__init__.py +1 -1
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/ap.py +4 -2
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/cli.py +18 -6
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva_shell.egg-info/PKG-INFO +1 -1
- {eva-shell-0.2.16 → eva-shell-0.2.18}/setup.py +1 -1
- {eva-shell-0.2.16 → eva-shell-0.2.18}/LICENSE +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/README.md +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/bin/eva +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/charts.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/client.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/compl.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/sharedobj.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/shell.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva4_shell/tools.py +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva_shell.egg-info/SOURCES.txt +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva_shell.egg-info/dependency_links.txt +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva_shell.egg-info/requires.txt +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/eva_shell.egg-info/top_level.txt +0 -0
- {eva-shell-0.2.16 → eva-shell-0.2.18}/setup.cfg +0 -0
|
@@ -262,7 +262,7 @@ def append_svc_cli(root_sp):
|
|
|
262
262
|
p.add_argument('-f',
|
|
263
263
|
'--file',
|
|
264
264
|
metavar='FILE',
|
|
265
|
-
help='read call params payload form the file'
|
|
265
|
+
help='read call params payload form the file ("-" for stdin)'
|
|
266
266
|
).completer = ComplDeployFile()
|
|
267
267
|
p.add_argument('method', metavar='METHOD').completer = ComplSvcRpcMethod()
|
|
268
268
|
p.add_argument('params',
|
|
@@ -618,6 +618,7 @@ def append_item_cli(root_sp):
|
|
|
618
618
|
|
|
619
619
|
p = sp.add_parser('export', help='export item(s) to a deployment file')
|
|
620
620
|
p.add_argument('i', metavar='MASK').completer = ComplOID()
|
|
621
|
+
p.add_argument('-y', '--full', help='include item states', action='store_true')
|
|
621
622
|
p.add_argument('-o', '--output', metavar='FILE',
|
|
622
623
|
help='output file').completer = ComplDeployFile()
|
|
623
624
|
|
|
@@ -1387,7 +1388,8 @@ def init_ap():
|
|
|
1387
1388
|
|
|
1388
1389
|
sp.add_parser('save', help='save scheduled states (if instant-save is off)')
|
|
1389
1390
|
append_svc_cli(sp)
|
|
1390
|
-
sp.add_parser('test', help='core test/info')
|
|
1391
|
+
p = sp.add_parser('test', help='core test/info')
|
|
1392
|
+
p.add_argument('--wait-active', help='wait for the core to become active', action='store_true')
|
|
1391
1393
|
|
|
1392
1394
|
p = sp.add_parser('dump', help='dump node info')
|
|
1393
1395
|
p.add_argument('-s',
|
|
@@ -52,8 +52,15 @@ class CLI:
|
|
|
52
52
|
args += f' --dest "{kwargs["dest"]}"'
|
|
53
53
|
exec_cmd('venvmgr', args, search_in='sbin', search_system=False)
|
|
54
54
|
|
|
55
|
-
def test(self):
|
|
56
|
-
|
|
55
|
+
def test(self, wait_active=False):
|
|
56
|
+
op_start = time.perf_counter()
|
|
57
|
+
while True:
|
|
58
|
+
if op_start + current_command.timeout < time.perf_counter():
|
|
59
|
+
raise TimeoutError
|
|
60
|
+
else:
|
|
61
|
+
data = call_rpc('test')
|
|
62
|
+
if not wait_active or data.get('active'):
|
|
63
|
+
break
|
|
57
64
|
print_result(data, need_header=False, name_value=True)
|
|
58
65
|
|
|
59
66
|
def dump(self, s=False):
|
|
@@ -945,13 +952,18 @@ class CLI:
|
|
|
945
952
|
)
|
|
946
953
|
ok()
|
|
947
954
|
|
|
948
|
-
def item_export(self, i, output=None):
|
|
955
|
+
def item_export(self, i, full=False, output=None):
|
|
949
956
|
c = 0
|
|
950
|
-
configs =
|
|
957
|
+
configs = dict()
|
|
951
958
|
for item in call_rpc('item.list', dict(i=i, node='.local')):
|
|
952
959
|
c += 1
|
|
953
|
-
configs
|
|
954
|
-
|
|
960
|
+
configs[item['oid']] = call_rpc('item.get_config', dict(i=item['oid']))
|
|
961
|
+
if full:
|
|
962
|
+
for state in call_rpc('item.state', dict(i=list(configs))):
|
|
963
|
+
oid = state['oid']
|
|
964
|
+
configs[oid]['status'] = state['status']
|
|
965
|
+
configs[oid]['value'] = state['value']
|
|
966
|
+
result = dict(items=sorted([v for _, v in configs.items()], key= lambda k: k['oid']))
|
|
955
967
|
if current_command.json:
|
|
956
968
|
print_result(result)
|
|
957
969
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|