Set number of poll switch retries to 5

Take number of retries into account, set default to 5.

Change-Id: I820074d87b9e82a6b51cc63ecc70d0cc179a244c
This commit is contained in:
zhaoxinyu 2014-04-09 02:40:37 +00:00
parent 6c9fbe6341
commit 0deff5f1fe
1 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,7 @@ flags.add('switch_credential',
default='version=v2c,community=public')
flags.add('switch_max_retries', type='int',
help='max retries of poll switch',
default=-1)
default=5)
flags.add('switch_retry_interval', type='int',
help='interval to repoll switch',
default=10)
@ -195,7 +195,6 @@ def _poll_switches(client):
logging.info('switch %s is not updated', switch_ip)
elif switch['state'] == 'under_monitoring':
logging.info('switch %s is ready', switch_ip)
try:
return _get_machines(client)
except Exception: