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