mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -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
|
@ -74,12 +74,12 @@ def get_instance_info(instance):
|
|||
# Get groups
|
||||
groups = []
|
||||
for group in instance.groups:
|
||||
groups.append({ 'id': group.id, 'name': group.name }.copy())
|
||||
groups.append({'id': group.id, 'name': group.name}.copy())
|
||||
|
||||
# Get interfaces
|
||||
interfaces = []
|
||||
for interface in instance.interfaces:
|
||||
interfaces.append({ 'id': interface.id, 'mac_address': interface.mac_address }.copy())
|
||||
interfaces.append({'id': interface.id, 'mac_address': interface.mac_address}.copy())
|
||||
|
||||
# If an instance is terminated, sourceDestCheck is no longer returned
|
||||
try:
|
||||
|
@ -104,41 +104,41 @@ def get_instance_info(instance):
|
|||
|
||||
instance_profile = dict(instance.instance_profile) if instance.instance_profile is not None else None
|
||||
|
||||
instance_info = { 'id': instance.id,
|
||||
'kernel': instance.kernel,
|
||||
'instance_profile': instance_profile,
|
||||
'root_device_type': instance.root_device_type,
|
||||
'private_dns_name': instance.private_dns_name,
|
||||
'public_dns_name': instance.public_dns_name,
|
||||
'ebs_optimized': instance.ebs_optimized,
|
||||
'client_token': instance.client_token,
|
||||
'virtualization_type': instance.virtualization_type,
|
||||
'architecture': instance.architecture,
|
||||
'ramdisk': instance.ramdisk,
|
||||
'tags': instance.tags,
|
||||
'key_name': instance.key_name,
|
||||
'source_destination_check': source_dest_check,
|
||||
'image_id': instance.image_id,
|
||||
'groups': groups,
|
||||
'interfaces': interfaces,
|
||||
'spot_instance_request_id': instance.spot_instance_request_id,
|
||||
'requester_id': instance.requester_id,
|
||||
'monitoring_state': instance.monitoring_state,
|
||||
'placement': {
|
||||
'tenancy': instance._placement.tenancy,
|
||||
'zone': instance._placement.zone
|
||||
},
|
||||
'ami_launch_index': instance.ami_launch_index,
|
||||
'launch_time': instance.launch_time,
|
||||
'hypervisor': instance.hypervisor,
|
||||
'region': instance.region.name,
|
||||
'persistent': instance.persistent,
|
||||
'private_ip_address': instance.private_ip_address,
|
||||
'public_ip_address': instance.ip_address,
|
||||
'state': instance._state.name,
|
||||
'vpc_id': instance.vpc_id,
|
||||
'block_device_mapping': bdm_dict,
|
||||
}
|
||||
instance_info = {'id': instance.id,
|
||||
'kernel': instance.kernel,
|
||||
'instance_profile': instance_profile,
|
||||
'root_device_type': instance.root_device_type,
|
||||
'private_dns_name': instance.private_dns_name,
|
||||
'public_dns_name': instance.public_dns_name,
|
||||
'ebs_optimized': instance.ebs_optimized,
|
||||
'client_token': instance.client_token,
|
||||
'virtualization_type': instance.virtualization_type,
|
||||
'architecture': instance.architecture,
|
||||
'ramdisk': instance.ramdisk,
|
||||
'tags': instance.tags,
|
||||
'key_name': instance.key_name,
|
||||
'source_destination_check': source_dest_check,
|
||||
'image_id': instance.image_id,
|
||||
'groups': groups,
|
||||
'interfaces': interfaces,
|
||||
'spot_instance_request_id': instance.spot_instance_request_id,
|
||||
'requester_id': instance.requester_id,
|
||||
'monitoring_state': instance.monitoring_state,
|
||||
'placement': {
|
||||
'tenancy': instance._placement.tenancy,
|
||||
'zone': instance._placement.zone
|
||||
},
|
||||
'ami_launch_index': instance.ami_launch_index,
|
||||
'launch_time': instance.launch_time,
|
||||
'hypervisor': instance.hypervisor,
|
||||
'region': instance.region.name,
|
||||
'persistent': instance.persistent,
|
||||
'private_ip_address': instance.private_ip_address,
|
||||
'public_ip_address': instance.ip_address,
|
||||
'state': instance._state.name,
|
||||
'vpc_id': instance.vpc_id,
|
||||
'block_device_mapping': bdm_dict,
|
||||
}
|
||||
|
||||
return instance_info
|
||||
|
||||
|
@ -163,7 +163,7 @@ def main():
|
|||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(
|
||||
dict(
|
||||
filters = dict(default=None, type='dict')
|
||||
filters=dict(default=None, type='dict')
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue