Skip to content

Commit

Permalink
Handle backstores that lack udev_path in LUN summary
Browse files Browse the repository at this point in the history
Along with ramdisk, the user backstore also doesn't have a udev_path.
Instead of hardcoding plugin names, just omit the udev path and the parens
from the summary if not present.

Signed-off-by: Andy Grover <agrover@redhat.com>
  • Loading branch information
Andy Grover committed Oct 13, 2015
1 parent 2dd1100 commit 7b01436
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions targetcli/ui_target.py
Expand Up @@ -1251,12 +1251,9 @@ def summary(self):
description = "BROKEN STORAGE LINK"
is_healthy = False
else:
if storage_object.plugin == "ramdisk":
description = "%s/%s" % (storage_object.plugin, storage_object.name,)
else:
description = "%s/%s (%s)" % (storage_object.plugin,
storage_object.name,
storage_object.udev_path)
description = "%s/%s" % (storage_object.plugin, storage_object.name,)
if storage_object.udev_path:
description += " (%s)" % storage_object.udev_path

return (description, is_healthy)

Expand Down

0 comments on commit 7b01436

Please sign in to comment.