Add unittest for DRBD8 drdbsetup show parser
This patch changes the bdev.DRBD8._GetDevInfo to take a string instead of a minor, separates the `drbdsetup show` invocation into a new separate method (bdev.DRBD8._GetShowData) and modifies the rest of the DRBD8 class to make the appropriate calls. It also adds a unittest script and data files for testing various cases of device output. Reviewed-by: imsnah
Showing
- lib/bdev.py 24 additions, 15 deletionslib/bdev.py
- test/Makefile.am 3 additions, 1 deletiontest/Makefile.am
- test/data/bdev-both.txt 35 additions, 0 deletionstest/data/bdev-both.txt
- test/data/bdev-disk.txt 15 additions, 0 deletionstest/data/bdev-disk.txt
- test/data/bdev-net.txt 28 additions, 0 deletionstest/data/bdev-net.txt
- test/ganeti.bdev_unittest.py 96 additions, 0 deletionstest/ganeti.bdev_unittest.py
Loading
Please register or sign in to comment