fixed some shell command usage in example files
This commit is contained in:
parent
e35b4a0a4b
commit
78537d8e95
5 changed files with 4 additions and 7 deletions
|
@ -149,7 +149,6 @@ class VnodeClient(object):
|
|||
logger.warn("cmd exited with status %s: %s", status, args)
|
||||
return status
|
||||
|
||||
# TODO: validate if this is ever used
|
||||
def term(self, sh="/bin/sh"):
|
||||
"""
|
||||
Open a terminal on a node.
|
||||
|
|
|
@ -58,7 +58,6 @@ def test(options):
|
|||
# session.sdt.updatenode(n[1].objid, 0, 10, 10, 2000000)
|
||||
|
||||
# launches terminal for the first node
|
||||
# n[0].term("bash")
|
||||
n[0].client.icmd(["ping", "-c", "5", "127.0.0.1"])
|
||||
|
||||
# wait for rate seconds to allow ebtables commands to commit
|
||||
|
|
|
@ -116,7 +116,7 @@ def main():
|
|||
session.broker.handlerawmsg(msg)
|
||||
|
||||
# start a shell on node 1
|
||||
n[1].term("bash")
|
||||
n[1].client.term("bash")
|
||||
|
||||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
print "To stop this session, use the 'core-cleanup' script on this server"
|
||||
|
|
|
@ -81,8 +81,7 @@ def main():
|
|||
print "creating %d nodes with addresses from %s" % \
|
||||
(options.numnodes, prefix)
|
||||
for i in xrange(1, options.numnodes + 1):
|
||||
tmp = session.add_object(cls=nodes.CoreNode, name="n%d" % i,
|
||||
objid=i)
|
||||
tmp = session.add_object(cls=nodes.CoreNode, name="n%d" % i, objid=i)
|
||||
tmp.newnetif(wlan, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)])
|
||||
tmp.client.cmd([constants.SYSCTL_BIN, "net.ipv4.icmp_echo_ignore_broadcasts=0"])
|
||||
tmp.setposition(x=150 * i, y=150)
|
||||
|
@ -94,7 +93,7 @@ def main():
|
|||
session.instantiate()
|
||||
|
||||
# start a shell on node 1
|
||||
n[1].term("bash")
|
||||
n[1].client.term("bash")
|
||||
|
||||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ def main():
|
|||
print "elapsed time: %s" % (datetime.datetime.now() - start)
|
||||
|
||||
# start a shell on node 1
|
||||
n[1].term("bash")
|
||||
n[1].client.term("bash")
|
||||
|
||||
raw_input("press enter to exit")
|
||||
session.shutdown()
|
||||
|
|
Loading…
Reference in a new issue