Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
 def test_vg_action_TOGGLE_BOOT(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.TOGGLE_BOOT)
Ejemplo n.º 4
0
 def test_vg_action_REMOVE(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.REMOVE)
Ejemplo n.º 5
0
 def test_vg_action_FORMAT(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.FORMAT)
Ejemplo n.º 6
0
 def test_vg_action_PARTITION(self):
     model, vg = make_model_and_vg()
     self.assertActionNotSupported(vg, DeviceAction.PARTITION)