From 6715ea493f948a51a29c87d9ae44ffec09e0c170 Mon Sep 17 00:00:00 2001 From: beeankha Date: Tue, 9 Jun 2020 13:45:45 -0400 Subject: [PATCH] Fix documentation in api lookup plugin, fix typos in integration tests --- awx_collection/plugins/lookup/tower_api.py | 12 +++++++----- awx_collection/plugins/lookup/tower_get_id.py | 1 + .../targets/tower_lookup_api_plugin/tasks/main.yml | 2 +- .../tower_lookup_get_id_plugin/tasks/main.yml | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/awx_collection/plugins/lookup/tower_api.py b/awx_collection/plugins/lookup/tower_api.py index b2a366a2c5..370d477daa 100644 --- a/awx_collection/plugins/lookup/tower_api.py +++ b/awx_collection/plugins/lookup/tower_api.py @@ -8,16 +8,16 @@ lookup: tower_api author: John Westcott IV (@john-westcott-iv) short_description: Search the API for objects requirements: - - None + - None description: - - Returns GET requests to the Ansible Tower API. See + - Returns GET requests from the Ansible Tower API. See U(https://docs.ansible.com/ansible-tower/latest/html/towerapi/index.html) for API usage. extends_documentation_fragment: - awx.awx.auth_plugin options: _terms: description: - - The endpoint to query. i.e. teams, users, tokens, job_templates, etc + - The endpoint to query, i.e. teams, users, tokens, job_templates, etc. required: True query_params: description: @@ -26,8 +26,9 @@ options: required: True get_all: description: - - If the resulting query is pagenated, retriest all pages - - note: If the query is not filtered properly this can cause a performance impact + - If the resulting query is paginated, return all pages. + - note: If the query is not filtered properly this can cause a performance impact. + - note: In addition, the built in threshold is 10,000 items; if the query returns more an exception will be thrown. type: boolean default: False """ @@ -65,6 +66,7 @@ from ansible.module_utils._text import to_native from ansible.utils.display import Display from ..module_utils.tower_api import TowerModule + class LookupModule(LookupBase): display = Display() diff --git a/awx_collection/plugins/lookup/tower_get_id.py b/awx_collection/plugins/lookup/tower_get_id.py index 34b94fc566..69b4575c8e 100644 --- a/awx_collection/plugins/lookup/tower_get_id.py +++ b/awx_collection/plugins/lookup/tower_get_id.py @@ -46,6 +46,7 @@ from ansible.module_utils._text import to_native from ansible.utils.display import Display from ..module_utils.tower_api import TowerModule + class LookupModule(LookupBase): display = Display() diff --git a/awx_collection/tests/integration/targets/tower_lookup_api_plugin/tasks/main.yml b/awx_collection/tests/integration/targets/tower_lookup_api_plugin/tasks/main.yml index 058716f7df..1056c02d3f 100644 --- a/awx_collection/tests/integration/targets/tower_lookup_api_plugin/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_lookup_api_plugin/tasks/main.yml @@ -29,7 +29,7 @@ - assert: that: - result is failed - - "'ou must pass exactly one endpoint to query' in result.msg" + - "'You must pass exactly one endpoint to query' in result.msg" - name: Try to load invalid endpoint set_fact: diff --git a/awx_collection/tests/integration/targets/tower_lookup_get_id_plugin/tasks/main.yml b/awx_collection/tests/integration/targets/tower_lookup_get_id_plugin/tasks/main.yml index bf1e5ec765..8d19f836c6 100644 --- a/awx_collection/tests/integration/targets/tower_lookup_get_id_plugin/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_lookup_get_id_plugin/tasks/main.yml @@ -29,7 +29,7 @@ - assert: that: - result is failed - - "'ou must pass exactly one endpoint to query' in result.msg" + - "'You must pass exactly one endpoint to query' in result.msg" - name: Try to load invalid endpoint debug: