mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-07 03:10:30 -07:00
response_to_hash should use api_name (#181)
<!-- This change is generated by MagicModules. --> /cc @rambleraptor
This commit is contained in:
parent
8c60e90103
commit
6c4fae3b34
5 changed files with 6 additions and 6 deletions
|
@ -669,7 +669,7 @@ class FirewallAllowedArray(object):
|
|||
return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')})
|
||||
|
||||
def _response_from_item(self, item):
|
||||
return remove_nones_from_dict({u'IPProtocol': item.get(u'ip_protocol'), u'ports': item.get(u'ports')})
|
||||
return remove_nones_from_dict({u'IPProtocol': item.get(u'IPProtocol'), u'ports': item.get(u'ports')})
|
||||
|
||||
|
||||
class FirewallDeniedArray(object):
|
||||
|
@ -696,7 +696,7 @@ class FirewallDeniedArray(object):
|
|||
return remove_nones_from_dict({u'IPProtocol': item.get('ip_protocol'), u'ports': item.get('ports')})
|
||||
|
||||
def _response_from_item(self, item):
|
||||
return remove_nones_from_dict({u'IPProtocol': item.get(u'ip_protocol'), u'ports': item.get(u'ports')})
|
||||
return remove_nones_from_dict({u'IPProtocol': item.get(u'IPProtocol'), u'ports': item.get(u'ports')})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -340,7 +340,7 @@ def is_different(module, response):
|
|||
def response_to_hash(module, response):
|
||||
return {
|
||||
u'description': module.params.get('description'),
|
||||
u'gatewayIPv4': response.get(u'gateway_ipv4'),
|
||||
u'gatewayIPv4': response.get(u'gatewayIPv4'),
|
||||
u'id': response.get(u'id'),
|
||||
u'IPv4Range': module.params.get('ipv4_range'),
|
||||
u'name': module.params.get('name'),
|
||||
|
|
|
@ -326,7 +326,7 @@ def is_different(module, response):
|
|||
# Remove unnecessary properties from the response.
|
||||
# This is for doing comparisons with Ansible's current parameters.
|
||||
def response_to_hash(module, response):
|
||||
return {u'name': response.get(u'name'), u'type': response.get(u'type'), u'ttl': response.get(u'ttl'), u'rrdatas': response.get(u'target')}
|
||||
return {u'name': response.get(u'name'), u'type': response.get(u'type'), u'ttl': response.get(u'ttl'), u'rrdatas': response.get(u'rrdatas')}
|
||||
|
||||
|
||||
def updated_record(module):
|
||||
|
|
|
@ -305,7 +305,7 @@ def is_different(module, response):
|
|||
# This is for doing comparisons with Ansible's current parameters.
|
||||
def response_to_hash(module, response):
|
||||
return {
|
||||
u'projectNumber': response.get(u'number'),
|
||||
u'projectNumber': response.get(u'projectNumber'),
|
||||
u'lifecycleState': response.get(u'lifecycleState'),
|
||||
u'name': response.get(u'name'),
|
||||
u'createTime': response.get(u'createTime'),
|
||||
|
|
|
@ -1281,7 +1281,7 @@ class BucketCondition(object):
|
|||
def from_response(self):
|
||||
return remove_nones_from_dict(
|
||||
{
|
||||
u'age': self.request.get(u'ageDays'),
|
||||
u'age': self.request.get(u'age'),
|
||||
u'createdBefore': self.request.get(u'createdBefore'),
|
||||
u'isLive': self.request.get(u'isLive'),
|
||||
u'matchesStorageClass': self.request.get(u'matchesStorageClass'),
|
||||
|
|
Loading…
Add table
Reference in a new issue