'Find the state of specific services. When pxname is not set, get all backends for a specific host.
Returns a list of dictionaries containing the status and weight for those services.'

def get_state_for(self, pxname, svname):

    data = self.execute('show    stat', 200, False).lstrip('#    ')
    r = csv.DictReader(data.splitlines())
    state = tuple(map((lambda d: {'status': d['status'], 'weight': d['weight']}), filter((lambda d: (((pxname is None) or (d['pxname'] == pxname)) and (d['svname'] == svname))), r)))
    return (state or None)
