def bring_up(backend, server): return utils.query_haproxy('enable server {0}/{1}'.format(backend, server))
def take_down(backend, server): return utils.query_haproxy('disable server {0}/{1}'.format( backend, server))
def get_stats(): stat_parser = utils.HAStatParser(utils.query_haproxy("show stat")) headers, rows = stat_parser.parse_to_object() return json.dumps({'headers': headers, 'rows': rows})
def take_down(backend, server): return utils.query_haproxy('disable server {0}/{1}'.format(backend, server))
def get_stats(): stat_parser = utils.HAStatParser(utils.query_haproxy("show stat")) headers, rows = stat_parser.parse_to_object() return json.dumps({'headers' : headers, 'rows' : rows})