Bounce Traffic Server on the local node. Bouncing Traffic Server shuts down
    and immediately restarts the Traffic Server node.

    drain
        This option modifies the restart behavior such that traffic_server
        is not shut down until the number of active client connections
        drops to the number given by the
        proxy.config.restart.active_client_threshold configuration
        variable.

    .. code-block:: bash

        salt '*' trafficserver.bounce_local
        salt '*' trafficserver.bounce_local drain=True

def bounce_local(drain=False):
    '''
    Bounce Traffic Server on the local node. Bouncing Traffic Server shuts down
    and immediately restarts the Traffic Server node.

    drain
        This option modifies the restart behavior such that traffic_server
        is not shut down until the number of active client connections
        drops to the number given by the
        proxy.config.restart.active_client_threshold configuration
        variable.

    .. code-block:: bash

        salt '*' trafficserver.bounce_local
        salt '*' trafficserver.bounce_local drain=True
    '''
    if _TRAFFICCTL:
        cmd = _traffic_ctl('server', 'restart')
    else:
        cmd = _traffic_line('-b')

    if drain:
        cmd = cmd + ['--drain']

    return _subprocess(cmd)