mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-05 17:55:11 +00:00
[PR #11465/24098cd6 backport][stable-12] Reformat code (#11466)
Reformat code (#11465)
Reformat code.
(cherry picked from commit 24098cd638)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
a266ba1d6e
commit
dd9c86dfc0
6 changed files with 19 additions and 25 deletions
|
|
@ -330,11 +330,11 @@ def get_service(module, auth, pred):
|
|||
|
||||
|
||||
def get_service_by_id(module, auth, service_id):
|
||||
return get_service(module, auth, lambda service: (int(service["ID"]) == int(service_id))) if service_id else None
|
||||
return get_service(module, auth, lambda service: int(service["ID"]) == int(service_id)) if service_id else None
|
||||
|
||||
|
||||
def get_service_by_name(module, auth, service_name):
|
||||
return get_service(module, auth, lambda service: (service["NAME"] == service_name))
|
||||
return get_service(module, auth, lambda service: service["NAME"] == service_name)
|
||||
|
||||
|
||||
def get_service_info(module, auth, service):
|
||||
|
|
@ -681,13 +681,11 @@ def delete_service(module, auth, service_id):
|
|||
|
||||
|
||||
def get_template_by_name(module, auth, template_name):
|
||||
return get_template(module, auth, lambda template: (template["NAME"] == template_name))
|
||||
return get_template(module, auth, lambda template: template["NAME"] == template_name)
|
||||
|
||||
|
||||
def get_template_by_id(module, auth, template_id):
|
||||
return (
|
||||
get_template(module, auth, lambda template: (int(template["ID"]) == int(template_id))) if template_id else None
|
||||
)
|
||||
return get_template(module, auth, lambda template: int(template["ID"]) == int(template_id)) if template_id else None
|
||||
|
||||
|
||||
def get_template_id(module, auth, requested_id, requested_name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue