summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2014-03-04 15:07:31 -0800
committerAndy Grover <agrover@redhat.com>2014-03-04 15:07:31 -0800
commit3c617b94d113bbad5cebe65440a7775ced16021d (patch)
tree27aef0e121558ae08c5ca2b3861709cb1a0e2884
parentac62c75e4bb367e494fc1c82cfbe07cdc8099362 (diff)
downloadtargetcli-3c617b94d113bbad5cebe65440a7775ced16021d.tar.gz
Auto-create a portal for new TPGs that support them
Makes things a little easier. Update manpage quickstart to no longer require this step. Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r--targetcli.82
-rw-r--r--targetcli/ui_target.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/targetcli.8 b/targetcli.8
index dda5f01..02b7433 100644
--- a/targetcli.8
+++ b/targetcli.8
@@ -57,8 +57,6 @@ $ sudo targetcli
.br
/> cd iscsi/iqn.2006-04.example.com:test-target/tpg1/
.br
-tpg1/> portals/ create
-.br
tpg1/> luns/ create /backstores/fileio/test
.br
tpg1/> set attribute generate_node_acls=1
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index c7f947a..1c96ab3 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -321,6 +321,9 @@ class UIMultiTPGTarget(UIRTSLibNode):
if tpg.has_feature("auth"):
tpg.set_attribute("authentication", 0)
+ if tpg.has_feature("nps"):
+ NetworkPortal(tpg, "0.0.0.0")
+
self.shell.log.info("Created TPG %s." % tpg.tag)
ui_tpg = UITPG(tpg, self)
return self.new_node(ui_tpg)