mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Debugging Format of floating_ip variable
This commit is contained in:
parent
366aca00a8
commit
05e240f37f
1 changed files with 10 additions and 0 deletions
|
@ -712,8 +712,17 @@ def request_instance(vm_=None, call=None):
|
|||
floating_ip = None
|
||||
if floating_ip_conf.get('ip_address', None) is not None:
|
||||
ip_address = floating_ip_conf.get('ip_address', None)
|
||||
## DEBUG ONLY
|
||||
for fl_ip, opts in six.iteritems(conn.floating_ip_list()):
|
||||
if opts['fixed_ip'] is None and opts['pool'] == 'External-net':
|
||||
floating_ip = fl_ip
|
||||
log.debug("Default:")
|
||||
log.debug(floating_ip)
|
||||
## END DEBUG
|
||||
try:
|
||||
floating_ip = conn.floating_ip_show(ip_address)
|
||||
log.debug("New:")
|
||||
log.debug(floating_ip)
|
||||
except Exception as err:
|
||||
log.error('Specified Fixed Floating IP does not exist or is not yet allocated')
|
||||
# Trigger a failure in the wait for IP function
|
||||
|
@ -724,6 +733,7 @@ def request_instance(vm_=None, call=None):
|
|||
for fl_ip, opts in six.iteritems(conn.floating_ip_list()):
|
||||
if opts['fixed_ip'] is None and opts['pool'] == pool:
|
||||
floating_ip = fl_ip
|
||||
log.debug
|
||||
break
|
||||
if floating_ip is None:
|
||||
floating_ip = conn.floating_ip_create(pool)['ip']
|
||||
|
|
Loading…
Add table
Reference in a new issue