targetcli 3.0.0.dev0__py3-none-any.whl → 3.0.1__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.
- targetcli/targetcli_shell.py +6 -6
- targetcli/targetclid.py +1 -1
- targetcli/ui_backstore.py +3 -3
- targetcli/ui_node.py +1 -1
- targetcli/ui_root.py +3 -3
- targetcli/ui_target.py +10 -9
- {targetcli-3.0.0.dev0.dist-info → targetcli-3.0.1.dist-info}/METADATA +5 -5
- targetcli-3.0.1.dist-info/RECORD +12 -0
- targetcli-3.0.0.dev0.dist-info/RECORD +0 -12
- {targetcli-3.0.0.dev0.dist-info → targetcli-3.0.1.dist-info}/WHEEL +0 -0
- {targetcli-3.0.0.dev0.dist-info → targetcli-3.0.1.dist-info}/entry_points.txt +0 -0
- {targetcli-3.0.0.dev0.dist-info → targetcli-3.0.1.dist-info}/licenses/COPYING +0 -0
targetcli/targetcli_shell.py
CHANGED
|
@@ -26,8 +26,8 @@ import struct
|
|
|
26
26
|
import sys
|
|
27
27
|
from os import getenv, getuid
|
|
28
28
|
|
|
29
|
-
from
|
|
30
|
-
from
|
|
29
|
+
from configshell import ConfigShell, ExecutionError
|
|
30
|
+
from rtslib import RTSLibError
|
|
31
31
|
|
|
32
32
|
from targetcli import __version__ as targetcli_version
|
|
33
33
|
from targetcli.ui_root import UIRoot
|
|
@@ -308,11 +308,11 @@ def main():
|
|
|
308
308
|
if not is_root:
|
|
309
309
|
shell.con.display("You are not root, disabling privileged commands.\n")
|
|
310
310
|
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
while not shell._exit:
|
|
312
|
+
try:
|
|
313
313
|
shell.run_interactive()
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
except (RTSLibError, ExecutionError) as msg: # noqa: PERF203 - would otherwise exit shell
|
|
315
|
+
shell.log.error(str(msg))
|
|
316
316
|
|
|
317
317
|
if shell.prefs['auto_save_on_exit'] and is_root:
|
|
318
318
|
shell.log.info("Global pref auto_save_on_exit=true")
|
targetcli/targetclid.py
CHANGED
|
@@ -31,7 +31,7 @@ from os import getenv, getuid
|
|
|
31
31
|
from pathlib import Path
|
|
32
32
|
from threading import Thread
|
|
33
33
|
|
|
34
|
-
from
|
|
34
|
+
from configshell import ConfigShell
|
|
35
35
|
|
|
36
36
|
from targetcli import __version__ as targetcli_version
|
|
37
37
|
from targetcli.ui_root import UIRoot
|
targetcli/ui_backstore.py
CHANGED
|
@@ -26,9 +26,9 @@ import stat
|
|
|
26
26
|
import struct
|
|
27
27
|
from pathlib import Path
|
|
28
28
|
|
|
29
|
-
from
|
|
29
|
+
from configshell import ExecutionError
|
|
30
30
|
from gi.repository import Gio
|
|
31
|
-
from
|
|
31
|
+
from rtslib import (
|
|
32
32
|
ALUATargetPortGroup,
|
|
33
33
|
BlockStorageObject,
|
|
34
34
|
FileIOStorageObject,
|
|
@@ -38,7 +38,7 @@ from rtslib_fb import (
|
|
|
38
38
|
RTSRoot,
|
|
39
39
|
UserBackedStorageObject,
|
|
40
40
|
)
|
|
41
|
-
from
|
|
41
|
+
from rtslib.utils import get_block_type
|
|
42
42
|
|
|
43
43
|
from .ui_node import UINode, UIRTSLibNode
|
|
44
44
|
|
targetcli/ui_node.py
CHANGED
targetcli/ui_root.py
CHANGED
|
@@ -26,9 +26,9 @@ from datetime import datetime
|
|
|
26
26
|
from glob import glob
|
|
27
27
|
from pathlib import Path, PurePosixPath
|
|
28
28
|
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
29
|
+
from configshell import ExecutionError
|
|
30
|
+
from rtslib import RTSRoot
|
|
31
|
+
from rtslib.utils import ignored
|
|
32
32
|
|
|
33
33
|
from targetcli import __version__
|
|
34
34
|
|
targetcli/ui_target.py
CHANGED
|
@@ -24,8 +24,8 @@ except ImportError:
|
|
|
24
24
|
ethtool = None
|
|
25
25
|
import stat
|
|
26
26
|
|
|
27
|
-
from
|
|
28
|
-
from
|
|
27
|
+
from configshell import ExecutionError
|
|
28
|
+
from rtslib import (
|
|
29
29
|
LUN,
|
|
30
30
|
TPG,
|
|
31
31
|
MappedLUN,
|
|
@@ -43,6 +43,7 @@ from .ui_node import UINode, UIRTSLibNode
|
|
|
43
43
|
auth_params = ('userid', 'password', 'mutual_userid', 'mutual_password')
|
|
44
44
|
int_params = ('enable',)
|
|
45
45
|
discovery_params = auth_params + int_params
|
|
46
|
+
default_portal_listen = "::0"
|
|
46
47
|
|
|
47
48
|
class UIFabricModule(UIRTSLibNode):
|
|
48
49
|
'''
|
|
@@ -340,10 +341,10 @@ class UIMultiTPGTarget(UIRTSLibNode):
|
|
|
340
341
|
|
|
341
342
|
if tpg.has_feature("nps") and self.shell.prefs['auto_add_default_portal']:
|
|
342
343
|
try:
|
|
343
|
-
NetworkPortal(tpg, "
|
|
344
|
+
NetworkPortal(tpg, f"[{default_portal_listen}]")
|
|
344
345
|
self.shell.log.info("Global pref auto_add_default_portal=true")
|
|
345
346
|
self.shell.log.info("Created default portal listening on all IPs"
|
|
346
|
-
" (
|
|
347
|
+
f" ({default_portal_listen}), port 3260.")
|
|
347
348
|
except RTSLibError:
|
|
348
349
|
self.shell.log.info("Default portal not created, TPGs within a target cannot share ip:port.")
|
|
349
350
|
|
|
@@ -1280,9 +1281,9 @@ class UIPortals(UINode):
|
|
|
1280
1281
|
Creates a Network Portal with the specified IP address and
|
|
1281
1282
|
port. If the port is omitted, the default port for
|
|
1282
1283
|
the target fabric will be used. If the IP address is omitted,
|
|
1283
|
-
|
|
1284
|
+
IN6ADDR_ANY (::0) will be used.
|
|
1284
1285
|
|
|
1285
|
-
|
|
1286
|
+
The default IN6ADDR_ANY (::0) will listen on all IPv6 interfaces
|
|
1286
1287
|
as well as IPv4, assuming IPV6_V6ONLY sockopt has not been
|
|
1287
1288
|
set.
|
|
1288
1289
|
|
|
@@ -1298,12 +1299,12 @@ class UIPortals(UINode):
|
|
|
1298
1299
|
# FIXME: Add a specfile parameter to determine default port
|
|
1299
1300
|
default_port = 3260
|
|
1300
1301
|
ip_port = self.ui_eval_param(ip_port, 'number', default_port)
|
|
1301
|
-
ip_address = self.ui_eval_param(ip_address, 'string',
|
|
1302
|
+
ip_address = self.ui_eval_param(ip_address, 'string', default_portal_listen)
|
|
1302
1303
|
|
|
1303
1304
|
if ip_port == default_port:
|
|
1304
1305
|
self.shell.log.info("Using default IP port %d" % ip_port)
|
|
1305
|
-
if ip_address ==
|
|
1306
|
-
self.shell.log.info("Binding to INADDR_ANY (
|
|
1306
|
+
if ip_address == default_portal_listen:
|
|
1307
|
+
self.shell.log.info(f"Binding to INADDR_ANY ({default_portal_listen})")
|
|
1307
1308
|
|
|
1308
1309
|
portal = NetworkPortal(self.tpg, self._canonicalize_ip(ip_address),
|
|
1309
1310
|
ip_port, mode='create')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: targetcli
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: A command shell for managing the Linux LIO kernel target
|
|
5
5
|
Project-URL: Homepage, http://github.com/open-iscsi/targetcli-fb
|
|
6
6
|
Author-email: Andy Grover <agrover@redhat.com>
|
|
@@ -50,10 +50,10 @@ Contribute
|
|
|
50
50
|
----------
|
|
51
51
|
targetcli complies with PEP 621 and as such can be built and installed with tools like `build` and `pip`.
|
|
52
52
|
|
|
53
|
-
For development, consider using [Hatch](https://hatch.pypa.io):
|
|
54
|
-
`hatch shell` to create and enter a Python virtualenv with the project installed in editable mode
|
|
55
|
-
`pre-commit install` to enable pre-commit hooks
|
|
56
|
-
`hatch build` to create tarball and wheel
|
|
53
|
+
For development, consider using [Hatch](https://hatch.pypa.io):
|
|
54
|
+
`hatch shell` to create and enter a Python virtualenv with the project installed in editable mode
|
|
55
|
+
`pre-commit install` to enable pre-commit hooks
|
|
56
|
+
`hatch build` to create tarball and wheel
|
|
57
57
|
|
|
58
58
|
"fb" -- "free branch"
|
|
59
59
|
---------------------
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
targetcli/__init__.py,sha256=iZNlmonorHvJu0UpZfsv5etvmnrS2d-HkAF3b96HNZc,687
|
|
2
|
+
targetcli/targetcli_shell.py,sha256=FKElbb1kpMNfxPjDxA5IgJM_hESJie4lGH_goenbsVQ,10536
|
|
3
|
+
targetcli/targetclid.py,sha256=7yuNy_nSmjEdabQYMIozse94wZ5cfFcuXKTXLeSjCKk,8084
|
|
4
|
+
targetcli/ui_backstore.py,sha256=bR413k_nHFiK1yvkWCwwXO4nl74Mmht3spk7oUjmihY,28819
|
|
5
|
+
targetcli/ui_node.py,sha256=qN_RlwwAXrIa7pqkj6IGtoWnlvldglwdg8xyFDYAC8s,8061
|
|
6
|
+
targetcli/ui_root.py,sha256=rhUMSA9cw7Jva0ygd3N2OsRjhafkKbKY_srLBSAibjI,11592
|
|
7
|
+
targetcli/ui_target.py,sha256=S2Lb3d-PyeRHP1d9x8N_las5TnFE_dfknDNEu49YiV4,52702
|
|
8
|
+
targetcli-3.0.1.dist-info/METADATA,sha256=HDPc5-yVKyxExstYYIY02CjMO8wxA9ptN5Kba-9UOYY,2723
|
|
9
|
+
targetcli-3.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
targetcli-3.0.1.dist-info/entry_points.txt,sha256=MtQd0tPfd29i4LpVFHz5L6FNO6JiWE3_q4Ae8d4486Y,100
|
|
11
|
+
targetcli-3.0.1.dist-info/licenses/COPYING,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
12
|
+
targetcli-3.0.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
targetcli/__init__.py,sha256=iZNlmonorHvJu0UpZfsv5etvmnrS2d-HkAF3b96HNZc,687
|
|
2
|
-
targetcli/targetcli_shell.py,sha256=w_ZLBafghcmUJRnIFFKrpL_LPlh72xyNhSoFUdihxcs,10488
|
|
3
|
-
targetcli/targetclid.py,sha256=FnkZDqEauojbFwmykykoMe7QF11Fzqxm1M_H2DlO4Io,8087
|
|
4
|
-
targetcli/ui_backstore.py,sha256=HdC424T-qH4oGvPGnVAYXpKFkJj8wqY39df-gf5WRBE,28828
|
|
5
|
-
targetcli/ui_node.py,sha256=4wv8DOZBY1xcCB4gtdV7aGE4q3-In6dzxw8l_c5e1XE,8064
|
|
6
|
-
targetcli/ui_root.py,sha256=nBwMpjPFeTbro8-6-1jYFby8Ya7THO9OGfrw2hv3CGU,11601
|
|
7
|
-
targetcli/ui_target.py,sha256=yYi-5YCUATWyhBt_9b-iFvWtEHrnM81Q0Kzfm9bySUw,52601
|
|
8
|
-
targetcli-3.0.0.dev0.dist-info/METADATA,sha256=3gt23WiuZnaPvCPpmD-3SNOjGhh5QLYfjzRSpA8O8wI,2720
|
|
9
|
-
targetcli-3.0.0.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
-
targetcli-3.0.0.dev0.dist-info/entry_points.txt,sha256=MtQd0tPfd29i4LpVFHz5L6FNO6JiWE3_q4Ae8d4486Y,100
|
|
11
|
-
targetcli-3.0.0.dev0.dist-info/licenses/COPYING,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
12
|
-
targetcli-3.0.0.dev0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|