Skip to content

Commit 3cd9ba4

Browse files
sudisonEdison Su
authored andcommitted
fix devcloud: add router_proxy.sh
1 parent c5ba631 commit 3cd9ba4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

  • scripts/vm/hypervisor/xenserver/xcposs

scripts/vm/hypervisor/xenserver/xcposs/vmops

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,22 @@ def createISOVHD(session, args):
15151515
session.xenapi.VBD.destroy(vbd)
15161516
return vdi_uuid
15171517

1518+
@echo
1519+
def routerProxy(session, args):
1520+
sargs = args['args']
1521+
cmd = sargs.split(' ')
1522+
cmd.insert(0, "/usr/lib/xcp/bin/router_proxy.sh")
1523+
cmd.insert(0, "/bin/bash")
1524+
try:
1525+
txt = util.pread2(cmd)
1526+
if txt is None or len(txt) == 0 :
1527+
txt = 'success'
1528+
except:
1529+
util.SMlog("routerProxy command " + sargs + " failed " )
1530+
txt = ''
1531+
1532+
return txt
1533+
15181534
@echo
15191535
def getDomRVersion(session, args):
15201536
sargs = args['args']
@@ -1546,4 +1562,5 @@ if __name__ == "__main__":
15461562
"bumpUpPriority":bumpUpPriority, "getDomRVersion":getDomRVersion,
15471563
"kill_copy_process":kill_copy_process,
15481564
"createISOVHD":createISOVHD,
1565+
"routerProxy":routerProxy,
15491566
"setDNATRule":setDNATRule})

0 commit comments

Comments
 (0)