diff --git a/changelogs/fragments/294-bump-grafana-version.yml b/changelogs/fragments/294-bump-grafana-version.yml index a3050c01..7149cfe0 100644 --- a/changelogs/fragments/294-bump-grafana-version.yml +++ b/changelogs/fragments/294-bump-grafana-version.yml @@ -1,4 +1,5 @@ minor_changes: - Bump version of Python used in tests to 3.10 + - Now testing against Grafana 9.5.13, 8.5.27, 10.2.0 bugfixes: - grafana_folder, fix an issue during delete (starting Grafana 9.3) diff --git a/plugins/modules/grafana_datasource.py b/plugins/modules/grafana_datasource.py index 154dc451..b0496a97 100644 --- a/plugins/modules/grafana_datasource.py +++ b/plugins/modules/grafana_datasource.py @@ -67,15 +67,18 @@ (index name), C(mysql) or C(postgres). required: false type: str + default: '' user: description: - The datasource login user for influxdb datasources. type: str + default: '' password: description: - The datasource password. - Stored as secure data, see C(enforce_secure_data) and notes! type: str + default: '' basic_auth_user: description: - The datasource basic auth user. @@ -180,6 +183,7 @@ - Monthly - Yearly type: str + default: '' tsdb_version: description: - The opentsdb version. @@ -280,7 +284,6 @@ aws_custom_metrics_namespaces: description: - Namespaces of Custom Metrics for CloudWatch datasource type - default: '' required: false type: str azure_cloud: @@ -494,7 +497,7 @@ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import quote -from ansible.module_utils.urls import fetch_url, url_argument_spec, basic_auth_header +from ansible.module_utils.urls import fetch_url, basic_auth_header from ansible_collections.community.grafana.plugins.module_utils import base diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt new file mode 100644 index 00000000..5c82494f --- /dev/null +++ b/tests/sanity/ignore-2.16.txt @@ -0,0 +1,4 @@ +plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name +tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 +hacking/check_fragment.sh shebang +hacking/find_grafana_versions.py shebang diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt new file mode 100644 index 00000000..5c82494f --- /dev/null +++ b/tests/sanity/ignore-2.17.txt @@ -0,0 +1,4 @@ +plugins/modules/grafana_dashboard.py validate-modules:invalid-argument-name +tests/unit/modules/grafana/grafana_plugin/test_grafana_plugin.py pep8:W291 +hacking/check_fragment.sh shebang +hacking/find_grafana_versions.py shebang diff --git a/tests/unit/modules/grafana/grafana_datasource/test_grafana_datasource.py b/tests/unit/modules/grafana/grafana_datasource/test_grafana_datasource.py index d2fba0fe..0a68fda7 100644 --- a/tests/unit/modules/grafana/grafana_datasource/test_grafana_datasource.py +++ b/tests/unit/modules/grafana/grafana_datasource/test_grafana_datasource.py @@ -1,7 +1,7 @@ from __future__ import (absolute_import, division, print_function) from unittest import TestCase -from unittest.mock import call, patch, MagicMock +from unittest.mock import patch from ansible_collections.community.grafana.plugins.modules import grafana_datasource from ansible.module_utils._text import to_bytes from ansible.module_utils import basic diff --git a/tests/unit/modules/grafana/grafana_team/test_grafana_team.py b/tests/unit/modules/grafana/grafana_team/test_grafana_team.py index c59953af..491b863d 100644 --- a/tests/unit/modules/grafana/grafana_team/test_grafana_team.py +++ b/tests/unit/modules/grafana/grafana_team/test_grafana_team.py @@ -1,7 +1,7 @@ from __future__ import (absolute_import, division, print_function) from unittest import TestCase -from unittest.mock import patch, MagicMock +from unittest.mock import patch from ansible_collections.community.grafana.plugins.modules import grafana_team from ansible.module_utils._text import to_bytes from ansible.module_utils import basic diff --git a/tests/unit/modules/grafana/grafana_user/test_grafana_user.py b/tests/unit/modules/grafana/grafana_user/test_grafana_user.py index 925c0165..80c51409 100644 --- a/tests/unit/modules/grafana/grafana_user/test_grafana_user.py +++ b/tests/unit/modules/grafana/grafana_user/test_grafana_user.py @@ -1,7 +1,7 @@ from __future__ import (absolute_import, division, print_function) from unittest import TestCase -from unittest.mock import call, patch, MagicMock +from unittest.mock import call, patch from ansible_collections.community.grafana.plugins.modules import grafana_user from ansible.module_utils._text import to_bytes from ansible.module_utils import basic