mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-07 08:54:01 -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
|
@ -512,7 +512,7 @@ class AzureRMDeploymentManager(AzureRMModuleBase):
|
|||
if self.wait_for_deployment_completion:
|
||||
deployment_result = self.get_poller_result(result)
|
||||
while deployment_result.properties is None or deployment_result.properties.provisioning_state not in ['Canceled', 'Failed', 'Deleted',
|
||||
'Succeeded']:
|
||||
'Succeeded']:
|
||||
time.sleep(self.wait_for_deployment_polling_period)
|
||||
deployment_result = self.rm_client.deployments.get(self.resource_group_name, self.deployment_name)
|
||||
except CloudError as exc:
|
||||
|
@ -535,7 +535,7 @@ class AzureRMDeploymentManager(AzureRMModuleBase):
|
|||
"""
|
||||
try:
|
||||
result = self.rm_client.resource_groups.delete(self.resource_group_name)
|
||||
result.wait() # Blocking wait till the delete is finished
|
||||
result.wait() # Blocking wait till the delete is finished
|
||||
except CloudError as e:
|
||||
if e.status_code == 404 or e.status_code == 204:
|
||||
return
|
||||
|
@ -569,7 +569,7 @@ class AzureRMDeploymentManager(AzureRMModuleBase):
|
|||
nested_deployment)
|
||||
except CloudError as exc:
|
||||
self.fail("List nested deployment operations failed with status code: %s and message: %s" %
|
||||
(exc.status_code, exc.message))
|
||||
(exc.status_code, exc.message))
|
||||
new_nested_operations = self._get_failed_nested_operations(nested_operations)
|
||||
new_operations += new_nested_operations
|
||||
return new_operations
|
||||
|
@ -642,10 +642,10 @@ class AzureRMDeploymentManager(AzureRMModuleBase):
|
|||
|
||||
def _get_ip_dict(self, ip):
|
||||
ip_dict = dict(name=ip.name,
|
||||
id=ip.id,
|
||||
public_ip=ip.ip_address,
|
||||
public_ip_allocation_method=str(ip.public_ip_allocation_method)
|
||||
)
|
||||
id=ip.id,
|
||||
public_ip=ip.ip_address,
|
||||
public_ip_allocation_method=str(ip.public_ip_allocation_method)
|
||||
)
|
||||
if ip.dns_settings:
|
||||
ip_dict['dns_settings'] = {
|
||||
'domain_name_label': ip.dns_settings.domain_name_label,
|
||||
|
@ -657,9 +657,9 @@ class AzureRMDeploymentManager(AzureRMModuleBase):
|
|||
return [self.network_client.public_ip_addresses.get(public_ip_id.split('/')[4], public_ip_id.split('/')[-1])
|
||||
for nic_obj in (self.network_client.network_interfaces.get(self.resource_group_name,
|
||||
nic['dep'].resource_name) for nic in nics)
|
||||
for public_ip_id in [ip_conf_instance.public_ip_address.id
|
||||
for ip_conf_instance in nic_obj.ip_configurations
|
||||
if ip_conf_instance.public_ip_address]]
|
||||
for public_ip_id in [ip_conf_instance.public_ip_address.id
|
||||
for ip_conf_instance in nic_obj.ip_configurations
|
||||
if ip_conf_instance.public_ip_address]]
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue