master - lvmdbusd: Create correct LV object type
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cdf06044e189ec1adeaba101a21598c31752b9cd Commit: cdf06044e189ec1adeaba101a21598c31752b9cd Parent: b81186e535f0c93ef8b276cfb2b7bcf55268aec0 Author: Tony Asleson <[email protected]> AuthorDate: Fri Jun 10 12:11:17 2016 -0500 Committer: Tony Asleson <[email protected]> CommitterDate: Fri Jun 10 16:05:03 2016 -0500
lvmdbusd: Create correct LV object type
We were initially looking to see if an LV was hidden and if it was we were creating an instance of a LvCommon object to represent it. Thus if we had a hidden cache pool for example we were missing the methods and properties for the cache pool. However, when we create the object path, any hidden LVs, regardless of type/functionality will be placed in the hidden path.
--- daemons/lvmdbusd/lv.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
daemons/lvmdbusd/lv.py +2 -2
@@ -176,8 +176,6 @@ class LvState(State): self.Name, (self.Attr, self.layout, self.role)) def _object_type_create(self): - if self.Name[0] == '[': - return LvCommon if self.Attr[0] == 't': return LvThinPool elif self.Attr[0] == 'C':
@@ -185,6 +183,8 @@ class LvState(State): return LvCachePool else: return LvCacheLv + elif self.Name[0] == '[': + return LvCommon elif self.OriginLv != '/': return LvSnapShot else: