fix devcloud: add router_proxy.sh

This commit is contained in:
Edison Su 2012-10-03 18:54:28 -07:00 committed by Edison Su
parent c5ba6312e7
commit 3cd9ba46fb

View File

@ -1515,6 +1515,22 @@ def createISOVHD(session, args):
session.xenapi.VBD.destroy(vbd)
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']
@ -1546,4 +1562,5 @@ if __name__ == "__main__":
"bumpUpPriority":bumpUpPriority, "getDomRVersion":getDomRVersion,
"kill_copy_process":kill_copy_process,
"createISOVHD":createISOVHD,
"routerProxy":routerProxy,
"setDNATRule":setDNATRule})