Revision bddc92ee lib/storage/bdev.py
b/lib/storage/bdev.py | ||
---|---|---|
127 | 127 |
|
128 | 128 |
@classmethod |
129 | 129 |
def Create(cls, unique_id, children, size, spindles, params, excl_stor, |
130 |
dyn_params): |
|
130 |
dyn_params, *args):
|
|
131 | 131 |
"""Create a new logical volume. |
132 | 132 |
|
133 | 133 |
""" |
... | ... | |
209 | 209 |
if result.failed: |
210 | 210 |
base.ThrowError("LV create failed (%s): %s", |
211 | 211 |
result.fail_reason, result.output) |
212 |
return LogicalVolume(unique_id, children, size, params, dyn_params) |
|
212 |
return LogicalVolume(unique_id, children, size, params, dyn_params, *args)
|
|
213 | 213 |
|
214 | 214 |
@staticmethod |
215 | 215 |
def _GetVolumeInfo(lvm_cmd, fields): |
... | ... | |
751 | 751 |
|
752 | 752 |
@classmethod |
753 | 753 |
def Create(cls, unique_id, children, size, spindles, params, excl_stor, |
754 |
dyn_params): |
|
754 |
dyn_params, *args):
|
|
755 | 755 |
"""Create a new device |
756 | 756 |
|
757 | 757 |
This is a noop, we only return a PersistentBlockDevice instance |
... | ... | |
760 | 760 |
if excl_stor: |
761 | 761 |
raise errors.ProgrammerError("Persistent block device requested with" |
762 | 762 |
" exclusive_storage") |
763 |
return PersistentBlockDevice(unique_id, children, 0, params, dyn_params) |
|
763 |
return PersistentBlockDevice(unique_id, children, 0, params, dyn_params, |
|
764 |
*args) |
|
764 | 765 |
|
765 | 766 |
def Remove(self): |
766 | 767 |
"""Remove a device |
... | ... | |
854 | 855 |
|
855 | 856 |
@classmethod |
856 | 857 |
def Create(cls, unique_id, children, size, spindles, params, excl_stor, |
857 |
dyn_params): |
|
858 |
dyn_params, *args):
|
|
858 | 859 |
"""Create a new rbd device. |
859 | 860 |
|
860 | 861 |
Provision a new rbd volume inside a RADOS pool. |
... | ... | |
877 | 878 |
base.ThrowError("rbd creation failed (%s): %s", |
878 | 879 |
result.fail_reason, result.output) |
879 | 880 |
|
880 |
return RADOSBlockDevice(unique_id, children, size, params, dyn_params) |
|
881 |
return RADOSBlockDevice(unique_id, children, size, params, dyn_params, |
|
882 |
*args) |
|
881 | 883 |
|
882 | 884 |
def Remove(self): |
883 | 885 |
"""Remove the rbd device. |
... | ... | |
1210 | 1212 |
|
1211 | 1213 |
""" |
1212 | 1214 |
super(ExtStorageDevice, self).__init__(unique_id, children, size, params, |
1213 |
dyn_params) |
|
1215 |
dyn_params, *args)
|
|
1214 | 1216 |
(self.name, self.uuid) = args |
1215 | 1217 |
|
1216 | 1218 |
if not isinstance(unique_id, (tuple, list)) or len(unique_id) != 2: |
... | ... | |
1245 | 1247 |
_ExtStorageAction(constants.ES_ACTION_CREATE, unique_id, |
1246 | 1248 |
params, size=str(size), name=name, uuid=uuid) |
1247 | 1249 |
|
1248 |
return ExtStorageDevice(unique_id, children, size, params, dyn_params) |
|
1250 |
return ExtStorageDevice(unique_id, children, size, params, dyn_params, |
|
1251 |
*args) |
|
1249 | 1252 |
|
1250 | 1253 |
def Remove(self): |
1251 | 1254 |
"""Remove the extstorage device. |
Also available in: Unified diff