Add Volume.removable field

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-04-27 17:17:32 +02:00
parent e757444c35
commit e30f894df9
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -58,13 +58,15 @@ class Volume(object):
script = None
usage = 0
def __init__(self, name, pool, volume_type, vid=None, size=0, **kwargs):
def __init__(self, name, pool, volume_type, vid=None, size=0,
removable=False, **kwargs):
super(Volume, self).__init__(**kwargs)
self.name = str(name)
self.pool = str(pool)
self.vid = vid
self.size = size
self.volume_type = volume_type
self.removable = removable
def __xml__(self):
return lxml.etree.Element('volume', **self.config)