Hello Alon Bar-Lev,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/28486

to review the following change.

Change subject: utils: add isOvirtNode function.
......................................................................

utils: add isOvirtNode function.

Change-Id: I82207f674f9d1854f9fdddd0804de611073a794c
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M lib/vdsm/utils.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/28486/1

diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index 4e60acf..77fafda 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -1105,6 +1105,14 @@
     sys.exit(-3)
 
 
+@memoized
+def isOvirtNode():
+    return (
+        os.path.exists('/etc/rhev-hypervisor-release') or
+        glob.glob('/etc/ovirt-node-*-release')
+    )
+
+
 # Copied from
 # http://docs.python.org/2.6/library/itertools.html?highlight=grouper#recipes
 def grouper(iterable, n, fillvalue=None):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82207f674f9d1854f9fdddd0804de611073a794c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mta...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to