How to use the nifcloud.serialize.ComputingSerializer function in nifcloud

To help you get started, we’ve selected a few nifcloud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nifcloud / nifcloud-sdk-python / nifcloud / serialize.py View on Github external
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
})
github nifcloud / nifcloud-sdk-python / nifcloud / serialize.py View on Github external
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

nifcloud

Data-driven NIFCLOUD SDK for Python

Apache-2.0
Latest version published 2 months ago

Package Health Score

64 / 100
Full package analysis

Similar packages