Пример #1
0
    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)
Пример #2
0
 def test_lv_action_TOGGLE_BOOT(self):
     model, lv = make_model_and_lv()
     self.assertActionNotSupported(lv, DeviceAction.TOGGLE_BOOT)
Пример #3
0
 def test_lv_action_REMOVE(self):
     model, lv = make_model_and_lv()
     self.assertActionNotSupported(lv, DeviceAction.REMOVE)
Пример #4
0
 def test_lv_action_FORMAT(self):
     model, lv = make_model_and_lv()
     self.assertActionNotSupported(lv, DeviceAction.FORMAT)
Пример #5
0
 def test_lv_action_CREATE_LV(self):
     model, lv = make_model_and_lv()
     self.assertActionNotSupported(lv, DeviceAction.CREATE_LV)
Пример #6
0
 def test_lv_action_PARTITION(self):
     model, lv = make_model_and_lv()
     self.assertActionNotSupported(lv, DeviceAction.PARTITION)
Пример #7
0
 def test_lv_action_EDIT(self):
     model, lv = make_model_and_lv()
     self.assertActionPossible(lv, DeviceAction.EDIT)