mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-09 04:10:27 -07:00
Merge pull request #271 from ansible-collections/fixes3
This commit is contained in:
commit
04d1406c31
7 changed files with 14 additions and 16 deletions
|
@ -1,10 +1,9 @@
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,8 @@ class GcpModule(AnsibleModule):
|
||||||
scopes=dict(
|
scopes=dict(
|
||||||
required=False,
|
required=False,
|
||||||
fallback=(env_fallback, ['GCP_SCOPES']),
|
fallback=(env_fallback, ['GCP_SCOPES']),
|
||||||
type='list'),
|
type='list',
|
||||||
|
elements='str'),
|
||||||
env_type=dict(
|
env_type=dict(
|
||||||
required=False,
|
required=False,
|
||||||
fallback=(env_fallback, ['GCP_ENV_TYPE']),
|
fallback=(env_fallback, ['GCP_ENV_TYPE']),
|
||||||
|
|
|
@ -23,7 +23,6 @@ module: gcp_storage_object
|
||||||
description:
|
description:
|
||||||
- Upload or download a file from a GCS bucket.
|
- Upload or download a file from a GCS bucket.
|
||||||
short_description: Creates a GCP Object
|
short_description: Creates a GCP Object
|
||||||
version_added: '2.8'
|
|
||||||
author: Google Inc. (@googlecloudplatform)
|
author: Google Inc. (@googlecloudplatform)
|
||||||
requirements:
|
requirements:
|
||||||
- python >= 2.6
|
- python >= 2.6
|
||||||
|
@ -87,6 +86,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- Array of scopes to be used
|
- Array of scopes to be used
|
||||||
type: list
|
type: list
|
||||||
|
elements: str
|
||||||
env_type:
|
env_type:
|
||||||
description:
|
description:
|
||||||
- Specifies which Ansible environment you're running this module within.
|
- Specifies which Ansible environment you're running this module within.
|
||||||
|
@ -145,7 +145,7 @@ storage_class:
|
||||||
# Imports
|
# Imports
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
from ansible.module_utils.gcp_utils import (
|
from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (
|
||||||
navigate_hash,
|
navigate_hash,
|
||||||
GcpSession,
|
GcpSession,
|
||||||
GcpModule,
|
GcpModule,
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']
|
os.environ['MOLECULE_INVENTORY_FILE']
|
||||||
).get_hosts('all')
|
).get_hosts('all')
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
__metaclass__ = type
|
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']
|
os.environ['MOLECULE_INVENTORY_FILE']
|
||||||
).get_hosts('all')
|
).get_hosts('all')
|
||||||
|
|
|
@ -24,6 +24,8 @@ from ansible_collections.google.cloud.plugins.module_utils.gcp_utils import (Gcp
|
||||||
remove_nones_from_dict,
|
remove_nones_from_dict,
|
||||||
replace_resource_dict)
|
replace_resource_dict)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
class ReplaceResourceDictTestCase(unittest.TestCase):
|
class ReplaceResourceDictTestCase(unittest.TestCase):
|
||||||
def test_given_dict(self):
|
def test_given_dict(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue