Exemple #1
0
 def sandesh_pi_handle_request(self, req):
     # Return the list of PR routers
     resp = sandesh.PhysicalInterfaceListResp(physical_interfaces=[])
     if req.name_or_uuid is None:
         for pi in PhysicalInterfaceDM.values():
             sandesh_pi = self.sandesh_pi_build(pi)
             resp.physical_interfaces.append(sandesh_pi)
     else:
         pi = PhysicalInterfaceDM.find_by_name_or_uuid(req.name_or_uuid)
         if pi:
             sandesh_pi = self.sandesh_pi_build(pi)
             resp.physical_interfaces.append(sandesh_pi)
     resp.response(req.context())
 def sandesh_pi_handle_request(self, req):
     # Return the list of PR routers
     resp = sandesh.PhysicalInterfaceListResp(physical_interfaces=[])
     if req.name_or_uuid is None:
         for pi in PhysicalInterfaceDM.values():
             sandesh_pi = self.sandesh_pi_build(pi)
             resp.physical_interfaces.append(sandesh_pi)
     else:
         pi = PhysicalInterfaceDM.find_by_name_or_uuid(req.name_or_uuid)
         if pi:
             sandesh_pi = self.sandesh_pi_build(pi)
             resp.physical_interfaces.append(sandesh_pi)
     resp.response(req.context())