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

Commit

Permalink
[Ansible] client side validation can't have docs with explicit choices (
Browse files Browse the repository at this point in the history
#258)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and rambleraptor committed May 23, 2019
1 parent 42dc3cd commit 221c04e
Show file tree
Hide file tree
Showing 30 changed files with 86 additions and 307 deletions.
5 changes: 1 addition & 4 deletions lib/ansible/modules/cloud/google/gcp_bigquery_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@
description:
- Describes the rights granted to the user specified by the other member of
the access object .
- 'Some valid choices include: "READER", "WRITER", "OWNER"'
required: false
choices:
- READER
- WRITER
- OWNER
special_group:
description:
- A special group to grant access to.
Expand Down
78 changes: 17 additions & 61 deletions lib/ansible/modules/cloud/google/gcp_bigquery_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@
type:
description:
- The only type supported is DAY, which will generate one partition per day.
- 'Some valid choices include: "DAY"'
required: false
choices:
- DAY
schema:
description:
- Describes the schema of this table.
Expand All @@ -142,29 +141,18 @@
mode:
description:
- The field mode.
- 'Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED"'
required: false
choices:
- NULLABLE
- REQUIRED
- REPEATED
name:
description:
- The field name.
required: false
type:
description:
- The field data type.
- 'Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT",
"TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD"'
required: false
choices:
- STRING
- BYTES
- INTEGER
- FLOAT
- TIMESTAMP
- DATE
- TIME
- DATETIME
- RECORD
encryption_configuration:
description:
- Custom encryption configuration.
Expand Down Expand Up @@ -197,10 +185,8 @@
compression:
description:
- The compression type of the data source.
- 'Some valid choices include: "GZIP", "NONE"'
required: false
choices:
- GZIP
- NONE
ignore_unknown_values:
description:
- Indicates if BigQuery should allow extra values that are not represented
Expand All @@ -216,14 +202,9 @@
source_format:
description:
- The data format.
- 'Some valid choices include: "CSV", "GOOGLE_SHEETS", "NEWLINE_DELIMITED_JSON",
"AVRO", "DATASTORE_BACKUP", "BIGTABLE"'
required: false
choices:
- CSV
- GOOGLE_SHEETS
- NEWLINE_DELIMITED_JSON
- AVRO
- DATASTORE_BACKUP
- BIGTABLE
source_uris:
description:
- 'The fully-qualified URIs that point to your data in Google Cloud. For Google
Expand Down Expand Up @@ -257,29 +238,18 @@
mode:
description:
- Field mode.
- 'Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED"'
required: false
choices:
- NULLABLE
- REQUIRED
- REPEATED
name:
description:
- Field name.
required: false
type:
description:
- Field data type.
- 'Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT",
"TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD"'
required: false
choices:
- STRING
- BYTES
- INTEGER
- FLOAT
- TIMESTAMP
- DATE
- TIME
- DATETIME
- RECORD
google_sheets_options:
description:
- Additional options if sourceFormat is set to GOOGLE_SHEETS.
Expand Down Expand Up @@ -311,10 +281,8 @@
encoding:
description:
- The character encoding of the data.
- 'Some valid choices include: "UTF-8", "ISO-8859-1"'
required: false
choices:
- UTF-8
- ISO-8859-1
field_delimiter:
description:
- The separator for fields in a CSV file.
Expand Down Expand Up @@ -361,10 +329,8 @@
encoding:
description:
- The encoding of the values when the type is not STRING.
- 'Some valid choices include: "TEXT", "BINARY"'
required: false
choices:
- TEXT
- BINARY
field_name:
description:
- If the qualifier is not a valid BigQuery field identifier, a
Expand All @@ -384,20 +350,14 @@
type:
description:
- The type to convert the value in cells of this column.
- 'Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT",
"BOOLEAN"'
required: false
choices:
- BYTES
- STRING
- INTEGER
- FLOAT
- BOOLEAN
encoding:
description:
- The encoding of the values when the type is not STRING.
- 'Some valid choices include: "TEXT", "BINARY"'
required: false
choices:
- TEXT
- BINARY
family_id:
description:
- Identifier of the column family.
Expand All @@ -411,13 +371,9 @@
type:
description:
- The type to convert the value in cells of this column family.
- 'Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT",
"BOOLEAN"'
required: false
choices:
- BYTES
- STRING
- INTEGER
- FLOAT
- BOOLEAN
dataset:
description:
- Name of the dataset.
Expand Down
8 changes: 2 additions & 6 deletions lib/ansible/modules/cloud/google/gcp_compute_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@
description:
- The type of address to reserve, either INTERNAL or EXTERNAL.
- If unspecified, defaults to EXTERNAL.
- 'Some valid choices include: "INTERNAL", "EXTERNAL"'
required: false
default: EXTERNAL
version_added: 2.7
choices:
- INTERNAL
- EXTERNAL
description:
description:
- An optional description of this resource.
Expand All @@ -89,11 +87,9 @@
- 'The networking tier used for configuring this address. This field can take
the following values: PREMIUM or STANDARD. If this field is not specified, it
is assumed to be PREMIUM.'
- 'Some valid choices include: "PREMIUM", "STANDARD"'
required: false
version_added: 2.8
choices:
- PREMIUM
- STANDARD
subnetwork:
description:
- The URL of the subnetwork in which to reserve the address. If an IP address
Expand Down
20 changes: 4 additions & 16 deletions lib/ansible/modules/cloud/google/gcp_compute_backend_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@
- Specifies the balancing mode for this backend.
- For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION.
Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
- 'Some valid choices include: "UTILIZATION", "RATE", "CONNECTION"'
required: false
default: UTILIZATION
choices:
- UTILIZATION
- RATE
- CONNECTION
capacity_scaler:
description:
- A multiplier applied to the group's maximum servicing capacity (based on
Expand Down Expand Up @@ -242,11 +239,10 @@
load balancing. A backend service created for one type of load balancing cannot
be used with the other. Must be `EXTERNAL` for a global backend service. Defaults
to `EXTERNAL`.
- 'Some valid choices include: "EXTERNAL"'
required: false
default: EXTERNAL
version_added: 2.7
choices:
- EXTERNAL
name:
description:
- Name of the resource. Provided by the client when the resource is created. The
Expand All @@ -267,13 +263,8 @@
- 'Possible values are HTTP, HTTPS, HTTP2, TCP, and SSL. The default is HTTP.
**NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer types and may result
in errors if used with the GA API.'
- 'Some valid choices include: "HTTP", "HTTPS", "HTTP2", "TCP", "SSL"'
required: false
choices:
- HTTP
- HTTPS
- HTTP2
- TCP
- SSL
security_policy:
description:
- The security policy associated with this backend service.
Expand All @@ -284,11 +275,8 @@
- Type of session affinity to use. The default is NONE.
- When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
- When the protocol is UDP, this field is not used.
- 'Some valid choices include: "NONE", "CLIENT_IP", "GENERATED_COOKIE"'
required: false
choices:
- NONE
- CLIENT_IP
- GENERATED_COOKIE
timeout_sec:
description:
- How many seconds to wait for the backend before considering it a failed request.
Expand Down
4 changes: 1 addition & 3 deletions lib/ansible/modules/cloud/google/gcp_compute_firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@
- 'Direction of traffic to which this firewall applies; default is INGRESS. Note:
For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS
traffic, it is NOT supported to specify sourceRanges OR sourceTags.'
- 'Some valid choices include: "INGRESS", "EGRESS"'
required: false
version_added: 2.8
choices:
- INGRESS
- EGRESS
disabled:
description:
- Denotes whether the firewall rule is disabled, i.e not applied to the network
Expand Down
20 changes: 4 additions & 16 deletions lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@
- The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP,
AH, SCTP or ICMP.
- When the load balancing scheme is INTERNAL, only TCP and UDP are valid.
- 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"'
required: false
choices:
- TCP
- UDP
- ESP
- AH
- SCTP
- ICMP
backend_service:
description:
- A BackendService to receive the matched traffic. This is used only for INTERNAL
Expand All @@ -102,21 +96,17 @@
ip_version:
description:
- ipVersion is not a valid field for regional forwarding rules.
- 'Some valid choices include: "IPV4", "IPV6"'
required: false
choices:
- IPV4
- IPV6
load_balancing_scheme:
description:
- 'This signifies what the ForwardingRule will be used for and can only take the
following values: INTERNAL, EXTERNAL The value of INTERNAL means that this will
be used for Internal Network Load Balancing (TCP, UDP). The value of EXTERNAL
means that this will be used for External Load Balancing (HTTP(S) LB, External
TCP/UDP LB, SSL Proxy) .'
- 'Some valid choices include: "INTERNAL", "EXTERNAL"'
required: false
choices:
- INTERNAL
- EXTERNAL
name:
description:
- Name of the resource; provided by the client when the resource is created. The
Expand Down Expand Up @@ -199,11 +189,9 @@
- 'The networking tier used for configuring this address. This field can take
the following values: PREMIUM or STANDARD. If this field is not specified, it
is assumed to be PREMIUM.'
- 'Some valid choices include: "PREMIUM", "STANDARD"'
required: false
version_added: 2.8
choices:
- PREMIUM
- STANDARD
service_label:
description:
- An optional prefix to the service name for this Forwarding Rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,17 @@
description:
- The IP Version that will be used by this address. Valid options are `IPV4` or
`IPV6`. The default value is `IPV4`.
- 'Some valid choices include: "IPV4", "IPV6"'
required: false
choices:
- IPV4
- IPV6
address_type:
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."
- 'Some valid choices include: "EXTERNAL", "INTERNAL"'
required: false
default: EXTERNAL
version_added: 2.8
choices:
- EXTERNAL
- INTERNAL
extends_documentation_fragment: gcp
notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/globalAddresses)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,33 +83,23 @@
- The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP,
AH, SCTP or ICMP. When the load balancing scheme is INTERNAL_SELF_MANAGED, only
TCP is valid.
- 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"'
required: false
choices:
- TCP
- UDP
- ESP
- AH
- SCTP
- ICMP
ip_version:
description:
- The IP Version that will be used by this global forwarding rule.
- Valid options are IPV4 or IPV6.
- 'Some valid choices include: "IPV4", "IPV6"'
required: false
choices:
- IPV4
- IPV6
load_balancing_scheme:
description:
- This signifies what the GlobalForwardingRule will be used for.
- 'The value of INTERNAL_SELF_MANAGED means that this will be used for Internal
Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External
Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently
global forwarding rules cannot be used for INTERNAL load balancing.'
- 'Some valid choices include: "INTERNAL_SELF_MANAGED", "EXTERNAL"'
required: false
choices:
- INTERNAL_SELF_MANAGED
- EXTERNAL
name:
description:
- Name of the resource; provided by the client when the resource is created. The
Expand Down
Loading

0 comments on commit 221c04e

Please sign in to comment.