mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 22:31:25 -07:00
PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup. * PEP 8 E126 cleanup. * PEP 8 E122 cleanup.
This commit is contained in:
parent
1c6bb4add9
commit
10d9318de7
244 changed files with 2873 additions and 2973 deletions
|
@ -136,8 +136,8 @@ def _get_neutron_client(module, kwargs):
|
|||
token = _ksclient.auth_token
|
||||
endpoint = _get_endpoint(module, _ksclient)
|
||||
kwargs = {
|
||||
'token': token,
|
||||
'endpoint_url': endpoint
|
||||
'token': token,
|
||||
'endpoint_url': endpoint
|
||||
}
|
||||
try:
|
||||
neutron = client.Client('2.0', **kwargs)
|
||||
|
@ -174,7 +174,7 @@ def _get_port_info(neutron, module, instance_id, internal_network_name=None):
|
|||
subnets = neutron.list_subnets(**kwargs)
|
||||
subnet_id = subnets['subnets'][0]['id']
|
||||
kwargs = {
|
||||
'device_id': instance_id,
|
||||
'device_id': instance_id,
|
||||
}
|
||||
try:
|
||||
ports = neutron.list_ports(**kwargs)
|
||||
|
@ -193,7 +193,7 @@ def _get_port_info(neutron, module, instance_id, internal_network_name=None):
|
|||
|
||||
def _get_floating_ip(module, neutron, fixed_ip_address, network_name):
|
||||
kwargs = {
|
||||
'fixed_ip_address': fixed_ip_address
|
||||
'fixed_ip_address': fixed_ip_address
|
||||
}
|
||||
try:
|
||||
ips = neutron.list_floatingips(**kwargs)
|
||||
|
@ -214,9 +214,9 @@ def _check_ips_network(neutron, net_id, network_name):
|
|||
|
||||
def _create_floating_ip(neutron, module, port_id, net_id, fixed_ip):
|
||||
kwargs = {
|
||||
'port_id': port_id,
|
||||
'floating_network_id': net_id,
|
||||
'fixed_ip_address': fixed_ip
|
||||
'port_id': port_id,
|
||||
'floating_network_id': net_id,
|
||||
'fixed_ip_address': fixed_ip
|
||||
}
|
||||
try:
|
||||
result = neutron.create_floatingip({'floatingip': kwargs})
|
||||
|
@ -251,10 +251,10 @@ def main():
|
|||
|
||||
argument_spec = openstack_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
network_name = dict(required=True),
|
||||
instance_name = dict(required=True),
|
||||
state = dict(default='present', choices=['absent', 'present']),
|
||||
internal_network_name = dict(default=None),
|
||||
network_name = dict(required=True),
|
||||
instance_name = dict(required=True),
|
||||
state = dict(default='present', choices=['absent', 'present']),
|
||||
internal_network_name = dict(default=None),
|
||||
))
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue