mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Bug fixes for GCP modules (#55974)
This commit is contained in:
parent
d4b29e7838
commit
8d82df56ff
23 changed files with 62 additions and 59 deletions
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -313,7 +313,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -159,7 +159,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -159,7 +159,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -301,7 +301,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -494,7 +494,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -167,7 +167,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -242,7 +242,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -483,7 +483,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ options:
|
|||
required: false
|
||||
vlan_tag8021q:
|
||||
description:
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094.
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using
|
||||
PARTNER type this will be managed upstream.
|
||||
required: false
|
||||
region:
|
||||
description:
|
||||
|
@ -249,7 +250,8 @@ candidateSubnets:
|
|||
type: list
|
||||
vlanTag8021q:
|
||||
description:
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094.
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using
|
||||
PARTNER type this will be managed upstream.
|
||||
returned: success
|
||||
type: int
|
||||
region:
|
||||
|
|
|
@ -65,8 +65,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -189,7 +189,8 @@ items:
|
|||
type: list
|
||||
vlanTag8021q:
|
||||
description:
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094.
|
||||
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using
|
||||
PARTNER type this will be managed upstream.
|
||||
returned: success
|
||||
type: int
|
||||
region:
|
||||
|
@ -221,7 +222,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -162,7 +162,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -247,7 +247,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -162,7 +162,7 @@ def main():
|
|||
items = items.get('items')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a http health check that already exists
|
||||
gcp_compute_http_health_check:
|
||||
|
@ -105,7 +105,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a http health check that does not exist
|
||||
gcp_compute_http_health_check:
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a https health check that already exists
|
||||
gcp_compute_https_health_check:
|
||||
|
@ -105,7 +105,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a https health check that does not exist
|
||||
gcp_compute_https_health_check:
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a image that already exists
|
||||
gcp_compute_image:
|
||||
|
@ -102,7 +102,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a image that does not exist
|
||||
gcp_compute_image:
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a instance that already exists
|
||||
gcp_compute_instance:
|
||||
|
@ -179,7 +179,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a instance that does not exist
|
||||
gcp_compute_instance:
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a instance group that already exists
|
||||
gcp_compute_instance_group:
|
||||
|
@ -119,7 +119,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a instance group that does not exist
|
||||
gcp_compute_instance_group:
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a instance group manager that already exists
|
||||
gcp_compute_instance_group_manager:
|
||||
|
@ -145,7 +145,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a instance group manager that does not exist
|
||||
gcp_compute_instance_group_manager:
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a instance template that already exists
|
||||
gcp_compute_instance_template:
|
||||
|
@ -158,7 +158,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a instance template that does not exist
|
||||
gcp_compute_instance_template:
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a network that already exists
|
||||
gcp_compute_network:
|
||||
|
@ -93,7 +93,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a network that does not exist
|
||||
gcp_compute_network:
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a region disk that already exists
|
||||
gcp_compute_region_disk:
|
||||
|
@ -119,7 +119,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a region disk that does not exist
|
||||
gcp_compute_region_disk:
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 1
|
||||
- results['resources'] | length == 1
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a route that already exists
|
||||
gcp_compute_route:
|
||||
|
@ -121,7 +121,7 @@
|
|||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results['items'] | length == 0
|
||||
- results['resources'] | length == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a route that does not exist
|
||||
gcp_compute_route:
|
||||
|
|
Loading…
Reference in a new issue