Bug fixes for GCP modules (#64823)

This commit is contained in:
The Magician 2019-11-25 16:20:07 -08:00 committed by ansibot
parent 4fdc022853
commit cd8b42c376
7 changed files with 33 additions and 24 deletions

View file

@ -505,7 +505,6 @@ def main():
target_tags=dict(type='list', elements='str'),
),
mutually_exclusive=[
['allowed', 'denied'],
['destination_ranges', 'source_ranges', 'source_tags'],
['destination_ranges', 'source_ranges'],
['source_service_accounts', 'source_tags', 'target_tags'],

View file

@ -98,12 +98,6 @@ options:
field to "{{ name-of-resource }}"'
required: false
type: dict
ip_version:
description:
- ipVersion is not a valid field for regional forwarding rules.
- 'Some valid choices include: "IPV4", "IPV6"'
required: false
type: str
load_balancing_scheme:
description:
- This signifies what the ForwardingRule will be used for and can be EXTERNAL,
@ -367,11 +361,6 @@ backendService:
load balancing.
returned: success
type: dict
ipVersion:
description:
- ipVersion is not a valid field for regional forwarding rules.
returned: success
type: str
loadBalancingScheme:
description:
- This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL,
@ -504,7 +493,6 @@ def main():
ip_address=dict(type='str'),
ip_protocol=dict(type='str'),
backend_service=dict(type='dict'),
ip_version=dict(type='str'),
load_balancing_scheme=dict(type='str'),
name=dict(required=True, type='str'),
network=dict(type='dict'),
@ -585,7 +573,6 @@ def resource_to_request(module):
u'IPAddress': module.params.get('ip_address'),
u'IPProtocol': module.params.get('ip_protocol'),
u'backendService': replace_resource_dict(module.params.get(u'backend_service', {}), 'selfLink'),
u'ipVersion': module.params.get('ip_version'),
u'loadBalancingScheme': module.params.get('load_balancing_scheme'),
u'name': module.params.get('name'),
u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'),
@ -667,7 +654,6 @@ def response_to_hash(module, response):
u'IPAddress': response.get(u'IPAddress'),
u'IPProtocol': response.get(u'IPProtocol'),
u'backendService': response.get(u'backendService'),
u'ipVersion': response.get(u'ipVersion'),
u'loadBalancingScheme': response.get(u'loadBalancingScheme'),
u'name': response.get(u'name'),
u'network': response.get(u'network'),

View file

@ -171,11 +171,6 @@ resources:
load balancing.
returned: success
type: dict
ipVersion:
description:
- ipVersion is not a valid field for regional forwarding rules.
returned: success
type: str
loadBalancingScheme:
description:
- This signifies what the ForwardingRule will be used for and can be EXTERNAL,

View file

@ -888,8 +888,7 @@ def main():
port_specification=dict(type='str'),
),
),
),
mutually_exclusive=[['http2_health_check', 'http_health_check', 'https_health_check', 'ssl_health_check', 'tcp_health_check']],
)
)
if not module.params['scopes']:

View file

@ -89,7 +89,7 @@ options:
- The type of supported feature.
- 'Some valid choices include: "MULTI_IP_SUBNET", "SECURE_BOOT", "UEFI_COMPATIBLE",
"VIRTIO_SCSI_MULTIQUEUE", "WINDOWS"'
required: false
required: true
type: str
image_encryption_key:
description:
@ -489,7 +489,7 @@ def main():
description=dict(type='str'),
disk_size_gb=dict(type='int'),
family=dict(type='str'),
guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(type='str'))),
guest_os_features=dict(type='list', elements='dict', options=dict(type=dict(required=True, type='str'))),
image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))),
labels=dict(type='dict'),
licenses=dict(type='list', elements='str'),

View file

@ -577,6 +577,11 @@ EXAMPLES = '''
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'

View file

@ -49,6 +49,11 @@
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'
@ -74,6 +79,11 @@
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'
@ -119,6 +129,11 @@
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'
@ -149,6 +164,11 @@
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'
@ -194,6 +214,11 @@
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'