How to use nifcloud - 9 common examples

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


class Session(session.Session):

    def __init__(self, session_vars=None, event_hooks=None,
                 include_builtin_handlers=True, profile=None):
        super(Session, self).__init__(session_vars, event_hooks,
                                      include_builtin_handlers, profile)
        self.user_agent_name = 'nifcloud'
        self.user_agent_version = nifcloud.__version__
        self.user_agent_extra = 'botocore/%s' % botocore_version


session.Session = Session
github nifcloud / nifcloud-sdk-python / nifcloud / session.py View on Github external
def __init__(self, session_vars=None, event_hooks=None,
                 include_builtin_handlers=True, profile=None):
        super(Session, self).__init__(session_vars, event_hooks,
                                      include_builtin_handlers, profile)
        self.user_agent_name = 'nifcloud'
        self.user_agent_version = nifcloud.__version__
        self.user_agent_extra = 'botocore/%s' % botocore_version
github nifcloud / nifcloud-sdk-python / nifcloud / session.py View on Github external
def __init__(self, session_vars=None, event_hooks=None,
                 include_builtin_handlers=True, profile=None):
        super(Session, self).__init__(session_vars, event_hooks,
                                      include_builtin_handlers, profile)
        self.user_agent_name = 'nifcloud'
        self.user_agent_version = nifcloud.__version__
        self.user_agent_extra = 'botocore/%s' % botocore_version
github nifcloud / nifcloud-sdk-python / nifcloud / docs / __init__.py View on Github external
replace = r"\1<%s/script/start.htm>\2" % (NIFCLOUD_DOC_BASE)
        else:
            replace = r"\1<%s/%s/%s.htm>\2" % (NIFCLOUD_DOC_BASE,
                                               self._service_name,
                                               operation_name)
        method_intro = section.get_section('method-intro')
        replaced_text = re.sub(
            r"([\s\S]+)<.+>(.+)$",
            replace,
            method_intro.getvalue().decode('utf8')
        ).replace('AWS', 'NIFCLOUD')
        method_intro.clear_text()
        method_intro.push_write(replaced_text)


service.ClientDocumenter = ClientDocumenter
github nifcloud / nifcloud-sdk-python / docs / source / conf.py View on Github external
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import os

from nifcloud import __version__
from nifcloud.docs import generate_docs
from nifcloud.session import get_session

generate_docs(os.path.dirname(os.path.abspath(__file__)), get_session())

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []

nifcloud

Data-driven NIFCLOUD SDK for Python

Apache-2.0
Latest version published 3 months ago

Package Health Score

64 / 100
Full package analysis

Similar packages