Bug fixes for GCP modules (#63604)

pull/63604/merge
The Magician 5 years ago committed by ansibot
parent e7b0050542
commit 8b0927fe16

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_disk_info
description:
- Gather info for GCP Disk
- This module was called C(gcp_compute_disk_facts) before Ansible 2.9. The usage has
not changed.
short_description: Gather info for GCP Disk
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -343,9 +341,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
if module._name == 'gcp_compute_disk_facts':
module.deprecate("The 'gcp_compute_disk_facts' module has been renamed to 'gcp_compute_disk_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_firewall_info
description:
- Gather info for GCP Firewall
- This module was called C(gcp_compute_firewall_facts) before Ansible 2.9. The usage
has not changed.
short_description: Gather info for GCP Firewall
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -299,9 +297,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_firewall_facts':
module.deprecate("The 'gcp_compute_firewall_facts' module has been renamed to 'gcp_compute_firewall_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_forwarding_rule_info
description:
- Gather info for GCP ForwardingRule
- This module was called C(gcp_compute_forwarding_rule_facts) before Ansible 2.9.
The usage has not changed.
short_description: Gather info for GCP ForwardingRule
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -301,9 +299,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), region=dict(required=True, type='str')))
if module._name == 'gcp_compute_forwarding_rule_facts':
module.deprecate("The 'gcp_compute_forwarding_rule_facts' module has been renamed to 'gcp_compute_forwarding_rule_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_global_address_info
description:
- Gather info for GCP GlobalAddress
- This module was called C(gcp_compute_global_address_facts) before Ansible 2.9. The
usage has not changed.
short_description: Gather info for GCP GlobalAddress
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -200,9 +198,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_global_address_facts':
module.deprecate("The 'gcp_compute_global_address_facts' module has been renamed to 'gcp_compute_global_address_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_global_forwarding_rule_info
description:
- Gather info for GCP GlobalForwardingRule
- This module was called C(gcp_compute_global_forwarding_rule_facts) before Ansible
2.9. The usage has not changed.
short_description: Gather info for GCP GlobalForwardingRule
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -280,9 +278,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_global_forwarding_rule_facts':
module.deprecate("The 'gcp_compute_global_forwarding_rule_facts' module has been renamed to 'gcp_compute_global_forwarding_rule_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_health_check_info
description:
- Gather info for GCP HealthCheck
- This module was called C(gcp_compute_health_check_facts) before Ansible 2.9. The
usage has not changed.
short_description: Gather info for GCP HealthCheck
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -468,9 +466,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_health_check_facts':
module.deprecate("The 'gcp_compute_health_check_facts' module has been renamed to 'gcp_compute_health_check_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_http_health_check_info
description:
- Gather info for GCP HttpHealthCheck
- This module was called C(gcp_compute_http_health_check_facts) before Ansible 2.9.
The usage has not changed.
short_description: Gather info for GCP HttpHealthCheck
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -200,9 +198,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_http_health_check_facts':
module.deprecate("The 'gcp_compute_http_health_check_facts' module has been renamed to 'gcp_compute_http_health_check_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_https_health_check_info
description:
- Gather info for GCP HttpsHealthCheck
- This module was called C(gcp_compute_https_health_check_facts) before Ansible 2.9.
The usage has not changed.
short_description: Gather info for GCP HttpsHealthCheck
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -200,9 +198,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_https_health_check_facts':
module.deprecate("The 'gcp_compute_https_health_check_facts' module has been renamed to 'gcp_compute_https_health_check_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_image_info
description:
- Gather info for GCP Image
- This module was called C(gcp_compute_image_facts) before Ansible 2.9. The usage
has not changed.
short_description: Gather info for GCP Image
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -331,9 +329,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str')))
if module._name == 'gcp_compute_image_facts':
module.deprecate("The 'gcp_compute_image_facts' module has been renamed to 'gcp_compute_image_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -309,6 +309,32 @@ options:
- 'Some valid choices include: "ONE_TO_ONE_NAT"'
required: true
type: str
set_public_ptr:
description:
- Specifies whether a public DNS PTR record should be created to map the
external IP address of the instance to a DNS domain name.
required: false
type: bool
version_added: '2.10'
public_ptr_domain_name:
description:
- The DNS domain name for the public PTR record. You can set this field
only if the setPublicPtr field is enabled.
required: false
type: str
version_added: '2.10'
network_tier:
description:
- This signifies the networking tier used for configuring this access
configuration. If an AccessConfig is specified without a valid external
IP address, an ephemeral IP will be created with this networkTier. If
an AccessConfig with a valid external IP address is specified, it must
match that of the networkTier associated with the Address resource owning
that IP.
- 'Some valid choices include: "PREMIUM", "STANDARD"'
required: false
type: str
version_added: '2.10'
alias_ip_ranges:
description:
- An array of alias IP ranges for this network interface. Can only be specified
@ -841,6 +867,27 @@ networkInterfaces:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
returned: success
type: str
setPublicPtr:
description:
- Specifies whether a public DNS PTR record should be created to map the
external IP address of the instance to a DNS domain name.
returned: success
type: bool
publicPtrDomainName:
description:
- The DNS domain name for the public PTR record. You can set this field
only if the setPublicPtr field is enabled.
returned: success
type: str
networkTier:
description:
- This signifies the networking tier used for configuring this access configuration.
If an AccessConfig is specified without a valid external IP address, an
ephemeral IP will be created with this networkTier. If an AccessConfig
with a valid external IP address is specified, it must match that of the
networkTier associated with the Address resource owning that IP.
returned: success
type: str
aliasIpRanges:
description:
- An array of alias IP ranges for this network interface. Can only be specified
@ -1062,7 +1109,14 @@ def main():
access_configs=dict(
type='list',
elements='dict',
options=dict(name=dict(required=True, type='str'), nat_ip=dict(type='dict'), type=dict(required=True, type='str')),
options=dict(
name=dict(required=True, type='str'),
nat_ip=dict(type='dict'),
type=dict(required=True, type='str'),
set_public_ptr=dict(type='bool'),
public_ptr_domain_name=dict(type='str'),
network_tier=dict(type='str'),
),
),
alias_ip_ranges=dict(type='list', elements='dict', options=dict(ip_cidr_range=dict(type='str'), subnetwork_range_name=dict(type='str'))),
network=dict(type='dict'),
@ -1641,11 +1695,27 @@ class InstanceAccessconfigsArray(object):
def _request_for_item(self, item):
return remove_nones_from_dict(
{u'name': item.get('name'), u'natIP': replace_resource_dict(item.get(u'nat_ip', {}), 'address'), u'type': item.get('type')}
{
u'name': item.get('name'),
u'natIP': replace_resource_dict(item.get(u'nat_ip', {}), 'address'),
u'type': item.get('type'),
u'setPublicPtr': item.get('set_public_ptr'),
u'publicPtrDomainName': item.get('public_ptr_domain_name'),
u'networkTier': item.get('network_tier'),
}
)
def _response_from_item(self, item):
return remove_nones_from_dict({u'name': item.get(u'name'), u'natIP': item.get(u'natIP'), u'type': item.get(u'type')})
return remove_nones_from_dict(
{
u'name': item.get(u'name'),
u'natIP': item.get(u'natIP'),
u'type': item.get(u'type'),
u'setPublicPtr': item.get(u'setPublicPtr'),
u'publicPtrDomainName': item.get(u'publicPtrDomainName'),
u'networkTier': item.get(u'networkTier'),
}
)
class InstanceAliasiprangesArray(object):

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_instance_group_info
description:
- Gather info for GCP InstanceGroup
- This module was called C(gcp_compute_instance_group_facts) before Ansible 2.9. The
usage has not changed.
short_description: Gather info for GCP InstanceGroup
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -209,9 +207,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
if module._name == 'gcp_compute_instance_group_facts':
module.deprecate("The 'gcp_compute_instance_group_facts' module has been renamed to 'gcp_compute_instance_group_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_instance_group_manager_info
description:
- Gather info for GCP InstanceGroupManager
- This module was called C(gcp_compute_instance_group_manager_facts) before Ansible
2.9. The usage has not changed.
short_description: Gather info for GCP InstanceGroupManager
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -284,9 +282,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
if module._name == 'gcp_compute_instance_group_manager_facts':
module.deprecate("The 'gcp_compute_instance_group_manager_facts' module has been renamed to 'gcp_compute_instance_group_manager_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

@ -32,8 +32,6 @@ DOCUMENTATION = '''
module: gcp_compute_instance_info
description:
- Gather info for GCP Instance
- This module was called C(gcp_compute_instance_facts) before Ansible 2.9. The usage
has not changed.
short_description: Gather info for GCP Instance
version_added: '2.7'
author: Google Inc. (@googlecloudplatform)
@ -395,6 +393,28 @@ resources:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
returned: success
type: str
setPublicPtr:
description:
- Specifies whether a public DNS PTR record should be created to map
the external IP address of the instance to a DNS domain name.
returned: success
type: bool
publicPtrDomainName:
description:
- The DNS domain name for the public PTR record. You can set this field
only if the setPublicPtr field is enabled.
returned: success
type: str
networkTier:
description:
- This signifies the networking tier used for configuring this access
configuration. If an AccessConfig is specified without a valid external
IP address, an ephemeral IP will be created with this networkTier.
If an AccessConfig with a valid external IP address is specified,
it must match that of the networkTier associated with the Address
resource owning that IP.
returned: success
type: str
aliasIpRanges:
description:
- An array of alias IP ranges for this network interface. Can only be specified
@ -571,9 +591,6 @@ import json
def main():
module = GcpModule(argument_spec=dict(filters=dict(type='list', elements='str'), zone=dict(required=True, type='str')))
if module._name == 'gcp_compute_instance_facts':
module.deprecate("The 'gcp_compute_instance_facts' module has been renamed to 'gcp_compute_instance_info'", version='2.13')
if not module.params['scopes']:
module.params['scopes'] = ['https://www.googleapis.com/auth/compute']

Loading…
Cancel
Save