From 3c617b94d113bbad5cebe65440a7775ced16021d Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Tue, 4 Mar 2014 15:07:31 -0800 Subject: 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 --- targetcli.8 | 2 -- targetcli/ui_target.py | 3 +++ 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) -- cgit v1.2.1