From ab270a08dce166a90a9f401d88887288e3289904 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Wed, 5 Aug 2020 17:48:31 -0700 Subject: [PATCH] the last of the fixes --- plugins/module_utils/gcp_utils.py | 3 ++- plugins/modules/gcp_storage_object.py | 4 ++-- tests/unit/plugins/test_gcp_utils.py | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/gcp_utils.py b/plugins/module_utils/gcp_utils.py index 20256fa..643c8ca 100644 --- a/plugins/module_utils/gcp_utils.py +++ b/plugins/module_utils/gcp_utils.py @@ -288,7 +288,8 @@ class GcpModule(AnsibleModule): scopes=dict( required=False, fallback=(env_fallback, ['GCP_SCOPES']), - type='list'), + type='list', + elements='str'), env_type=dict( required=False, fallback=(env_fallback, ['GCP_ENV_TYPE']), diff --git a/plugins/modules/gcp_storage_object.py b/plugins/modules/gcp_storage_object.py index 266acf0..4b0a4e8 100644 --- a/plugins/modules/gcp_storage_object.py +++ b/plugins/modules/gcp_storage_object.py @@ -23,7 +23,6 @@ module: gcp_storage_object description: - Upload or download a file from a GCS bucket. short_description: Creates a GCP Object -version_added: '2.8' author: Google Inc. (@googlecloudplatform) requirements: - python >= 2.6 @@ -87,6 +86,7 @@ options: description: - Array of scopes to be used type: list + elements: str env_type: description: - Specifies which Ansible environment you're running this module within. @@ -145,7 +145,7 @@ storage_class: # Imports ################################################################################ -from ansible.module_utils.gcp_utils import ( +from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import ( navigate_hash, GcpSession, GcpModule, diff --git a/tests/unit/plugins/test_gcp_utils.py b/tests/unit/plugins/test_gcp_utils.py index c583f33..a69f36a 100644 --- a/tests/unit/plugins/test_gcp_utils.py +++ b/tests/unit/plugins/test_gcp_utils.py @@ -24,6 +24,8 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (Gcp remove_nones_from_dict, replace_resource_dict) +__metaclass__ = type + class ReplaceResourceDictTestCase(unittest.TestCase): def test_given_dict(self):