Increase ping timeout, add help command
This commit is contained in:
parent
e30cc786ce
commit
0bba0fe9a4
10
vm.py
10
vm.py
@ -224,7 +224,7 @@ IP: {0.ip}
|
||||
Username: {0.user}
|
||||
Password: {0.password}'''.format(instance))
|
||||
|
||||
subprocess.call(['ping', '-c', '1', instance.ip])
|
||||
subprocess.call(['ping', '-c', '1', '-W', '240', instance.ip])
|
||||
|
||||
|
||||
def cmd_iplist(args):
|
||||
@ -257,12 +257,20 @@ Create missing vMACs for available IPs
|
||||
except:
|
||||
logger.exception('Failed!')
|
||||
|
||||
def cmd_help(args):
|
||||
'''usage: vm help
|
||||
|
||||
ey?
|
||||
'''
|
||||
print(__doc__)
|
||||
return 0
|
||||
|
||||
|
||||
commands = {
|
||||
'create': cmd_create,
|
||||
'ip:list': cmd_iplist,
|
||||
'ip:sync': cmd_ipsync,
|
||||
'help': cmd_help,
|
||||
}
|
||||
|
||||
def main(gargv):
|
||||
|
Loading…
x
Reference in New Issue
Block a user