def test_lv_action_DELETE(self): model, lv = make_model_and_lv() self.assertActionPossible(lv, DeviceAction.DELETE) fs = model.add_filesystem(lv, 'ext4') self.assertActionPossible(lv, DeviceAction.DELETE) model.add_mount(fs, '/') self.assertActionPossible(lv, DeviceAction.DELETE) lv2 = make_lv(model) lv2.preserve = lv2.volgroup.preserve = True self.assertActionNotPossible(lv2, DeviceAction.DELETE)
def test_lv_action_TOGGLE_BOOT(self): model, lv = make_model_and_lv() self.assertActionNotSupported(lv, DeviceAction.TOGGLE_BOOT)
def test_lv_action_REMOVE(self): model, lv = make_model_and_lv() self.assertActionNotSupported(lv, DeviceAction.REMOVE)
def test_lv_action_FORMAT(self): model, lv = make_model_and_lv() self.assertActionNotSupported(lv, DeviceAction.FORMAT)
def test_lv_action_CREATE_LV(self): model, lv = make_model_and_lv() self.assertActionNotSupported(lv, DeviceAction.CREATE_LV)
def test_lv_action_PARTITION(self): model, lv = make_model_and_lv() self.assertActionNotSupported(lv, DeviceAction.PARTITION)
def test_lv_action_EDIT(self): model, lv = make_model_and_lv() self.assertActionPossible(lv, DeviceAction.EDIT)