pep8 fixes
This commit is contained in:
parent
fa2d027e33
commit
3012d269ff
3 changed files with 8 additions and 6 deletions
|
@ -161,7 +161,7 @@ def _create_floating_ip(quantum, module, port_id, net_id):
|
||||||
result = quantum.create_floatingip({'floatingip': kwargs})
|
result = quantum.create_floatingip({'floatingip': kwargs})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg="There was an error in updating the floating ip address: %s" % e.message)
|
module.fail_json(msg="There was an error in updating the floating ip address: %s" % e.message)
|
||||||
module.exit_json(changed=True, result=result, public_ip=result['floatingip']['floating_ip_address'] )
|
module.exit_json(changed=True, result=result, public_ip=result['floatingip']['floating_ip_address'])
|
||||||
|
|
||||||
def _get_net_id(quantum, module):
|
def _get_net_id(quantum, module):
|
||||||
kwargs = {
|
kwargs = {
|
||||||
|
|
|
@ -144,7 +144,7 @@ def main():
|
||||||
# here we attempt to get stats from the http stats interface for 120 seconds.
|
# here we attempt to get stats from the http stats interface for 120 seconds.
|
||||||
timeout = time.time() + 120
|
timeout = time.time() + 120
|
||||||
while True:
|
while True:
|
||||||
if time.time () > timeout:
|
if time.time() > timeout:
|
||||||
module.fail_json(msg='Timeout, could not fetch Riak stats.')
|
module.fail_json(msg='Timeout, could not fetch Riak stats.')
|
||||||
try:
|
try:
|
||||||
stats_raw = urllib2.urlopen(
|
stats_raw = urllib2.urlopen(
|
||||||
|
@ -230,7 +230,7 @@ def main():
|
||||||
result['handoffs'] = 'No transfers active.'
|
result['handoffs'] = 'No transfers active.'
|
||||||
break
|
break
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
if time.time () > timeout:
|
if time.time() > timeout:
|
||||||
module.fail_json(msg='Timeout waiting for handoffs.')
|
module.fail_json(msg='Timeout waiting for handoffs.')
|
||||||
|
|
||||||
# this could take a while, recommend to run in async mode
|
# this could take a while, recommend to run in async mode
|
||||||
|
@ -247,7 +247,7 @@ def main():
|
||||||
break
|
break
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
wait += 10
|
wait += 10
|
||||||
if time.time () > timeout:
|
if time.time() > timeout:
|
||||||
module.fail_json(msg='Timeout waiting for nodes to agree on ring.')
|
module.fail_json(msg='Timeout waiting for nodes to agree on ring.')
|
||||||
|
|
||||||
result['ring_ready'] = ring_check()
|
result['ring_ready'] = ring_check()
|
||||||
|
|
|
@ -1608,8 +1608,10 @@ class SunOSNetwork(GenericBsdIfconfigNetwork, Network):
|
||||||
else:
|
else:
|
||||||
current_if = interfaces[device]
|
current_if = interfaces[device]
|
||||||
flags = self.get_options(words[1])
|
flags = self.get_options(words[1])
|
||||||
if 'IPv4' in flags: v = 'ipv4'
|
if 'IPv4' in flags:
|
||||||
if 'IPv6' in flags: v = 'ipv6'
|
v = 'ipv4'
|
||||||
|
if 'IPv6' in flags:
|
||||||
|
v = 'ipv6'
|
||||||
current_if[v].append({'flags': flags, 'mtu': words[3]})
|
current_if[v].append({'flags': flags, 'mtu': words[3]})
|
||||||
current_if['macaddress'] = 'unknown' # will be overwritten later
|
current_if['macaddress'] = 'unknown' # will be overwritten later
|
||||||
return current_if
|
return current_if
|
||||||
|
|
Loading…
Reference in a new issue