def restart_app(id, restart=False, force=True):
 ret = {'restarted': None}
 if (not restart):
  ret['restarted'] = False
  return ret
 try:
  response = salt.utils.http.query('{0}/v2/apps/{1}/restart?force={2}'.format(_base_url(), _app_id(id), force), method='POST', decode_type='json', decode=True, header_dict={'Content-Type': 'application/json', 'Accept': 'application/json'})
  log.debug('restart response: %s', response)
  ret['restarted'] = True
  ret.update(response['dict'])
  return ret
 except Exception as ex:
  log.error('unable to restart marathon app: %s', ex.message)
  return {'exception': {'message': ex.message}}

def restart_app ( id , restart = False , force = True ) : ret = { 'restarted' : None } if ( not restart ) : ret [ 'restarted' ] = False return ret try : response = salt . utils . http . query ( '{0}/v2/apps/{1}/restart?force={2}' . format ( _base_url ( ) , _app_id ( id ) , force ) , method = 'POST' , decode_type = 'json' , decode = True , header_dict = { 'Content-Type' : 'application/json' , 'Accept' : 'application/json' } ) log . debug ( 'restart response: %s' , response ) ret [ 'restarted' ] = True ret . update ( response [ 'dict' ] ) return ret except Exception as ex : log . error ( 'unable to restart marathon app: %s' , ex . message ) return { 'exception' : { 'message' : ex . message } }
restart the current server configuration for the specified app .