]> www.infradead.org Git - users/dhowells/kafs-utils.git/commit
Add a convenience module for partition ID handling
authorDavid Howells <dhowells@redhat.com>
Thu, 10 Apr 2014 10:17:25 +0000 (11:17 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 10 Apr 2014 10:17:25 +0000 (11:17 +0100)
commitebdfc57fda7bcf425b3935b035bd5866f79e28c0
tree4c7e362e1e80785b0f0fcd70a960f68b813291a4
parent634459ce333b7ada783b8a76d787f105db480356
Add a convenience module for partition ID handling

Add a convenience module for partition ID handling.  One function translates
"/vicepX[Y]", "vicepX[Y]", "X[Y]" and "N" into a numeric ID and range checks
it.  Another function translates a numeric ID back into "/vicepX[Y]".

Make the argument parser use it.

Signed-off-by: David Howells <dhowells@redhat.com>
suite/argparse.py
suite/lib/partition.py [new file with mode: 0644]