summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2014-01-03 12:35:26 -0800
committerAndy Grover <agrover@redhat.com>2014-01-03 12:35:26 -0800
commitc48a8f59f1b053e41ba8af3bd6fa8ff93a716274 (patch)
tree5fc46e259b98ec255cf1002944347c5a4931811f
parent248970b0d225668b7bbbaa7617b810a6c1244a2a (diff)
downloadrtslib-fb-c48a8f59f1b053e41ba8af3bd6fa8ff93a716274.tar.gz
Add support for RTSRoot().mapped_luns
Added for completeness. Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r--rtslib/root.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rtslib/root.py b/rtslib/root.py
index f76f800..03745ac 100644
--- a/rtslib/root.py
+++ b/rtslib/root.py
@@ -98,6 +98,12 @@ class RTSRoot(CFSNode):
for node_acl in t.node_acls:
yield node_acl
+ def _list_mapped_luns(self):
+ self._check_self()
+ for na in self.node_acls:
+ for mlun in na.mapped_luns:
+ yield mlun
+
def _list_network_portals(self):
self._check_self()
for t in self.tpgs:
@@ -259,6 +265,8 @@ class RTSRoot(CFSNode):
doc="Get the list of all the existing TPG objects.")
node_acls = property(_list_node_acls,
doc="Get the list of all the existing NodeACL objects.")
+ mapped_luns = property(_list_mapped_luns,
+ doc="Get the list of all the existing MappedLUN objects.")
sessions = property(_list_sessions,
doc="Get the list of all the existing sessions.")
network_portals = property(_list_network_portals,