def get_weight(name, backend, socket='/var/run/haproxy.sock'):
 ha_conn = _get_conn(socket)
 ha_cmd = haproxy.cmds.getWeight(server=name, backend=backend)
 return ha_conn.sendCmd(ha_cmd)

def get_weight ( name , backend , socket = '/var/run/haproxy.sock' ) : ha_conn = _get_conn ( socket ) ha_cmd = haproxy . cmds . getWeight ( server = name , backend = backend ) return ha_conn . sendCmd ( ha_cmd )
get server weight name server name backend haproxy backend socket haproxy stats socket cli example: .