Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Make forwarding rule service_label and service_name GA #221

Merged
merged 1 commit into from
Mar 28, 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
34 changes: 34 additions & 0 deletions lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@
choices:
- PREMIUM
- STANDARD
service_label:
description:
- An optional prefix to the service name for this Forwarding Rule.
- If specified, will be the first label of the fully qualified service name.
- The label must be 1-63 characters long, and comply with RFC1035.
- Specifically, the label must be 1-63 characters long and match the regular expression
`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase
letter, and all following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.
- This field is only used for internal load balancing.
required: false
version_added: 2.8
region:
description:
- A reference to the region where the regional forwarding rule resides.
Expand Down Expand Up @@ -396,6 +408,24 @@
to be PREMIUM.'
returned: success
type: str
serviceLabel:
description:
- An optional prefix to the service name for this Forwarding Rule.
- If specified, will be the first label of the fully qualified service name.
- The label must be 1-63 characters long, and comply with RFC1035.
- Specifically, the label must be 1-63 characters long and match the regular expression
`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase
letter, and all following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.
- This field is only used for internal load balancing.
returned: success
type: str
serviceName:
description:
- The internal fully qualified service name for this Forwarding Rule.
- This field is only used for internal load balancing.
returned: success
type: str
region:
description:
- A reference to the region where the regional forwarding rule resides.
Expand Down Expand Up @@ -437,6 +467,7 @@ def main():
target=dict(),
all_ports=dict(type='bool'),
network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']),
service_label=dict(type='str'),
region=dict(required=True, type='str'),
)
)
Expand Down Expand Up @@ -517,6 +548,7 @@ def resource_to_request(module):
u'target': replace_resource_dict(module.params.get(u'target', {}), 'selfLink'),
u'allPorts': module.params.get('all_ports'),
u'networkTier': module.params.get('network_tier'),
u'serviceLabel': module.params.get('service_label'),
}
return_vals = {}
for k, v in request.items():
Expand Down Expand Up @@ -598,6 +630,8 @@ def response_to_hash(module, response):
u'target': response.get(u'target'),
u'allPorts': response.get(u'allPorts'),
u'networkTier': module.params.get('network_tier'),
u'serviceLabel': response.get(u'serviceLabel'),
u'serviceName': response.get(u'serviceName'),
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,24 @@
it is assumed to be PREMIUM.'
returned: success
type: str
serviceLabel:
description:
- An optional prefix to the service name for this Forwarding Rule.
- If specified, will be the first label of the fully qualified service name.
- The label must be 1-63 characters long, and comply with RFC1035.
- Specifically, the label must be 1-63 characters long and match the regular
expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must
be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
- This field is only used for internal load balancing.
returned: success
type: str
serviceName:
description:
- The internal fully qualified service name for this Forwarding Rule.
- This field is only used for internal load balancing.
returned: success
type: str
region:
description:
- A reference to the region where the regional forwarding rule resides.
Expand Down