def test_vg_add_delete_tags(tmp_storage): dev_size = 20 * 1024**3 dev = tmp_storage.create_device(dev_size) vg_name = str(uuid.uuid4()) lvm.set_read_only(False) lvm.createVG(vg_name, [dev], "initial-tag", 128) lvm.changeVGTags(vg_name, delTags=("initial-tag", ), addTags=("new-tag-1", "new-tag-2")) lvm.changeVGTags(vg_name, delTags=["initial-tag"], addTags=["new-tag-1", "new-tag-2"]) vg = lvm.getVG(vg_name) assert sorted(vg.tags) == ["new-tag-1", "new-tag-2"]
def test_vg_add_delete_tags(tmp_storage): dev_size = 20 * 1024**3 dev = tmp_storage.create_device(dev_size) vg_name = str(uuid.uuid4()) lvm.set_read_only(False) lvm.createVG(vg_name, [dev], "initial-tag", 128) lvm.changeVGTags( vg_name, delTags=("initial-tag",), addTags=("new-tag-1", "new-tag-2")) lvm.changeVGTags( vg_name, delTags=["initial-tag"], addTags=["new-tag-1", "new-tag-2"]) vg = lvm.getVG(vg_name) assert sorted(vg.tags) == ["new-tag-1", "new-tag-2"]