mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
pep8 fixes
This commit is contained in:
parent
15560c9801
commit
caa07e7fab
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})
|
||||
except Exception as e:
|
||||
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):
|
||||
kwargs = {
|
||||
|
|
|
@ -144,7 +144,7 @@ def main():
|
|||
# here we attempt to get stats from the http stats interface for 120 seconds.
|
||||
timeout = time.time() + 120
|
||||
while True:
|
||||
if time.time () > timeout:
|
||||
if time.time() > timeout:
|
||||
module.fail_json(msg='Timeout, could not fetch Riak stats.')
|
||||
try:
|
||||
stats_raw = urllib2.urlopen(
|
||||
|
@ -230,7 +230,7 @@ def main():
|
|||
result['handoffs'] = 'No transfers active.'
|
||||
break
|
||||
time.sleep(10)
|
||||
if time.time () > timeout:
|
||||
if time.time() > timeout:
|
||||
module.fail_json(msg='Timeout waiting for handoffs.')
|
||||
|
||||
# this could take a while, recommend to run in async mode
|
||||
|
@ -247,7 +247,7 @@ def main():
|
|||
break
|
||||
time.sleep(10)
|
||||
wait += 10
|
||||
if time.time () > timeout:
|
||||
if time.time() > timeout:
|
||||
module.fail_json(msg='Timeout waiting for nodes to agree on ring.')
|
||||
|
||||
result['ring_ready'] = ring_check()
|
||||
|
|
|
@ -1608,8 +1608,10 @@ class SunOSNetwork(GenericBsdIfconfigNetwork, Network):
|
|||
else:
|
||||
current_if = interfaces[device]
|
||||
flags = self.get_options(words[1])
|
||||
if 'IPv4' in flags: v = 'ipv4'
|
||||
if 'IPv6' in flags: v = 'ipv6'
|
||||
if 'IPv4' in flags:
|
||||
v = 'ipv4'
|
||||
if 'IPv6' in flags:
|
||||
v = 'ipv6'
|
||||
current_if[v].append({'flags': flags, 'mtu': words[3]})
|
||||
current_if['macaddress'] = 'unknown' # will be overwritten later
|
||||
return current_if
|
||||
|
|
Loading…
Reference in a new issue