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