mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues Generated using: autopep8 1.3.3 (pycodestyle: 2.3.1) autopep8 -r --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules Manually fix issues that autopep8 has introduced
This commit is contained in:
parent
d13d7e9404
commit
c57a7f05e1
314 changed files with 3462 additions and 3383 deletions
|
@ -107,10 +107,10 @@ from ansible.module_utils.ec2 import (ec2_argument_spec, get_aws_connection_info
|
|||
|
||||
def get_virtual_gateway_info(virtual_gateway):
|
||||
virtual_gateway_info = {'VpnGatewayId': virtual_gateway['VpnGatewayId'],
|
||||
'State': virtual_gateway['State'],
|
||||
'Type': virtual_gateway['Type'],
|
||||
'VpcAttachments': virtual_gateway['VpcAttachments'],
|
||||
'Tags': virtual_gateway['Tags']}
|
||||
'State': virtual_gateway['State'],
|
||||
'Type': virtual_gateway['Type'],
|
||||
'VpcAttachments': virtual_gateway['VpcAttachments'],
|
||||
'Tags': virtual_gateway['Tags']}
|
||||
return virtual_gateway_info
|
||||
|
||||
|
||||
|
@ -126,10 +126,10 @@ def list_virtual_gateways(client, module):
|
|||
try:
|
||||
all_virtual_gateways = client.describe_vpn_gateways(**params)
|
||||
except botocore.exceptions.ClientError as e:
|
||||
module.fail_json(msg=str(e),exception=traceback.format_exc())
|
||||
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
||||
|
||||
snaked_vgws = [camel_dict_to_snake_dict(get_virtual_gateway_info(vgw))
|
||||
for vgw in all_virtual_gateways['VpnGateways']]
|
||||
for vgw in all_virtual_gateways['VpnGateways']]
|
||||
|
||||
module.exit_json(virtual_gateways=snaked_vgws)
|
||||
|
||||
|
@ -138,8 +138,8 @@ def main():
|
|||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(
|
||||
dict(
|
||||
filters = dict(type='dict', default=dict()),
|
||||
vpn_gateway_ids = dict(type='list', default=None)
|
||||
filters=dict(type='dict', default=dict()),
|
||||
vpn_gateway_ids=dict(type='list', default=None)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -153,7 +153,7 @@ def main():
|
|||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
||||
connection = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
||||
except botocore.exceptions.NoCredentialsError as e:
|
||||
module.fail_json(msg="Can't authorize connection - "+str(e))
|
||||
module.fail_json(msg="Can't authorize connection - " + str(e))
|
||||
|
||||
# call your function here
|
||||
results = list_virtual_gateways(connection, module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue