Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 377b25c

Browse files
committed
Remove unused get_type method from StorageVolume.
1 parent 71252ba commit 377b25c

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

virtinst/Storage.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,6 @@ def get_object_type(self):
100100
# 'pool' or 'volume'
101101
return self._object_type
102102
object_type = property(get_object_type)
103-
def get_type(self):
104-
raise RuntimeError, "Must be implemented in child class."
105-
type = property(get_type, doc=\
106-
"""
107-
type of the underlying object. could be "dir" for a pool, etc.
108-
""")
109103

110104
def get_conn(self):
111105
return self._conn
@@ -186,7 +180,7 @@ def get_xml_config(self):
186180
@returns: xml description
187181
@rtype: C{str}
188182
"""
189-
if self.type is None:
183+
if not hasattr(self, "type"):
190184
root_xml = "<%s>\n" % self.object_type
191185
else:
192186
root_xml = "<%s type='%s'>\n" % (self.object_type, self.type)
@@ -283,7 +277,8 @@ def __init__(self, conn, name, type, target_path=None, uuid=None):
283277
# Properties used by all pools
284278
def get_type(self):
285279
return self._type
286-
type = property(get_type)
280+
type = property(get_type,
281+
doc=_("Storage device type the pool will represent."))
287282

288283
def get_target_path(self):
289284
return self._target_path
@@ -772,10 +767,6 @@ def lookup_pool_by_name(pool_object=None, pool_name=None, conn=None):
772767
lookup_pool_by_name = staticmethod(lookup_pool_by_name)
773768

774769

775-
def get_type(self):
776-
return None
777-
type = property(get_type)
778-
779770
# Properties used by all volumes
780771
def get_capacity(self):
781772
return self._capacity

0 commit comments

Comments
 (0)