You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/10/23 11:49:19 UTC

[36/50] [abbrv] git commit: fix devcloud: add router_proxy.sh

fix devcloud: add router_proxy.sh


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3cd9ba46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3cd9ba46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3cd9ba46

Branch: refs/heads/marvin-parallel
Commit: 3cd9ba46fbb2ae7e9db5dfe5b7f6c931868094e7
Parents: c5ba631
Author: Edison Su <su...@gmail.com>
Authored: Wed Oct 3 18:54:28 2012 -0700
Committer: Edison Su <ed...@citrix.com>
Committed: Sun Oct 21 00:01:47 2012 -0700

----------------------------------------------------------------------
 scripts/vm/hypervisor/xenserver/xcposs/vmops |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3cd9ba46/scripts/vm/hypervisor/xenserver/xcposs/vmops
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/xcposs/vmops b/scripts/vm/hypervisor/xenserver/xcposs/vmops
index c8e6013..52625e1 100644
--- a/scripts/vm/hypervisor/xenserver/xcposs/vmops
+++ b/scripts/vm/hypervisor/xenserver/xcposs/vmops
@@ -1516,6 +1516,22 @@ def createISOVHD(session, args):
     return vdi_uuid
 
 @echo
+def routerProxy(session, args):
+    sargs = args['args']
+    cmd = sargs.split(' ')
+    cmd.insert(0, "/usr/lib/xcp/bin/router_proxy.sh")
+    cmd.insert(0, "/bin/bash")
+    try:
+        txt = util.pread2(cmd)
+        if txt is None or len(txt) == 0 :
+            txt = 'success'
+    except:
+        util.SMlog("routerProxy command " + sargs + " failed "  )
+        txt = ''
+
+    return txt
+
+@echo
 def getDomRVersion(session, args):
     sargs = args['args']
     cmd = sargs.split(' ')
@@ -1546,4 +1562,5 @@ if __name__ == "__main__":
                             "bumpUpPriority":bumpUpPriority, "getDomRVersion":getDomRVersion,
                             "kill_copy_process":kill_copy_process,
                             "createISOVHD":createISOVHD,
+                            "routerProxy":routerProxy,
                             "setDNATRule":setDNATRule})