Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 859 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 859 Bytes

python-dmmp

Python(2 & 3) API of multipath-tools in LGPL 3.0+ license.

Install

python setup.py install

Usage

Sample code, for detailed usage, check help(dmmp):

import dmmp

for mpath in dmmp.mpaths_get():
    print("Got mpath: wwid '%s', name '%s'" % (mpath.wwid, mpath.name))
    for pg in mpath.path_groups:
        print("\tGot path group: id '%d', priority '%d', status '%d(%s)', "
              "selector '%s'" %
              (pg.id, pg.priority, pg.status, pg.status_string, pg.selector))

        for p in pg.paths:
            print("\t\tGot path: blk_name '%s', status '%d(%s)'" %
                  (p.blk_name, p.status, p.status_string))

Contact