[blivet] Port blivet to libblockdev

Vratislav Podzimek vpodzime at redhat.com
Sun Feb 1 18:15:50 UTC 2015


The new libblockdev library provides majority of the functionality provided by
the devicelibs modules so all the calls needs to be replaced and quite a lot of
code can be dropped.

I've intentionally kept LVM's configuration setting as a separate patch so that
the change is visible and it's easier to understand it without all the
surrounding noise. The opposite applies to the last patch that removes the
affected devicelibs tests as those should be transformed into libblockdev tests
and removed from blivet. Having these changes part of the related patches would
create quite a lot of noise and complicate the review process.

Vratislav Podzimek (11):
  First little step towards libblockdev
  Use BlockDev's mpath plugin instead of devicelibs/mpath.py
  Use BlockDev's swap plugin instead of devicelibs/swap.py
  Use BlockDev's MD plugin instead of devicelibs/mdraid.py
  Use BlockDev's loop plugin instead of devicelibs/loop.py
  Use BlockDev's crypto plugin instead of devicelibs/crypto.py
  Use the BlockDev's DM plugin instead of devicelibs/dm.py
  Use BlockDev's BTRFS plugin instead of devicelibs/btrfs.py
  Use BlockDev's LVM plugin instead of devicelibs/lvm.py
  Set and refresh BlockDev's global LVM config if needed
  Remove tests for the removed devicelibs modules

 blivet/__init__.py                               |  15 +-
 blivet/devicefactory.py                          |  29 +-
 blivet/devicelibs/btrfs.py                       | 167 -------
 blivet/devicelibs/crypto.py                      | 144 ------
 blivet/devicelibs/dm.py                          |  75 ----
 blivet/devicelibs/loop.py                        | 121 -----
 blivet/devicelibs/lvm.py                         | 535 +----------------------
 blivet/devicelibs/mdraid.py                      | 372 ----------------
 blivet/devicelibs/mpath.py                       |  31 --
 blivet/devicelibs/swap.py                        | 181 --------
 blivet/devices/btrfs.py                          |  33 +-
 blivet/devices/dm.py                             |  13 +-
 blivet/devices/loop.py                           |  11 +-
 blivet/devices/lvm.py                            |  71 ++-
 blivet/devices/md.py                             |  39 +-
 blivet/devices/partition.py                      |   5 +-
 blivet/devicetree.py                             | 151 ++++---
 blivet/formats/__init__.py                       |   8 +-
 blivet/formats/fs.py                             |   4 +-
 blivet/formats/luks.py                           |  49 ++-
 blivet/formats/lvmpv.py                          |  18 +-
 blivet/formats/mdraid.py                         |   5 +-
 blivet/formats/swap.py                           |  12 +-
 blivet/partitioning.py                           |   7 +-
 blivet/util.py                                   |   4 +-
 python-blivet.spec                               |   3 +
 tests/devicelibs_test/btrfs_test.py              | 198 ---------
 tests/devicelibs_test/crypto_test.py             | 185 --------
 tests/devicelibs_test/lvm_test.py                | 335 --------------
 tests/devicelibs_test/mdraid_interrogate_test.py | 231 ----------
 tests/devicelibs_test/mdraid_test.py             | 318 --------------
 tests/devicelibs_test/swap_test.py               |  74 ----
 tests/devices_test.py                            |   4 +-
 33 files changed, 261 insertions(+), 3187 deletions(-)
 delete mode 100644 blivet/devicelibs/dm.py
 delete mode 100644 blivet/devicelibs/loop.py
 delete mode 100644 blivet/devicelibs/mpath.py
 delete mode 100644 blivet/devicelibs/swap.py
 delete mode 100755 tests/devicelibs_test/btrfs_test.py
 delete mode 100755 tests/devicelibs_test/crypto_test.py
 delete mode 100755 tests/devicelibs_test/lvm_test.py
 delete mode 100755 tests/devicelibs_test/mdraid_interrogate_test.py
 delete mode 100755 tests/devicelibs_test/mdraid_test.py
 delete mode 100755 tests/devicelibs_test/swap_test.py

-- 
2.1.0



More information about the anaconda-patches mailing list