[node-patches] Change in ovirt-node[master]: utils: Add SystemRelease convenience function
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Jun 27 14:56:56 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: utils: Add SystemRelease convenience function
......................................................................
utils: Add SystemRelease convenience function
To have an easy way to check for fedora or EL linuxes.
Change-Id: Id4c69cd8de1f549305032ff5314817a5b63cb2b7
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/utils/system.py
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/01/16201/1
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 296edec..59178df 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -166,6 +166,16 @@
self.CPE_FILE)
self.VENDOR, self.PRODUCT, self.VERSION = cpe_parts[2:5]
+ def is_fedora(self):
+ """Determin if this system is a fedora system
+ """
+ return self.PRODUCT.lower() == "fedora"
+
+ def is_el(self):
+ """Determin if this system is an "enterprise linux" (RHEL, CentOS)
+ """
+ raise NotImplementedError()
+
class ProductInformation(base.Base):
"""Return oVirt Node product informations
--
To view, visit http://gerrit.ovirt.org/16201
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4c69cd8de1f549305032ff5314817a5b63cb2b7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list