services monitor module
authorCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 7 Aug 2014 16:20:39 +0000 (18:20 +0200)
committerCiro Scognamiglio <ciro.scognamiglio@cslash.net>
Thu, 7 Aug 2014 16:20:39 +0000 (18:20 +0200)
monitor/__init__.py [new file with mode: 0644]
portal/templates/onelab/onelab_home-view.html

diff --git a/monitor/__init__.py b/monitor/__init__.py
new file mode 100644 (file)
index 0000000..206f8c0
--- /dev/null
@@ -0,0 +1,17 @@
+import os
+import threading
+from sfa.client.sfaserverproxy import SfaServerProxy
+from sfa.client.return_value import ReturnValue
+
+path=os.path.dirname(os.path.abspath(__file__))
+
+SFA_KEY_FILE=os.path.abspath(path + "../myslice/sfa.pkey")
+SFA_CERT_FILE=os.path.abspath(path + "../myslice/sfa.cert")
+
+def get_version(url):
+    server=SfaServerProxy(url, SFA_KEY_FILE, SFA_CERT_FILE)
+    try:
+        version = server.GetVersion()
+    except Exception, why:
+        raise
+    return version
\ No newline at end of file
index 5dd577e..c8ee2d8 100644 (file)
@@ -182,4 +182,5 @@ This should go into session
 --------*/
 });
 </script>
-{% endblock %}
+{% widget "_widget-monitor.html" %}
+{% endblock %}
\ No newline at end of file