mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-06-03 07:29:10 -07:00
Bug fixes for GCP modules (as of 2019-01-09T15:35:45-08:00) (#50784)
This commit is contained in:
parent
d856bd0c29
commit
87d1c171c5
28 changed files with 230 additions and 197 deletions
|
@ -154,7 +154,7 @@ options:
|
|||
required: false
|
||||
disk_type:
|
||||
description:
|
||||
- Reference to a gcompute_disk_type resource.
|
||||
- Reference to a disk type.
|
||||
- Specifies the disk type to use to create the instance.
|
||||
- If not specified, the default is pd-standard.
|
||||
required: false
|
||||
|
@ -205,17 +205,17 @@ options:
|
|||
- READ_ONLY
|
||||
source:
|
||||
description:
|
||||
- Reference to a gcompute_disk resource. When creating a new instance,
|
||||
one of initializeParams.sourceImage or disks.source is required.
|
||||
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
|
||||
or disks.source is required.
|
||||
- If desired, you can also attach existing non-root persistent disks using
|
||||
this property. This field is only applicable for persistent disks.
|
||||
- Note that for InstanceTemplate, specify the disk name, not the URL for
|
||||
the disk.
|
||||
- 'This field represents a link to a Disk resource in GCP. It can be specified
|
||||
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk
|
||||
task and then set this source field to "{{ name-of-resource }}" Alternatively,
|
||||
you can set this source to a dictionary with the name key where the
|
||||
value is the name of your Disk'
|
||||
in two ways. First, you can place in the name of the resource here as
|
||||
a string Alternatively, you can add `register: name-of-resource` to
|
||||
a gcp_compute_disk task and then set this source field to "{{ name-of-resource
|
||||
}}"'
|
||||
required: false
|
||||
type:
|
||||
description:
|
||||
|
@ -227,7 +227,7 @@ options:
|
|||
- PERSISTENT
|
||||
machine_type:
|
||||
description:
|
||||
- Reference to a gcompute_machine_type resource.
|
||||
- The machine type to use in the VM instance template.
|
||||
required: true
|
||||
min_cpu_platform:
|
||||
description:
|
||||
|
@ -277,18 +277,17 @@ options:
|
|||
required: true
|
||||
nat_ip:
|
||||
description:
|
||||
- Specifies the title of a gcompute_address.
|
||||
- Reference to an address.
|
||||
- An external IP address associated with this instance.
|
||||
- Specify an unused static external IP address available to the project
|
||||
or leave this field undefined to use an IP from a shared ephemeral
|
||||
IP address pool. If you specify a static external IP address, it
|
||||
must live in the same region as the zone of the instance.
|
||||
- 'This field represents a link to a Address resource in GCP. It can
|
||||
be specified in two ways. You can add `register: name-of-resource`
|
||||
to a gcp_compute_address task and then set this nat_ip field to
|
||||
"{{ name-of-resource }}" Alternatively, you can set this nat_ip
|
||||
to a dictionary with the address key where the value is the address
|
||||
of your Address'
|
||||
be specified in two ways. First, you can place in the address of
|
||||
the resource here as a string Alternatively, you can add `register:
|
||||
name-of-resource` to a gcp_compute_address task and then set this
|
||||
nat_ip field to "{{ name-of-resource }}"'
|
||||
required: false
|
||||
type:
|
||||
description:
|
||||
|
@ -324,15 +323,15 @@ options:
|
|||
required: false
|
||||
network:
|
||||
description:
|
||||
- Specifies the title of an existing gcompute_network. When creating an
|
||||
instance, if neither the network nor the subnetwork is specified, the
|
||||
default network global/networks/default is used; if the network is not
|
||||
specified but the subnetwork is specified, the network is inferred.
|
||||
- Specifies the title of an existing network. When creating an instance,
|
||||
if neither the network nor the subnetwork is specified, the default
|
||||
network global/networks/default is used; if the network is not specified
|
||||
but the subnetwork is specified, the network is inferred.
|
||||
- 'This field represents a link to a Network resource in GCP. It can be
|
||||
specified in two ways. You can add `register: name-of-resource` to a
|
||||
gcp_compute_network task and then set this network field to "{{ name-of-resource
|
||||
}}" Alternatively, you can set this network to a dictionary with the
|
||||
selfLink key where the value is the selfLink of your Network'
|
||||
specified in two ways. First, you can place in the selfLink of the resource
|
||||
here as a string 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
|
||||
network_ip:
|
||||
description:
|
||||
|
@ -342,16 +341,15 @@ options:
|
|||
required: false
|
||||
subnetwork:
|
||||
description:
|
||||
- Reference to a gcompute_subnetwork resource.
|
||||
- Reference to a VPC network.
|
||||
- If the network resource is in legacy mode, do not provide this property.
|
||||
If the network is in auto subnet mode, providing the subnetwork is optional.
|
||||
If the network is in custom subnet mode, then this field should be specified.
|
||||
- 'This field represents a link to a Subnetwork resource in GCP. It can
|
||||
be specified in two ways. You can add `register: name-of-resource` to
|
||||
a gcp_compute_subnetwork task and then set this subnetwork field to
|
||||
"{{ name-of-resource }}" Alternatively, you can set this subnetwork
|
||||
to a dictionary with the selfLink key where the value is the selfLink
|
||||
of your Subnetwork'
|
||||
be specified in two ways. First, you can place in the selfLink of the
|
||||
resource here as a string Alternatively, you can add `register: name-of-resource`
|
||||
to a gcp_compute_subnetwork task and then set this subnetwork field
|
||||
to "{{ name-of-resource }}"'
|
||||
required: false
|
||||
scheduling:
|
||||
description:
|
||||
|
@ -585,7 +583,7 @@ properties:
|
|||
type: int
|
||||
diskType:
|
||||
description:
|
||||
- Reference to a gcompute_disk_type resource.
|
||||
- Reference to a disk type.
|
||||
- Specifies the disk type to use to create the instance.
|
||||
- If not specified, the default is pd-standard.
|
||||
returned: success
|
||||
|
@ -637,14 +635,14 @@ properties:
|
|||
type: str
|
||||
source:
|
||||
description:
|
||||
- Reference to a gcompute_disk resource. When creating a new instance, one
|
||||
of initializeParams.sourceImage or disks.source is required.
|
||||
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
|
||||
or disks.source is required.
|
||||
- If desired, you can also attach existing non-root persistent disks using
|
||||
this property. This field is only applicable for persistent disks.
|
||||
- Note that for InstanceTemplate, specify the disk name, not the URL for
|
||||
the disk.
|
||||
returned: success
|
||||
type: dict
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
|
||||
|
@ -653,7 +651,7 @@ properties:
|
|||
type: str
|
||||
machineType:
|
||||
description:
|
||||
- Reference to a gcompute_machine_type resource.
|
||||
- The machine type to use in the VM instance template.
|
||||
returned: success
|
||||
type: str
|
||||
minCpuPlatform:
|
||||
|
@ -710,14 +708,14 @@ properties:
|
|||
type: str
|
||||
natIP:
|
||||
description:
|
||||
- Specifies the title of a gcompute_address.
|
||||
- Reference to an address.
|
||||
- An external IP address associated with this instance.
|
||||
- Specify an unused static external IP address available to the project
|
||||
or leave this field undefined to use an IP from a shared ephemeral
|
||||
IP address pool. If you specify a static external IP address, it must
|
||||
live in the same region as the zone of the instance.
|
||||
returned: success
|
||||
type: dict
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
|
||||
|
@ -754,12 +752,12 @@ properties:
|
|||
type: str
|
||||
network:
|
||||
description:
|
||||
- Specifies the title of an existing gcompute_network. When creating an
|
||||
instance, if neither the network nor the subnetwork is specified, the
|
||||
default network global/networks/default is used; if the network is not
|
||||
specified but the subnetwork is specified, the network is inferred.
|
||||
- Specifies the title of an existing network. When creating an instance,
|
||||
if neither the network nor the subnetwork is specified, the default network
|
||||
global/networks/default is used; if the network is not specified but the
|
||||
subnetwork is specified, the network is inferred.
|
||||
returned: success
|
||||
type: dict
|
||||
type: str
|
||||
networkIP:
|
||||
description:
|
||||
- An IPv4 internal network address to assign to the instance for this network
|
||||
|
@ -769,12 +767,12 @@ properties:
|
|||
type: str
|
||||
subnetwork:
|
||||
description:
|
||||
- Reference to a gcompute_subnetwork resource.
|
||||
- Reference to a VPC network.
|
||||
- If the network resource is in legacy mode, do not provide this property.
|
||||
If the network is in auto subnet mode, providing the subnetwork is optional.
|
||||
If the network is in custom subnet mode, then this field should be specified.
|
||||
returned: success
|
||||
type: dict
|
||||
type: str
|
||||
scheduling:
|
||||
description:
|
||||
- Sets the scheduling options for this instance.
|
||||
|
@ -894,7 +892,7 @@ def main():
|
|||
)),
|
||||
interface=dict(type='str', choices=['SCSI', 'NVME']),
|
||||
mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']),
|
||||
source=dict(type='dict'),
|
||||
source=dict(),
|
||||
type=dict(type='str', choices=['SCRATCH', 'PERSISTENT'])
|
||||
)),
|
||||
machine_type=dict(required=True, type='str'),
|
||||
|
@ -907,7 +905,7 @@ def main():
|
|||
network_interfaces=dict(type='list', elements='dict', options=dict(
|
||||
access_configs=dict(type='list', elements='dict', options=dict(
|
||||
name=dict(required=True, type='str'),
|
||||
nat_ip=dict(type='dict'),
|
||||
nat_ip=dict(),
|
||||
type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])
|
||||
)),
|
||||
alias_ip_ranges=dict(type='list', elements='dict', options=dict(
|
||||
|
@ -915,9 +913,9 @@ def main():
|
|||
subnetwork_range_name=dict(type='str')
|
||||
)),
|
||||
name=dict(type='str'),
|
||||
network=dict(type='dict'),
|
||||
network=dict(),
|
||||
network_ip=dict(type='str'),
|
||||
subnetwork=dict(type='dict')
|
||||
subnetwork=dict()
|
||||
)),
|
||||
scheduling=dict(type='dict', options=dict(
|
||||
automatic_restart=dict(type='bool'),
|
||||
|
@ -1120,7 +1118,7 @@ def decode_response(response, module):
|
|||
return response
|
||||
|
||||
|
||||
# TODO(alexstephen): Implement updating metadata on exsiting resources.
|
||||
# TODO(alexstephen): Implement updating metadata on existing resources.
|
||||
|
||||
# Expose instance 'metadata' as a simple name/value pair hash. However the API
|
||||
# defines metadata as a NestedObject with the following layout:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue