diff options
author | Andy Grover <agrover@redhat.com> | 2014-03-04 15:07:31 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-03-04 15:07:31 -0800 |
commit | 3c617b94d113bbad5cebe65440a7775ced16021d (patch) | |
tree | 27aef0e121558ae08c5ca2b3861709cb1a0e2884 | |
parent | ac62c75e4bb367e494fc1c82cfbe07cdc8099362 (diff) | |
download | targetcli-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.8 | 2 | ||||
-rw-r--r-- | 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) |