eva-shell 0.2.28__tar.gz → 0.2.30__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.28 → eva-shell-0.2.30}/PKG-INFO +1 -1
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/__init__.py +1 -1
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/cli.py +1 -1
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/shell.py +17 -7
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/tools.py +19 -14
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva_shell.egg-info/PKG-INFO +1 -1
- {eva-shell-0.2.28 → eva-shell-0.2.30}/setup.py +1 -1
- {eva-shell-0.2.28 → eva-shell-0.2.30}/LICENSE +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/README.md +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/bin/eva +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/ap.py +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/charts.py +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/client.py +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/compl.py +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva4_shell/sharedobj.py +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva_shell.egg-info/SOURCES.txt +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva_shell.egg-info/dependency_links.txt +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva_shell.egg-info/requires.txt +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/eva_shell.egg-info/top_level.txt +0 -0
- {eva-shell-0.2.28 → eva-shell-0.2.30}/setup.cfg +0 -0
|
@@ -1460,7 +1460,7 @@ class CLI:
|
|
|
1460
1460
|
if current_command.json:
|
|
1461
1461
|
d['ip'] = ip
|
|
1462
1462
|
else:
|
|
1463
|
-
d.append({'name': 'IP
|
|
1463
|
+
d.append({'name': 'IP addr/host', 'value': ip})
|
|
1464
1464
|
print_result(d, need_header=False, name_value=False)
|
|
1465
1465
|
|
|
1466
1466
|
def mirror_set(self, mirror_url):
|
|
@@ -5,6 +5,7 @@ from neotermcolor import colored
|
|
|
5
5
|
from .sharedobj import common, current_command
|
|
6
6
|
from .cli import CLI
|
|
7
7
|
from .ap import init_ap
|
|
8
|
+
from .tools import is_local_shell
|
|
8
9
|
|
|
9
10
|
banner = """ _______ _____ _______________
|
|
10
11
|
/ ____/ | / / | / _/ ____/ ___/
|
|
@@ -19,13 +20,22 @@ dir_eva_default = '/opt/eva4'
|
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
def launch():
|
|
22
|
-
|
|
23
|
-
if
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
bus = os.environ.get('EVA_BUS')
|
|
24
|
+
if bus:
|
|
25
|
+
common.dir_eva = None
|
|
26
|
+
common.bus_path = bus
|
|
27
|
+
import socket
|
|
28
|
+
common.bus_name = f'eva-shell.{socket.gethostname()}.{os.getpid()}'
|
|
29
|
+
else:
|
|
30
|
+
common.dir_eva = os.environ.get('EVA_DIR', dir_eva_default)
|
|
31
|
+
if not os.path.exists(common.dir_eva):
|
|
32
|
+
raise RuntimeError(
|
|
33
|
+
f'EVA ICS directory not found. Consider installing EVA ICS either '
|
|
34
|
+
f'in {dir_eva_default} or specifying EVA_DIR env variable. '
|
|
35
|
+
f'For For a remote host, set EVA_BUS=HOST:PORT env variable'
|
|
36
|
+
)
|
|
37
|
+
common.bus_path = f'{common.dir_eva}/var/bus.ipc'
|
|
38
|
+
common.bus_name = f'eva-shell.{os.getpid()}'
|
|
29
39
|
|
|
30
40
|
common.cli = CLI()
|
|
31
41
|
|
|
@@ -20,7 +20,7 @@ def check_local_shell():
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def is_local_shell():
|
|
23
|
-
return
|
|
23
|
+
return common.dir_eva is not None
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
def ok():
|
|
@@ -93,19 +93,24 @@ def remove_file_lock(name):
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
def get_my_ip():
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
if common.bus_path:
|
|
97
|
+
if common.bus_path.startswith('/'):
|
|
98
|
+
try:
|
|
99
|
+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
100
|
+
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
|
101
|
+
s.connect(('255.255.255.255', 0))
|
|
102
|
+
ip = s.getsockname()[0]
|
|
103
|
+
try:
|
|
104
|
+
s.close()
|
|
105
|
+
except:
|
|
106
|
+
pass
|
|
107
|
+
except:
|
|
108
|
+
ip = None
|
|
109
|
+
return ip
|
|
110
|
+
else:
|
|
111
|
+
return common.bus_path.split(':')[0]
|
|
112
|
+
else:
|
|
113
|
+
return ''
|
|
109
114
|
|
|
110
115
|
TIME_ORD = {
|
|
111
116
|
'created': 0,
|
|
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
|