Пример #1
0
    def test_vg_action_EDIT(self):
        model, vg = make_model_and_vg()
        self.assertActionPossible(vg, DeviceAction.EDIT)
        model.add_logical_volume(vg, 'lv1', size=vg.free_for_partitions // 2)
        self.assertActionNotPossible(vg, DeviceAction.EDIT)

        vg2 = make_vg(model)
        vg2.preserve = True
        self.assertActionNotPossible(vg2, DeviceAction.EDIT)
Пример #2
0
 def test_vg_action_DELETE(self):
     model, vg = make_model_and_vg()
     self.assertActionPossible(vg, DeviceAction.DELETE)
     self.assertActionPossible(vg, DeviceAction.DELETE)
     lv = model.add_logical_volume(vg,
                                   'lv0',
                                   size=vg.free_for_partitions // 2)
     self.assertActionPossible(vg, DeviceAction.DELETE)
     fs = model.add_filesystem(lv, 'ext4')
     self.assertActionPossible(vg, DeviceAction.DELETE)
     model.add_mount(fs, '/')
     self.assertActionNotPossible(vg, DeviceAction.DELETE)
Пример #3
0
 def test_vg_action_TOGGLE_BOOT(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.TOGGLE_BOOT)
Пример #4
0
 def test_vg_action_REMOVE(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.REMOVE)
Пример #5
0
 def test_vg_action_FORMAT(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.FORMAT)
Пример #6
0
 def test_vg_action_PARTITION(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.PARTITION)