huskar_api/api/service_link.py
def post(self, application_name, cluster_name):
        """Links a cluster to another physical cluster.

        The ``write`` authority is required. See :ref:`application_auth` also.

        Once you configure a cluster A to link to B, the service instances of
        A will be hidden, the service instances of B will appear in cluster A.

        :param application_name: The name of application.
        :param cluster_name: The name of cluster.
        :form link: The name of target physical cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 400: The target cluster is empty.
        :status 200: The request is successful.
        """
        check_application_auth(application_name, Authority.WRITE)
        check_cluster_name(cluster_name, application_name)
        link = request.form['link'].strip()

        if not link or link == cluster_name:
            abort(400, 'bad link parameter')

        with audit_log(audit_log.types.ASSIGN_CLUSTER_LINK,
                       application_name=application_name,
                       cluster_name=cluster_name,
                       physical_name=link):
            ServiceLink.set_link(application_name, cluster_name, link)

        return api_response()
Links a cluster to another physical cluster.

        The ``write`` authority is required. See :ref:`application_auth` also.

        Once you configure a cluster A to link to B, the service instances of
        A will be hidden, the service instances of B will appear in cluster A.

        :param application_name: The name of application.
        :param cluster_name: The name of cluster.
        :form link: The name of target physical cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 400: The target cluster is empty.
        :status 200: The request is successful.
        
Links a cluster to another physical cluster.
The ``write`` authority is required.

Once you configure a cluster A to link to B, the service instances of
A will be hidden, the service instances of B will appear in cluster A.
Links a cluster to another physical cluster . The ` ` write ` ` authority is required . Once you configure a cluster A to link to B the service instances of A will be hidden the service instances of B will appear in cluster A .
def post(self, application_name, cluster_name):
        check_application_auth(application_name, Authority.WRITE)
        check_cluster_name(cluster_name, application_name)
        link = request.form['link'].strip()
        if not link or link == cluster_name:
            abort(400, 'bad link parameter')
        with audit_log(audit_log.types.ASSIGN_CLUSTER_LINK,
                       application_name=application_name,
                       cluster_name=cluster_name,
                       physical_name=link):
            ServiceLink.set_link(application_name, cluster_name, link)
        return api_response()
def post ( self , application_name , cluster_name ) : check_application_auth ( application_name , Authority . WRITE ) check_cluster_name ( cluster_name , application_name ) link = request . form [ 'link' ] . strip ( ) if not link or link == cluster_name : abort ( 400 , 'bad link parameter' ) with audit_log ( audit_log . types . ASSIGN_CLUSTER_LINK , application_name = application_name , cluster_name = cluster_name , physical_name = link ) : ServiceLink . set_link ( application_name , cluster_name , link ) return api_response ( )
Links a cluster to another physical cluster.
Links a cluster to another physical cluster .
"""Links a cluster to another physical cluster.

        The ``write`` authority is required. See :ref:`application_auth` also.

        Once you configure a cluster A to link to B, the service instances of
        A will be hidden, the service instances of B will appear in cluster A.

        :param application_name: The name of application.
        :param cluster_name: The name of cluster.
        :form link: The name of target physical cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 400: The target cluster is empty.
        :status 200: The request is successful.
        """
self
application_name
The name of application.
The name of application .
cluster_name
The name of cluster.
The name of cluster .
form
The name of target physical cluster.
The name of target physical cluster .
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
status
The target cluster is empty.
The target cluster is empty .
status
The request is successful.
The request is successful .