Skip to content

cathay4t/python-dmmp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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