Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only show fabrics present in the system

Don't show fabrics that need physical WWNs unless they are present.
Showing them is just clutter.

Simplify target summary.

Signed-off-by: Andy Grover <agrover@redhat.com>
  • Loading branch information...
commit e302e0b781a38d852d89e4faf3a29689b10f5f0d 1 parent befa397
@agrover authored
Showing with 5 additions and 8 deletions.
  1. +4 −2 targetcli/ui_root.py
  2. +1 −6 targetcli/ui_target.py
View
6 targetcli/ui_root.py
@@ -46,8 +46,10 @@ def refresh(self):
UIBackstores(self)
- for fabric_module in RTSRoot().fabric_modules:
- UIFabricModule(fabric_module, self)
+ # only show fabrics present in the system
+ for fm in RTSRoot().fabric_modules:
+ if (not fm.needs_wwn()) or fm.spec['wwn_list']:
+ UIFabricModule(fm, self)
def ui_command_saveconfig(self, savefile=default_save_file):
'''
View
7 targetcli/ui_target.py
@@ -150,12 +150,7 @@ def refresh(self):
def summary(self):
no_targets = len(self._children)
status = None
- if self.rtsnode.needs_wwn() and not self.rtsnode.spec['wwn_list']:
- msg = "Not found"
- elif no_targets > 1:
- msg = "%d Targets" % no_targets
- else:
- msg = "%d Target" % no_targets
+ msg = "%d Targets" % no_targets
fm = self.rtsnode
if fm.has_feature('discovery_auth') and fm.discovery_enable_auth:
Please sign in to comment.
Something went wrong with that request. Please try again.