[node-patches] Change in ovirt-node[master]: system: Add node_version stuff

hadong0720 at gmail.com hadong0720 at gmail.com
Wed Jul 16 08:13:33 UTC 2014


hadong has uploaded a new change for review.

Change subject: system: Add node_version stuff
......................................................................

system: Add node_version stuff

Change-Id: I81ee2da0d4e5c791fa7b90e07ea661178534bc68
Signed-off-by: hadong <hadong at redhat.com>
---
M src/ovirt/node/utils/system.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/45/30145/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 53cbd0e..214673c 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -115,6 +115,13 @@
                in ["rescue", "S", "single", "1"])
 
 
+def node_version():
+    """Return the version of the ovirt-node package
+    This is the package version at runtime
+    """
+    return RpmPackage("ovirt-node").nvr().version
+
+
 def _parse_lscpu(data):
     """Parse the lines of the lscpu output
 


-- 
To view, visit http://gerrit.ovirt.org/30145
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81ee2da0d4e5c791fa7b90e07ea661178534bc68
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list