huskar_api/api/service_route.py
def delete(self, application_name):
        """Discards a default route policy of specific application.

        :param application_name: The name of specific application.
        :form ezone: Optional. The ezone of default route. Default: ``overall``
        :form intent: Optional. The intent of default route. Default:
                      ``direct``
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 200: Operation success.
        """
        check_application_auth(application_name, Authority.WRITE)
        ezone = request.form.get('ezone') or OVERALL
        intent = request.form.get('intent') or ROUTE_DEFAULT_INTENT
        facade = RouteManagement(huskar_client, application_name, None)
        try:
            default_route = facade.discard_default_route(ezone, intent)
        except ValueError as e:
            # TODO: Use a better validator instead
            return api_response(
                status='InvalidArgument', message=first(e.args, '')), 400
        audit_log.emit(
            audit_log.types.DELETE_DEFAULT_ROUTE,
            application_name=application_name, ezone=ezone, intent=intent)
        return api_response({
            'default_route': default_route,
            'global_default_route': settings.ROUTE_DEFAULT_POLICY})
Discards a default route policy of specific application.

        :param application_name: The name of specific application.
        :form ezone: Optional. The ezone of default route. Default: ``overall``
        :form intent: Optional. The intent of default route. Default:
                      ``direct``
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 200: Operation success.
        
Discards a default route policy of specific application.
Discards a default route policy of specific application .
def delete(self, application_name):
        check_application_auth(application_name, Authority.WRITE)
        ezone = request.form.get('ezone') or OVERALL
        intent = request.form.get('intent') or ROUTE_DEFAULT_INTENT
        facade = RouteManagement(huskar_client, application_name, None)
        try:
            default_route = facade.discard_default_route(ezone, intent)
        except ValueError as e:
            return api_response(
                status='InvalidArgument', message=first(e.args, '')), 400
        audit_log.emit(
            audit_log.types.DELETE_DEFAULT_ROUTE,
            application_name=application_name, ezone=ezone, intent=intent)
        return api_response({
            'default_route': default_route,
            'global_default_route': settings.ROUTE_DEFAULT_POLICY})
def delete ( self , application_name ) : check_application_auth ( application_name , Authority . WRITE ) ezone = request . form . get ( 'ezone' ) or OVERALL intent = request . form . get ( 'intent' ) or ROUTE_DEFAULT_INTENT facade = RouteManagement ( huskar_client , application_name , None ) try : default_route = facade . discard_default_route ( ezone , intent ) except ValueError as e : return api_response ( status = 'InvalidArgument' , message = first ( e . args , '' ) ) , 400 audit_log . emit ( audit_log . types . DELETE_DEFAULT_ROUTE , application_name = application_name , ezone = ezone , intent = intent ) return api_response ( { 'default_route' : default_route , 'global_default_route' : settings . ROUTE_DEFAULT_POLICY } )
Discards a default route policy of specific application.
Discards a default route policy of specific application .
"""Discards a default route policy of specific application.

        :param application_name: The name of specific application.
        :form ezone: Optional. The ezone of default route. Default: ``overall``
        :form intent: Optional. The intent of default route. Default:
                      ``direct``
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 200: Operation success.
        """ # TODO: Use a better validator instead
self
application_name
The name of specific application.
The name of specific application .
form
Optional. The ezone of default route. Default: ``overall``
Optional . The ezone of default route . Default : ` ` overall ` `
form
Optional. The intent of default route. Default:
``direct``
Optional . The intent of default route . Default : ` ` direct ` `
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
status
None