Bug 1378959 - libdm-stats: add python bindings
Summary: libdm-stats: add python bindings
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.166
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Bryn M. Reeves
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-23 16:05 UTC by Bryn M. Reeves
Modified: 2019-10-07 15:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-07 15:08:28 UTC
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Bryn M. Reeves 2016-09-23 16:05:55 UTC
Description of problem:
Some new dmstats functionality is being developed in python, rather than directly in C:

  https://github.com/bmr-cymru/dmioscope

This would be easier, and more efficient, using direct python bindings for the libdm-stats interface. Currently for e.g., getting counter or metric values involves fork()ing, exec()ing, the actual ioctls to retrieve the data, and then a bunch of useless string and int munging as the data is passed on stdout.

Version-Release number of selected component (if applicable):
2.02.166

How reproducible:
100%

Steps to Reproduce:
1. Launch python and attempt to import a dmstats module:
$ python
Python 2.7.12 (default, Sep  2 2016, 14:46:00) 
[GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dmstats


Actual results:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named dmstats
>>> import libdmstats
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named libdmstats
>>> 

Expected results:
>>> print dmstats.version
1.02.$SOMETHING

Additional info:

GitHub issue to switch dmioscope to a python interface:

  https://github.com/bmr-cymru/dmioscope/issues/2


Note You need to log in before you can comment on or make changes to this bug.