def get_hosts(self): rep = self.send_request(event.EventHostRequest(None)) return rep.hosts
def get_host(app, dpid=None): rep = app.send_request(event.EventHostRequest(dpid)) return rep.hosts