projects
/
invirt/packages/xvm-munin-config.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Block xen_cpu from running with XenAPI until we switch all of XVM
[invirt/packages/xvm-munin-config.git]
/
host
/
usr
/
share
/
xvm-munin-host-config
/
plugins
/
xen_cpu
diff --git
a/host/usr/share/xvm-munin-host-config/plugins/xen_cpu
b/host/usr/share/xvm-munin-host-config/plugins/xen_cpu
index
755c476
..
2efffe4
100755
(executable)
--- a/
host/usr/share/xvm-munin-host-config/plugins/xen_cpu
+++ b/
host/usr/share/xvm-munin-host-config/plugins/xen_cpu
@@
-3,9
+3,14
@@
from xen.xm.main import SERVER_LEGACY_XMLRPC, SERVER_XEN_API, parseServer, parseAuthentication
from xen.xend import sxp
import atexit
from xen.xm.main import SERVER_LEGACY_XMLRPC, SERVER_XEN_API, parseServer, parseAuthentication
from xen.xend import sxp
import atexit
+import sys
serverType, serverURI = parseServer()
serverType, serverURI = parseServer()
+if serverType != SERVER_LEGACY_XMLRPC:
+ print >>sys.stderr, "xen_cpu is untested with this Xen server type"
+ sys.exit(1)
+
if serverType == SERVER_XEN_API:
from xen.xm import XenAPI
server = XenAPI.Session(serverURI)
if serverType == SERVER_XEN_API:
from xen.xm import XenAPI
server = XenAPI.Session(serverURI)
@@
-21,8
+26,6
@@
else:
from xen.util.xmlrpcclient import ServerProxy
server = ServerProxy(serverURI)
from xen.util.xmlrpcclient import ServerProxy
server = ServerProxy(serverURI)
-import sys
-
if len(sys.argv) > 1:
cmd = sys.argv[1]
else:
if len(sys.argv) > 1:
cmd = sys.argv[1]
else: