Change in vdsm[master]: udevadm: add docstring to 'trigger' function

mpolednik at redhat.com mpolednik at redhat.com
Thu Aug 13 13:00:09 UTC 2015


Martin Polednik has uploaded a new change for review.

Change subject: udevadm: add docstring to 'trigger' function
......................................................................

udevadm: add docstring to 'trigger' function

Change-Id: Ieb1dd9d87ff184c758c2e5ce4acbbab8d531fa7b
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M lib/vdsm/udevadm.py
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/44817/1

diff --git a/lib/vdsm/udevadm.py b/lib/vdsm/udevadm.py
index 89fb30c..52f6850 100644
--- a/lib/vdsm/udevadm.py
+++ b/lib/vdsm/udevadm.py
@@ -65,6 +65,29 @@
 
 
 def trigger(attr_matches=(), property_matches=()):
+    '''
+    Request device events from the kernel.
+
+    Arguments:
+
+    attr_matches        List of 2-tuples that contain attribute name and it's
+                        value. These are expanded like this:
+
+                        [('a', 'b'), ('c', 'd')] ~>
+                        --attr-match=a=b --attr-match=c=d
+
+                        and causes only events from devices that match given
+                        attributes to be triggered.
+
+    property_matches    Similar to attr_matches. Expects list of 2-tuples
+                        that expand in similar fashion, that is
+
+                        [('a', 'b'), ('c', 'd')] ~>
+                        --property-match=a=b --property-match=c=d
+
+                        and causes only events from devices that match given
+                        property to be triggered.
+    '''
     _reload()
     cmd = ['trigger', '--verbose', '--action', 'change']
 


-- 
To view, visit https://gerrit.ovirt.org/44817
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb1dd9d87ff184c758c2e5ce4acbbab8d531fa7b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>


More information about the vdsm-patches mailing list