diff --git a/plugins/inventory/now.py b/plugins/inventory/now.py index bac5d5c1..3ba72cdc 100644 --- a/plugins/inventory/now.py +++ b/plugins/inventory/now.py @@ -389,7 +389,7 @@ def _compose(self, template, variables): else: t.available_variables = variables - """ Only change that we have overriden is that we do not disable lookups""" + """ Only change that we have overridden is that we do not disable lookups""" return t.template( "%s%s%s" % ( diff --git a/plugins/module_utils/api.py b/plugins/module_utils/api.py index 30258a39..a0f93d5e 100644 --- a/plugins/module_utils/api.py +++ b/plugins/module_utils/api.py @@ -71,7 +71,7 @@ def table_name(module): def resource_name(module): """ - Return either the api_path or the table name from modules's parameters + Return either the api_path or the table name from modules' parameters """ return module.params["resource"] or module.params["api_path"] diff --git a/plugins/module_utils/generic.py b/plugins/module_utils/generic.py index 47f0c754..6f3d6c98 100644 --- a/plugins/module_utils/generic.py +++ b/plugins/module_utils/generic.py @@ -18,7 +18,7 @@ def __init__(self, client, batch_size=1000): def list_records(self, api_path, query=None): """ List records from api_path. - The method is retreiving all the records by making multiple GET requests to server. + The method is retrieving all the records by making multiple GET requests to server. api_path -- full path (ex: "api/now/cmdb/instance/cmdb_ci_linux_server" query -- query in SNow format diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 7c0eb634..1e1fd8cb 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -115,7 +115,7 @@ no_count: false register: result -- name: Retreive all linux servers +- name: Retrieve all linux servers servicenow.itsm.api_info: api_path: api/now/cmdb/instance/cmdb_ci_linux_server """ diff --git a/plugins/modules/configuration_item_info.py b/plugins/modules/configuration_item_info.py index 9d35e5ab..75213ec9 100644 --- a/plugins/modules/configuration_item_info.py +++ b/plugins/modules/configuration_item_info.py @@ -87,13 +87,13 @@ name: my-configuration-item register: result -- name: Retrieve all hardare configuration items by using field query +- name: Retrieve all hardware configuration items by using field query servicenow.itsm.configuration_item_info: query: - category: = Hardware register: result -- name: Retrieve all hardare configuration items by using field sysparm_query +- name: Retrieve all hardware configuration items by using field sysparm_query servicenow.itsm.configuration_item_info: sysparm_query: category=Hardware register: result diff --git a/tests/integration/targets/api/tasks/main.yml b/tests/integration/targets/api/tasks/main.yml index 15b2108e..49d8798b 100644 --- a/tests/integration/targets/api/tasks/main.yml +++ b/tests/integration/targets/api/tasks/main.yml @@ -5,7 +5,7 @@ SN_PASSWORD: "{{ sn_password }}" block: - - name: create user (object with encryped fields) + - name: create user (object with encrypted fields) servicenow.itsm.api: resource: sys_user action: post diff --git a/tests/integration/targets/api/templates/test_template_patch.j2 b/tests/integration/targets/api/templates/test_template_patch.j2 index 813e6992..e052b5b6 100644 --- a/tests/integration/targets/api/templates/test_template_patch.j2 +++ b/tests/integration/targets/api/templates/test_template_patch.j2 @@ -1,3 +1,3 @@ short_description: "Changed template - {{ short_desc }}" -description: "Desciption is changed also - {{ short_desc }} {{ long_desc }}" +description: "Description is changed also - {{ short_desc }} {{ long_desc }}" diff --git a/tests/integration/targets/api_generic/tasks/main.yml b/tests/integration/targets/api_generic/tasks/main.yml index c7132c05..50e56a79 100644 --- a/tests/integration/targets/api_generic/tasks/main.yml +++ b/tests/integration/targets/api_generic/tasks/main.yml @@ -5,7 +5,7 @@ SN_PASSWORD: "{{ sn_password }}" block: - - name: Retreive all ci linux server cmdb + - name: Retrieve all ci linux server cmdb servicenow.itsm.api_info: api_path: "api/now/cmdb/instance/cmdb_ci_linux_server" register: initial diff --git a/tests/unit/plugins/module_utils/test_client.py b/tests/unit/plugins/module_utils/test_client.py index cabbc28c..4324dce6 100644 --- a/tests/unit/plugins/module_utils/test_client.py +++ b/tests/unit/plugins/module_utils/test_client.py @@ -50,11 +50,11 @@ def test_valid_json(self): resp = client.Response( 200, '{"a": ["b", "c"], "d": 1}', - headers=[("Content-type", "applcation/json")], + headers=[("Content-type", "application/json")], ) assert resp.status == 200 - assert resp.headers == {"content-type": "applcation/json"} + assert resp.headers == {"content-type": "application/json"} assert resp.data == '{"a": ["b", "c"], "d": 1}' assert resp.json == {"a": ["b", "c"], "d": 1} @@ -72,7 +72,7 @@ def test_json_is_cached(self, mocker): resp = client.Response( 200, '{"a": ["b", "c"], "d": 1}', - headers=[("Content-type", "applcation/json")], + headers=[("Content-type", "application/json")], ) resp.json resp.json