Skip to content

cathay4t/python-dmmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python API of multipath-tools(device-mapper-multipath)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages