mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Bug fixes for GCP modules (#54253)
This commit is contained in:
parent
65f2bfc850
commit
59da779c41
6 changed files with 20 additions and 54 deletions
|
@ -730,10 +730,10 @@ class ImageImageencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
class ImageRawdisk(object):
|
||||
|
@ -764,10 +764,10 @@ class ImageSourcediskencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -1298,14 +1298,10 @@ class InstanceDiskencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict(
|
||||
{u'rawKey': self.request.get('raw_key'), u'rsaEncryptedKey': self.request.get('rsa_encrypted_key'), u'sha256': self.request.get('sha256')}
|
||||
)
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'rsaEncryptedKey': self.request.get('rsa_encrypted_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict(
|
||||
{u'rawKey': self.request.get(u'rawKey'), u'rsaEncryptedKey': self.request.get(u'rsaEncryptedKey'), u'sha256': self.request.get(u'sha256')}
|
||||
)
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'rsaEncryptedKey': self.request.get(u'rsaEncryptedKey')})
|
||||
|
||||
|
||||
class InstanceInitializeparams(object):
|
||||
|
@ -1348,10 +1344,10 @@ class InstanceSourceimageencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
class InstanceGuestacceleratorsArray(object):
|
||||
|
@ -1406,7 +1402,6 @@ class InstanceNetworkinterfacesArray(object):
|
|||
{
|
||||
u'accessConfigs': InstanceAccessconfigsArray(item.get('access_configs', []), self.module).to_request(),
|
||||
u'aliasIpRanges': InstanceAliasiprangesArray(item.get('alias_ip_ranges', []), self.module).to_request(),
|
||||
u'name': item.get('name'),
|
||||
u'network': replace_resource_dict(item.get(u'network', {}), 'selfLink'),
|
||||
u'networkIP': item.get('network_ip'),
|
||||
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
|
||||
|
@ -1418,7 +1413,6 @@ class InstanceNetworkinterfacesArray(object):
|
|||
{
|
||||
u'accessConfigs': InstanceAccessconfigsArray(item.get(u'accessConfigs', []), self.module).from_response(),
|
||||
u'aliasIpRanges': InstanceAliasiprangesArray(item.get(u'aliasIpRanges', []), self.module).from_response(),
|
||||
u'name': item.get(u'name'),
|
||||
u'network': item.get(u'network'),
|
||||
u'networkIP': item.get(u'networkIP'),
|
||||
u'subnetwork': item.get(u'subnetwork'),
|
||||
|
|
|
@ -537,32 +537,10 @@ class InstanceGroupManagerCurrentactions(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict(
|
||||
{
|
||||
u'abandoning': self.request.get('abandoning'),
|
||||
u'creating': self.request.get('creating'),
|
||||
u'creatingWithoutRetries': self.request.get('creating_without_retries'),
|
||||
u'deleting': self.request.get('deleting'),
|
||||
u'none': self.request.get('none'),
|
||||
u'recreating': self.request.get('recreating'),
|
||||
u'refreshing': self.request.get('refreshing'),
|
||||
u'restarting': self.request.get('restarting'),
|
||||
}
|
||||
)
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict(
|
||||
{
|
||||
u'abandoning': self.request.get(u'abandoning'),
|
||||
u'creating': self.request.get(u'creating'),
|
||||
u'creatingWithoutRetries': self.request.get(u'creatingWithoutRetries'),
|
||||
u'deleting': self.request.get(u'deleting'),
|
||||
u'none': self.request.get(u'none'),
|
||||
u'recreating': self.request.get(u'recreating'),
|
||||
u'refreshing': self.request.get(u'refreshing'),
|
||||
u'restarting': self.request.get(u'restarting'),
|
||||
}
|
||||
)
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
|
||||
class InstanceGroupManagerNamedportsArray(object):
|
||||
|
|
|
@ -1237,14 +1237,10 @@ class InstanceTemplateDiskencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict(
|
||||
{u'rawKey': self.request.get('raw_key'), u'rsaEncryptedKey': self.request.get('rsa_encrypted_key'), u'sha256': self.request.get('sha256')}
|
||||
)
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'rsaEncryptedKey': self.request.get('rsa_encrypted_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict(
|
||||
{u'rawKey': self.request.get(u'rawKey'), u'rsaEncryptedKey': self.request.get(u'rsaEncryptedKey'), u'sha256': self.request.get(u'sha256')}
|
||||
)
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'rsaEncryptedKey': self.request.get(u'rsaEncryptedKey')})
|
||||
|
||||
|
||||
class InstanceTemplateInitializeparams(object):
|
||||
|
@ -1291,10 +1287,10 @@ class InstanceTemplateSourceimageencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
class InstanceTemplateGuestacceleratorsArray(object):
|
||||
|
@ -1349,7 +1345,6 @@ class InstanceTemplateNetworkinterfacesArray(object):
|
|||
{
|
||||
u'accessConfigs': InstanceTemplateAccessconfigsArray(item.get('access_configs', []), self.module).to_request(),
|
||||
u'aliasIpRanges': InstanceTemplateAliasiprangesArray(item.get('alias_ip_ranges', []), self.module).to_request(),
|
||||
u'name': item.get('name'),
|
||||
u'network': replace_resource_dict(item.get(u'network', {}), 'selfLink'),
|
||||
u'networkIP': item.get('network_ip'),
|
||||
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
|
||||
|
@ -1361,7 +1356,6 @@ class InstanceTemplateNetworkinterfacesArray(object):
|
|||
{
|
||||
u'accessConfigs': InstanceTemplateAccessconfigsArray(item.get(u'accessConfigs', []), self.module).from_response(),
|
||||
u'aliasIpRanges': InstanceTemplateAliasiprangesArray(item.get(u'aliasIpRanges', []), self.module).from_response(),
|
||||
u'name': item.get(u'name'),
|
||||
u'network': item.get(u'network'),
|
||||
u'networkIP': item.get(u'networkIP'),
|
||||
u'subnetwork': item.get(u'subnetwork'),
|
||||
|
|
|
@ -484,10 +484,10 @@ class InterconnectAttachmentPrivateinterconnectinfo(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'tag8021q': self.request.get('tag8021q')})
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'tag8021q': self.request.get(u'tag8021q')})
|
||||
return remove_nones_from_dict({})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -585,10 +585,10 @@ class RegionDiskDiskencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
class RegionDiskSourcesnapshotencryptionkey(object):
|
||||
|
@ -600,10 +600,10 @@ class RegionDiskSourcesnapshotencryptionkey(object):
|
|||
self.request = {}
|
||||
|
||||
def to_request(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key')})
|
||||
|
||||
def from_response(self):
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')})
|
||||
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey')})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue