Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class ScriptSerializer(serialize.QuerySerializer):
def serialize_to_request(self, parameters, operation_model):
serialized = super(ScriptSerializer, self).serialize_to_request(
parameters, operation_model
)
target = '%s.%s' % (operation_model.metadata['targetPrefix'],
operation_model.name)
serialized['headers']['X-Amz-Target'] = target
serialized['url_path'] = operation_model.http.get('requestUri', '/')
del serialized['body']['Action']
del serialized['body']['Version']
return serialized
serialize.SERIALIZERS.update({
'computing': ComputingSerializer,
'script': ScriptSerializer
})
def serialize_to_request(self, parameters, operation_model):
serialized = super(ComputingSerializer, self).serialize_to_request(
parameters, operation_model
)
serialized['url_path'] = operation_model.http.get('requestUri', '/')
# Fix request parameters of DescribeLoadBalancers for NIFCLOUD
if operation_model.name == 'DescribeLoadBalancers':
serialized["body"] = self._fix_describe_load_balancers_params(
parameters, operation_model.metadata['apiVersion']
)
return serialized