huskar_api/api/instance.py
def post(self, application_name):
        """Creates an empty cluster.

        It is not necessary to create an empty cluster before placing content
        inside it. This API is intent on creating symbol clusters for linking.

        :form cluster: The name of creating cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: :mimetype:`application/x-www-form-urlencoded`
        :status 400: The cluster name has a bad format.
        :status 200: Success.
        """
        check_application_auth(application_name, Authority.WRITE)
        cluster_name = request.values['cluster'].strip()
        validate_fields(instance_schema, {
            'application': application_name,
            'cluster': cluster_name
        })
        check_cluster_name(cluster_name, application_name)

        with audit_log(self.CREATE_ACTION_TYPES[self.subdomain],
                       application_name=application_name,
                       cluster_name=cluster_name):
            self.facade.create_cluster(
                application_name, cluster_name, strict=True)
        return api_response()
Creates an empty cluster.

        It is not necessary to create an empty cluster before placing content
        inside it. This API is intent on creating symbol clusters for linking.

        :form cluster: The name of creating cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: :mimetype:`application/x-www-form-urlencoded`
        :status 400: The cluster name has a bad format.
        :status 200: Success.
        
Creates an empty cluster.
It is not necessary to create an empty cluster before placing content
inside it. This API is intent on creating symbol clusters for linking.
Creates an empty cluster . It is not necessary to create an empty cluster before placing content inside it . This API is intent on creating symbol clusters for linking .
def post(self, application_name):
        check_application_auth(application_name, Authority.WRITE)
        cluster_name = request.values['cluster'].strip()
        validate_fields(instance_schema, {
            'application': application_name,
            'cluster': cluster_name
        })
        check_cluster_name(cluster_name, application_name)
        with audit_log(self.CREATE_ACTION_TYPES[self.subdomain],
                       application_name=application_name,
                       cluster_name=cluster_name):
            self.facade.create_cluster(
                application_name, cluster_name, strict=True)
        return api_response()
def post ( self , application_name ) : check_application_auth ( application_name , Authority . WRITE ) cluster_name = request . values [ 'cluster' ] . strip ( ) validate_fields ( instance_schema , { 'application' : application_name , 'cluster' : cluster_name } ) check_cluster_name ( cluster_name , application_name ) with audit_log ( self . CREATE_ACTION_TYPES [ self . subdomain ] , application_name = application_name , cluster_name = cluster_name ) : self . facade . create_cluster ( application_name , cluster_name , strict = True ) return api_response ( )
Creates an empty cluster.
Creates an empty cluster .
"""Creates an empty cluster.

        It is not necessary to create an empty cluster before placing content
        inside it. This API is intent on creating symbol clusters for linking.

        :form cluster: The name of creating cluster.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :<header Content-Type: :mimetype:`application/x-www-form-urlencoded`
        :status 400: The cluster name has a bad format.
        :status 200: Success.
        """
self
application_name
form
The name of creating cluster.
The name of creating cluster .
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
<header
None
status
The cluster name has a bad format.
The cluster name has a bad format .
status
None