8000 Bug fixes for GCP (as of 2019-06-18T06:06:28+00:00) by modular-magician · Pull Request #58041 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug fixes for GCP (as of 2019-06-18T06:06:28+00:00) #58041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions lib/ansible/modules/cloud/google/gcp_compute_global_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
`IPV6`. The default value is `IPV4`.
- 'Some valid choices include: "IPV4", "IPV6"'
required: false
prefix_length:
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
required: false
version_added: 2.9
address_type:
description:
- The type of the address to reserve, default is EXTERNAL.
Expand All @@ -81,6 +88,26 @@
required: false
default: EXTERNAL
version_added: 2.8
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
- 'Some valid choices include: "VPC_PEERING"'
required: false
version_added: 2.9
network:
description:
- The URL of the network in which to reserve the IP range. The IP range must be
in RFC1918 space. The network cannot be deleted if there are any reserved IP
ranges referring to it.
- This should only be set when using an Internal address.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. First, you can place a dictionary with key ''selfLink'' and value
of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
to a gcp_compute_network task and then set this network field to "{{ name-of-resource
}}"'
required: false
version_added: 2.9
extends_documentation_fragment: gcp
notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/globalAddresses)'
Expand Down Expand Up @@ -139,13 +166,34 @@
- A reference to the region where the regional address resides.
returned: success
type: str
prefixLength:
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
returned: success
type: int
addressType:
description:
- The type of the address to reserve, default is EXTERNAL.
- "* EXTERNAL indicates public/external single IP address."
- "* INTERNAL indicates internal IP ranges belonging to some network."
returned: success
type: str
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
returned: success
type: str
network:
description:
- The URL of the network in which to reserve the IP range. The IP range must be
in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges
referring to it.
- This should only be set when using an Internal address.
returned: success
type: dict
'''

################################################################################
Expand All @@ -172,7 +220,10 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
ip_version=dict(type='str'),
prefix_length=dict(type='int'),
address_type=dict(default='EXTERNAL', type='str'),
purpose=dict(type='str'),
network=dict(type='dict'),
)
)

Expand Down Expand Up @@ -229,7 +280,10 @@ def resource_to_request(module):
u'description': module.params.get('description'),
u'name': module.params.get('name'),
u'ipVersion': module.params.get('ip_version'),
u'prefixLength': module.params.get('prefix_length'),
u'addressType': module.params.get('address_type'),
u'purpose': module.params.get('purpose'),
u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'),
}
return_vals = {}
for k, v in request.items():
Expand Down Expand Up @@ -302,7 +356,10 @@ def response_to_hash(module, response):
u'name': response.get(u'name'),
u'ipVersion': response.get(u'ipVersion'),
u'region': response.get(u'region'),
u'prefixLength': response.get(u'prefixLength'),
u'addressType': response.get(u'addressType'),
u'purpose': response.get(u'purpose'),
u'network': response.get(u'network'),
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,34 @@
- A reference to the region where the regional address resides.
returned: success
type: str
prefixLength:
description:
- The prefix length of the IP range. If not present, it means the address field
is a single IP address.
- This field is not applicable to addresses with addressType=EXTERNAL.
returned: success
type: int
addressType:
description:
- The type of the address to reserve, default is EXTERNAL.
- "* EXTERNAL indicates public/external single IP address."
- "* INTERNAL indicates internal IP ranges belonging to some network."
returned: success
type: str
purpose:
description:
- The purpose of the resource. For global internal addresses it can be * VPC_PEERING
- for peer networks This should only be set when using an Internal address.
returned: success
type: str
network:
description:
- The URL of the network in which to reserve the IP range. The IP range must
be in RFC1918 space. The network cannot be deleted if there are any reserved
IP ranges referring to it.
- This should only be set when using an Internal address.
returned: success
type: dict
'''

################################################################################
Expand Down
0