# Make sure we have a dbus object representing it
LvCommon.validate_dbus_object(lv_uuid, lv_name)
# Remove the LV, if successful then remove from the model
- rc, out, err = cmdhandler.lv_remove(lv_name, remove_options)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.lv_remove(lv_name, remove_options))
return '/'
@dbus.service.method(
# Make sure we have a dbus object representing it
LvCommon.validate_dbus_object(lv_uuid, lv_name)
# Rename the logical volume
- rc, out, err = cmdhandler.lv_rename(lv_name, new_name,
- rename_options)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.lv_rename(lv_name, new_name,
+ rename_options))
return '/'
@dbus.service.method(
remainder = space % 512
optional_size = space + 512 - remainder
- rc, out, err = cmdhandler.vg_lv_snapshot(
- lv_name, snapshot_options, name, optional_size)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.vg_lv_snapshot(
+ lv_name, snapshot_options,name, optional_size))
full_name = "%s/%s" % (dbo.vg_name_lookup(), name)
return cfg.om.get_object_path_by_lvm_id(full_name)
-
@dbus.service.method(
dbus_interface=LV_INTERFACE,
in_signature='stia{sv}',
pv_dests.append((pv_dbus_obj.lvm_id, pr[1], pr[2]))
size_change = new_size_bytes - dbo.SizeBytes
- rc, out, err = cmdhandler.lv_resize(dbo.lvm_id, size_change,
- pv_dests, resize_options)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.lv_resize(
+ dbo.lvm_id, size_change,pv_dests, resize_options))
return "/"
@dbus.service.method(
options):
# Make sure we have a dbus object representing it
LvCommon.validate_dbus_object(uuid, lv_name)
- rc, out, err = cmdhandler.activate_deactivate(
- 'lvchange', lv_name, activate, control_flags, options)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.activate_deactivate(
+ 'lvchange', lv_name, activate, control_flags, options))
return '/'
@dbus.service.method(
def _add_rm_tags(uuid, lv_name, tags_add, tags_del, tag_options):
# Make sure we have a dbus object representing it
LvCommon.validate_dbus_object(uuid, lv_name)
- rc, out, err = cmdhandler.lv_tag(
- lv_name, tags_add, tags_del, tag_options)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.lv_tag(
+ lv_name, tags_add, tags_del, tag_options))
return '/'
@dbus.service.method(
def _lv_create(lv_uuid, lv_name, name, size_bytes, create_options):
# Make sure we have a dbus object representing it
dbo = LvCommon.validate_dbus_object(lv_uuid, lv_name)
-
- rc, out, err = cmdhandler.lv_lv_create(
- lv_name, create_options, name, size_bytes)
- LvCommon.handle_execute(rc, out, err)
+ LvCommon.handle_execute(*cmdhandler.lv_lv_create(
+ lv_name, create_options, name, size_bytes))
full_name = "%s/%s" % (dbo.vg_name_lookup(), name)
return cfg.om.get_object_path_by_lvm_id(full_name)
def _rename(uuid, vg_name, new_name, rename_options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_rename(
- uuid, new_name, rename_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_rename(
+ uuid, new_name, rename_options))
return '/'
@dbus.service.method(
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
# Remove the VG, if successful then remove from the model
- rc, out, err = cmdhandler.vg_remove(vg_name, remove_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_remove(vg_name, remove_options))
return '/'
@dbus.service.method(
@staticmethod
def _change(uuid, vg_name, change_options):
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_change(change_options, vg_name)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_change(change_options, vg_name))
return '/'
# TODO: This should be broken into a number of different methods
VG_INTERFACE,
'PV Object path not found = %s!' % pv_op)
- rc, out, err = cmdhandler.vg_reduce(vg_name, missing, pv_devices,
- reduce_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_reduce(
+ vg_name, missing, pv_devices, reduce_options))
return '/'
@dbus.service.method(
VG_INTERFACE, 'PV Object path not found = %s!' % i)
if len(extend_devices):
- rc, out, err = cmdhandler.vg_extend(vg_name, extend_devices,
- extend_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_extend(
+ vg_name, extend_devices, extend_options))
else:
raise dbus.exceptions.DBusException(
VG_INTERFACE, 'No pv_object_paths provided!')
pv_dests.append((pv_dbus_obj.lvm_id, pr[1], pr[2]))
- rc, out, err = cmdhandler.vg_lv_create(
- vg_name, create_options, name, size_bytes, pv_dests)
-
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_lv_create(
+ vg_name, create_options, name, size_bytes, pv_dests))
return Vg.fetch_new_lv(vg_name, name)
@dbus.service.method(
thin_pool, create_options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
-
- rc, out, err = cmdhandler.vg_lv_create_linear(
- vg_name, create_options, name, size_bytes, thin_pool)
-
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_lv_create_linear(
+ vg_name, create_options, name, size_bytes, thin_pool))
return Vg.fetch_new_lv(vg_name, name)
@dbus.service.method(
stripe_size_kb, thin_pool, create_options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_lv_create_striped(
+ Vg.handle_execute(*cmdhandler.vg_lv_create_striped(
vg_name, create_options, name, size_bytes,
- num_stripes, stripe_size_kb, thin_pool)
- Vg.handle_execute(rc, out, err)
+ num_stripes, stripe_size_kb, thin_pool))
return Vg.fetch_new_lv(vg_name, name)
@dbus.service.method(
num_copies, create_options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_lv_create_mirror(
- vg_name, create_options, name, size_bytes, num_copies)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_lv_create_mirror(
+ vg_name, create_options, name, size_bytes, num_copies))
return Vg.fetch_new_lv(vg_name, name)
@dbus.service.method(
num_stripes, stripe_size_kb, create_options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_lv_create_raid(
+ Vg.handle_execute(*cmdhandler.vg_lv_create_raid(
vg_name, create_options, name, raid_type, size_bytes,
- num_stripes, stripe_size_kb)
- Vg.handle_execute(rc, out, err)
+ num_stripes, stripe_size_kb))
return Vg.fetch_new_lv(vg_name, name)
@dbus.service.method(
raise dbus.exceptions.DBusException(
VG_INTERFACE, 'PV object path = %s not found' % p)
- rc, out, err = cmdhandler.pv_tag(
- pv_devices, tags_add, tags_del, tag_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.pv_tag(
+ pv_devices, tags_add, tags_del, tag_options))
return '/'
@dbus.service.method(
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.vg_tag(
- vg_name, tags_add, tags_del, tag_options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.vg_tag(
+ vg_name, tags_add, tags_del, tag_options))
return '/'
@dbus.service.method(
def _vg_change_set(uuid, vg_name, method, value, options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = method(vg_name, value, options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*method(vg_name, value, options))
return '/'
@dbus.service.method(
options):
# Make sure we have a dbus object representing it
Vg.validate_dbus_object(uuid, vg_name)
- rc, out, err = cmdhandler.activate_deactivate(
- 'vgchange', vg_name, activate, control_flags, options)
- Vg.handle_execute(rc, out, err)
+ Vg.handle_execute(*cmdhandler.activate_deactivate(
+ 'vgchange', vg_name, activate, control_flags, options))
return '/'
@dbus.service.method(