def pub_ping(self, data, **kwargs): if (FV.xmlconn is None): self._log.exception("No xlmlrpc connection with Flowvisor detected") raise Exception("No xlmlrpc connection with Flowvisor detected") self.check_topo_change() #repeat on ping try: FV.log.debug("XMLRPC:ping (%s)" % (str(data))) return FV.xmlcall("ping", " " + str(data)) #this will return a PONG is everything alright except Exception, e: import traceback traceback.print_exc() raise e
def pub_ping(self, data, **kwargs): if (FV.xmlconn is None): self._log.exception( "No xlmlrpc connection with Flowvisor detected") raise Exception("No xlmlrpc connection with Flowvisor detected") self.check_topo_change() #repeat on ping try: FV.log.debug("XMLRPC:ping (%s)" % (str(data))) return FV.xmlcall( "ping", " " + str(data)) #this will return a PONG is everything alright except Exception, e: import traceback traceback.print_exc() raise e
def pub_get_switches(self, **kwargs): ''' Return the switches that the FlowVisor gives. Change to CH format. ''' complete_list = [] try: dpids = FV.getDeviceList() for d in dpids: FV.log.debug("XMLRPC:getDeviceInfo (%s)" % (d)) infos = [FV.xmlcall("getDeviceInfo", d) for d in dpids] #need to make it prettier :) switches = zip(dpids, infos) except Exception,e: import traceback traceback.print_exc() raise e
def pub_get_switches(self, **kwargs): ''' Return the switches that the FlowVisor gives. Change to CH format. ''' complete_list = [] try: dpids = FV.getDeviceList() for d in dpids: FV.log.debug("XMLRPC:getDeviceInfo (%s)" % (d)) infos = [FV.xmlcall("getDeviceInfo", d) for d in dpids] #need to make it prettier :) switches = zip(dpids, infos) except Exception, e: import traceback traceback.print_exc() raise e