huskar_api/api/infra_config.py
def patch(self, application_name, infra_type, infra_name):
        """Partially update existing infrastructures in specified application.

        The input schema looks like(for example for redis)::

            {
                "url": "sam+redis://redis.foobar/overall",
                "max_pool_size": 100,
                "connect_timeout_ms": 5,
                ...
            }

        :param application_name: The application which uses infrastructure.
        :param infra_type: ``database``, ``redis`` or ``amqp``.
        :param infra_name: The unique code-reference name of infrastructure.
        :query scope_type: ``idcs`` or ``clusters``.
        :query scope_name: The ezone id or cluster name.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: ``application/json``
        :status 200: The same as ``GET``.
        """
        with self._update(
                application_name, request, infra_type, infra_name) as args:
            application_name, infra_info, scope_type, scope_name, value = args
            scope_infra_content = infra_info.list_by_infra_name(infra_name)
            scope_content = (infra[:2] for infra in scope_infra_content)
            if (scope_type, scope_name) not in scope_content:
                abort(400, "%s doesn't exist" % infra_name)
            infra_info.update_by_name(
                infra_name, scope_type, scope_name, value)

        infra_config = infra_info.list_by_infra_name(infra_name)
        return api_response({'infra_config': dump_infra_config(infra_config)})
Partially update existing infrastructures in specified application.

        The input schema looks like(for example for redis)::

            {
                "url": "sam+redis://redis.foobar/overall",
                "max_pool_size": 100,
                "connect_timeout_ms": 5,
                ...
            }

        :param application_name: The application which uses infrastructure.
        :param infra_type: ``database``, ``redis`` or ``amqp``.
        :param infra_name: The unique code-reference name of infrastructure.
        :query scope_type: ``idcs`` or ``clusters``.
        :query scope_name: The ezone id or cluster name.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: ``application/json``
        :status 200: The same as ``GET``.
        
Partially update existing infrastructures in specified application.
The input schema looks like(for example for redis):.


Partially update existing infrastructures in specified application . The input schema looks like ( for example for redis ) : .
def patch(self, application_name, infra_type, infra_name):
        with self._update(
                application_name, request, infra_type, infra_name) as args:
            application_name, infra_info, scope_type, scope_name, value = args
            scope_infra_content = infra_info.list_by_infra_name(infra_name)
            scope_content = (infra[:2] for infra in scope_infra_content)
            if (scope_type, scope_name) not in scope_content:
                abort(400, "%s doesn't exist" % infra_name)
            infra_info.update_by_name(
                infra_name, scope_type, scope_name, value)
        infra_config = infra_info.list_by_infra_name(infra_name)
        return api_response({'infra_config': dump_infra_config(infra_config)})
def patch ( self , application_name , infra_type , infra_name ) : with self . _update ( application_name , request , infra_type , infra_name ) as args : application_name , infra_info , scope_type , scope_name , value = args scope_infra_content = infra_info . list_by_infra_name ( infra_name ) scope_content = ( infra [ : 2 ] for infra in scope_infra_content ) if ( scope_type , scope_name ) not in scope_content : abort ( 400 , "%s doesn't exist" % infra_name ) infra_info . update_by_name ( infra_name , scope_type , scope_name , value ) infra_config = infra_info . list_by_infra_name ( infra_name ) return api_response ( { 'infra_config' : dump_infra_config ( infra_config ) } )
Partially update existing infrastructures in specified application.
Partially update existing infrastructures in specified application .
"""Partially update existing infrastructures in specified application.

        The input schema looks like(for example for redis)::

            {
                "url": "sam+redis://redis.foobar/overall",
                "max_pool_size": 100,
                "connect_timeout_ms": 5,
                ...
            }

        :param application_name: The application which uses infrastructure.
        :param infra_type: ``database``, ``redis`` or ``amqp``.
        :param infra_name: The unique code-reference name of infrastructure.
        :query scope_type: ``idcs`` or ``clusters``.
        :query scope_name: The ezone id or cluster name.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: ``application/json``
        :status 200: The same as ``GET``.
        """
self
application_name
The application which uses infrastructure.
The application which uses infrastructure .
infra_type
None
infra_name
The unique code-reference name of infrastructure.
The unique code - reference name of infrastructure .
query
None
query
The ezone id or cluster name.
The ezone id or cluster name .
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
<header
None
status
The same as ``GET``.
The same as ` ` GET ` ` .