mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -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
|
@ -225,7 +225,7 @@ def main():
|
|||
try:
|
||||
gcelb = get_driver_lb(Provider_lb.GCE)(gce_driver=gce)
|
||||
gcelb.connection.user_agent_append("%s/%s" % (
|
||||
USER_AGENT_PRODUCT, USER_AGENT_VERSION))
|
||||
USER_AGENT_PRODUCT, USER_AGENT_VERSION))
|
||||
except Exception as e:
|
||||
module.fail_json(msg=unexpected_error_msg(e), changed=False)
|
||||
|
||||
|
|
|
@ -829,7 +829,7 @@ def main():
|
|||
if not autoscaler:
|
||||
module.fail_json(msg='Unable to fetch autoscaler %s to delete \
|
||||
in zone: %s' % (params['autoscaling']['name'], params['zone']),
|
||||
changed=False)
|
||||
changed=False)
|
||||
|
||||
changed = delete_autoscaler(autoscaler)
|
||||
json_output['deleted_autoscaler'] = changed
|
||||
|
|
|
@ -254,7 +254,7 @@ def main():
|
|||
|
||||
if instance_name and inst is None:
|
||||
module.fail_json(msg='Instance %s does not exist in zone %s' % (
|
||||
instance_name, zone), changed=False)
|
||||
instance_name, zone), changed=False)
|
||||
|
||||
if not disk:
|
||||
if image is not None and snapshot is not None:
|
||||
|
|
|
@ -182,10 +182,10 @@ def main():
|
|||
project_id=dict(),
|
||||
),
|
||||
mutually_exclusive=[
|
||||
[ 'instance_name', 'instance_pattern' ]
|
||||
[ 'instance_name', 'instance_pattern' ]
|
||||
],
|
||||
required_one_of=[
|
||||
[ 'instance_name', 'instance_pattern' ]
|
||||
[ 'instance_name', 'instance_pattern' ]
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
@ -226,17 +226,17 @@ def pull_messages(pull_params, sub):
|
|||
def main():
|
||||
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
topic=dict(required=True),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
publish=dict(type='list', default=None),
|
||||
subscription=dict(type='dict', default=None),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
topic=dict(required=True),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
publish=dict(type='list', default=None),
|
||||
subscription=dict(type='dict', default=None),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
|
||||
if not HAS_GOOGLE_CLOUD_PUBSUB:
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library.")
|
||||
|
@ -307,7 +307,7 @@ def main():
|
|||
if s.push_endpoint is not None:
|
||||
module.fail_json(msg="Cannot pull messages, push_endpoint is configured.")
|
||||
(json_output['pulled_messages'], changed) = pull_messages(
|
||||
mod_params['subscription']['pull'], s)
|
||||
mod_params['subscription']['pull'], s)
|
||||
|
||||
# publish messages to the topic
|
||||
if mod_params['publish'] and len(mod_params['publish']) > 0:
|
||||
|
|
|
@ -102,16 +102,16 @@ def list_func(data, member='name'):
|
|||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
view=dict(choices=['topics', 'subscriptions'], default='topics'),
|
||||
topic=dict(required=False),
|
||||
state=dict(choices=['list'], default='list'),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
view=dict(choices=['topics', 'subscriptions'], default='topics'),
|
||||
topic=dict(required=False),
|
||||
state=dict(choices=['list'], default='list'),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
|
||||
if not HAS_GOOGLE_CLOUD_PUBSUB:
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue