#NEWLINE# def bounce_local( name , drain = False ) : #NEWLINE# #INDENT# '\n    Bounce Traffic Server on the local node. Bouncing Traffic Server shuts down\n    and immediately restarts the Traffic Server node.\n\n    This option modifies the behavior of traffic_line -b and traffic_line -L\n    such that traffic_server is not shut down until the number of active client\n    connections drops to the number given by the\n    proxy.config.restart.active_client_threshold configuration variable.\n\n    .. code-block:: yaml\n\n        bounce_ats_local:\n          trafficserver.bounce_local\n\n        bounce_ats_local:\n          trafficserver.bounce_local\n            - drain: True\n    ' #NEWLINE# ret = { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'changes' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'result' : None , #NEWLINE# 'comment' : '' , #NEWLINE# #UNINDENT# } #NEWLINE# if __opts__ [ 'test' ] : #NEWLINE# #INDENT# ret [ 'comment' ] = 'Bouncing local node' #NEWLINE# return ret #NEWLINE# #UNINDENT# if drain : #NEWLINE# #INDENT# __salt__ [ 'trafficserver.bounce_local' ] ( drain = True ) #NEWLINE# ret [ 'result' ] = True #NEWLINE# ret [ 'comment' ] = 'Bounced local node with drain option' #NEWLINE# return ret #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# __salt__ [ 'trafficserver.bounce_local' ] ( ) #NEWLINE# ret [ 'result' ] = True #NEWLINE# ret [ 'comment' ] = 'Bounced local node' #NEWLINE# return drain