Bug fixes for GCP modules (#60089)

This commit is contained in:
The Magician 2019-08-05 15:26:14 -07:00 committed by ansibot
parent 8241fd88de
commit 820cfbbb77
23 changed files with 19 additions and 32 deletions

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -62,7 +62,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -62,7 +62,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -62,7 +62,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -230,6 +230,12 @@ options:
- 'Some valid choices include: "SCRATCH", "PERSISTENT"'
required: false
type: str
labels:
description:
- Labels to apply to this address. A list of key->value pairs.
required: false
type: dict
version_added: 2.9
machine_type:
description:
- The machine type to use in the VM instance template.
@ -673,6 +679,11 @@ properties:
the default is PERSISTENT.
returned: success
type: str
labels:
description:
- Labels to apply to this address. A list of key->value pairs.
returned: success
type: dict
machineType:
description:
- The machine type to use in the VM instance template.
@ -921,6 +932,7 @@ def main():
type=dict(type='str'),
),
),
labels=dict(type='dict'),
machine_type=dict(required=True, type='str'),
min_cpu_platform=dict(type='str'),
metadata=dict(type='dict'),
@ -1190,6 +1202,7 @@ class InstanceTemplateProperties(object):
u'canIpForward': self.request.get('can_ip_forward'),
u'description': self.request.get('description'),
u'disks': InstanceTemplateDisksArray(self.request.get('disks', []), self.module).to_request(),
u'labels': self.request.get('labels'),
u'machineType': self.request.get('machine_type'),
u'minCpuPlatform': self.request.get('min_cpu_platform'),
u'metadata': self.request.get('metadata'),
@ -1207,6 +1220,7 @@ class InstanceTemplateProperties(object):
u'canIpForward': self.request.get(u'canIpForward'),
u'description': self.request.get(u'description'),
u'disks': InstanceTemplateDisksArray(self.request.get(u'disks', []), self.module).from_response(),
u'labels': self.request.get(u'labels'),
u'machineType': self.request.get(u'machineType'),
u'minCpuPlatform': self.request.get(u'minCpuPlatform'),
u'metadata': self.request.get(u'metadata'),

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''
@ -258,6 +257,11 @@ resources:
specified, the default is PERSISTENT.
returned: success
type: str
labels:
description:
- Labels to apply to this address. A list of key->value pairs.
returned: success
type: dict
machineType:
description:
- The machine type to use in the VM instance template.

View file

@ -62,7 +62,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -56,7 +56,6 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

View file

@ -101,7 +101,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#forwardingRule'"
- name: verify that global_forwarding_rule was created
gcp_compute_global_forwarding_rule_facts:
filters:
@ -133,7 +132,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#forwardingRule'"
#----------------------------------------------------------
- name: delete a global forwarding rule
gcp_compute_global_forwarding_rule:

View file

@ -49,7 +49,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#healthCheck'"
- name: verify that health_check was created
gcp_compute_health_check_facts:
filters:
@ -85,7 +84,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#healthCheck'"
#----------------------------------------------------------
- name: delete a health check
gcp_compute_health_check:

View file

@ -41,7 +41,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#httpHealthCheck'"
- name: verify that http_health_check was created
gcp_compute_http_health_check_facts:
filters:
@ -73,7 +72,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#httpHealthCheck'"
#----------------------------------------------------------
- name: delete a http health check
gcp_compute_http_health_check:

View file

@ -41,7 +41,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#httpsHealthCheck'"
- name: verify that https_health_check was created
gcp_compute_https_health_check_facts:
filters:
@ -73,7 +72,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#httpsHealthCheck'"
#----------------------------------------------------------
- name: delete a https health check
gcp_compute_https_health_check:

View file

@ -44,7 +44,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#image'"
- name: verify that image was created
gcp_compute_image_facts:
filters:
@ -73,7 +72,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#image'"
#----------------------------------------------------------
- name: delete a image
gcp_compute_image:

View file

@ -95,7 +95,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#instance'"
- name: verify that instance was created
gcp_compute_instance_facts:
filters:
@ -141,7 +140,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#instance'"
#----------------------------------------------------------
- name: delete a instance
gcp_compute_instance:

View file

@ -51,7 +51,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#instanceGroup'"
- name: verify that instance_group was created
gcp_compute_instance_group_facts:
filters:
@ -85,7 +84,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#instanceGroup'"
#----------------------------------------------------------
- name: delete a instance group
gcp_compute_instance_group:

View file

@ -79,7 +79,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#instanceGroupManager'"
- name: verify that instance_group_manager was created
gcp_compute_instance_group_manager_facts:
filters:
@ -112,7 +111,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#instanceGroupManager'"
#----------------------------------------------------------
- name: delete a instance group manager
gcp_compute_instance_group_manager:

View file

@ -76,7 +76,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#instanceTemplate'"
- name: verify that instance_template was created
gcp_compute_instance_template_facts:
filters:
@ -117,7 +116,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#instanceTemplate'"
#----------------------------------------------------------
- name: delete a instance template
gcp_compute_instance_template:

View file

@ -35,7 +35,6 @@
assert:
that:
- result.changed == true
- "result.kind == 'compute#network'"
- name: verify that network was created
gcp_compute_network_facts:
filters:
@ -64,7 +63,6 @@
assert:
that:
- result.changed == false
- "result.kind == 'compute#network'"
#----------------------------------------------------------
- name: delete a network
gcp_compute_network: