diff --git a/daemons/lvmdbusd/vg.py b/daemons/lvmdbusd/vg.py index 3b358734b..70ccad6f2 100644 --- a/daemons/lvmdbusd/vg.py +++ b/daemons/lvmdbusd/vg.py @@ -146,7 +146,7 @@ class Vg(AutomatedProperties): @staticmethod def fetch_new_lv(vg_name, lv_name): cfg.load() - return cfg.om.get_object_by_lvm_id("%s/%s" % (vg_name, lv_name)) + return cfg.om.get_object_path_by_lvm_id("%s/%s" % (vg_name, lv_name)) @staticmethod def _rename(uuid, vg_name, new_name, rename_options): diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py index ea3f22083..6943da5b3 100755 --- a/test/dbus/lvmdbustest.py +++ b/test/dbus/lvmdbustest.py @@ -387,6 +387,17 @@ class TestDbusService(unittest.TestCase): (rs(8, '_lv'), mib(4), dbus.Array([], '(ott)'), -1, {}), vg) + def test_lv_create_job(self): + + vg = self._vg_create().Vg + (object_path, job_path) = vg.LvCreate(rs(8, '_lv'), mib(4), + dbus.Array([], '(ott)'), 0, {}) + + self.assertTrue(object_path == '/') + self.assertTrue(job_path != '/') + object_path = self._wait_for_job(job_path) + self.assertTrue(object_path != '/') + def test_lv_create_linear(self): vg = self._vg_create().Vg