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