def __init__(self, *args, **kwargs): super(DomainController, self).__init__(*args, **kwargs) self.domainId = self.CONF.domain_id self.name = 'domain_controller' self.domainWsgiIp = self.CONF.domain_wsgi_ip self.domainWsgiPort = self.CONF.domain_port self.topo = DomainTopo(name='Domain '+str(self.domainId)) self.dps = {} self.switches = [] self.sleep = 10 self.local_mac = ['10.108.93.100', '10.108.90.201'] self.TASK_LIST = {} self.LabelsPool = MplsLabelsPool() self.LabelsPool.initPool() self.deviceInfo = {} self.num = 0 self.taskId_match = {} self.border_table = [] self.arp_table = {} self.port_to_localmac = {} self.timesOfQos = 0 self.qosSwitch = [] self.completeTopo = None ############################################ self.edgePort = [] self.borderPeer = [] self.outDomainSwitch = {} self.shortestPath = {} # self.shortestPath = {(513,518):[513,515,518],(518,513):[518,515,513]} ##################################################### self.QoS_dict = {} self.superExist = self.CONF.super_exist if self.superExist: self.superWsgiIp = self.CONF.super_wsgi_ip self.superWsgiPort = self.CONF.super_wsgi_port self.superLastEcho = time.time() self.monitorThreadFlag = self.CONF.monitor_thread_flag # if self.monitorThreadFlag: # self.monitorThread = hub.spawn(self._monitor) self.lastCollect = {} self.keepAliveThread = hub.spawn(self._keepAlive) wsgi = kwargs['wsgi'] data = {} data[DOMAINCONTROLLER] = self data[DomainReplyController] = DomainReplyController() wsgi.register(DomainWsgiController, data)
def __init__(self, *args, **kwargs): super(DomainController, self).__init__(*args, **kwargs) self.domainId = self.CONF.domain_id self.domainWsgiIp = self.CONF.domain_wsgi_ip self.domainWsgiPort = self.CONF.domain_port self.topo = DomainTopo(name='Domain ' + str(self.domainId)) self.dps = {} self.switches = [] self.sleep = 2 self.TASK_LIST = {} self.deviceInfo = {} #gqz #shortestPath is a dict ,the key is a tuple of (in_dpid,in_port_no,out_dpid,out_port_no), # and the value is the shortestpath between them #edgePort is a list consist by tuples of (dpid,port_no),which line to a switch controlled by a neighboured-domainController #borderPeer is a list consist by tuples of (dpid,port_no),which Packet-in a arp packet. #outDomainSwitch is a dict ,the key is a tuple of (dpid,port_no),which in the edgePort, # and the value is a tuple of (dpid,port_no) which line to the key and is not the switch controlled by this DC self.edgePort = [] self.borderPeer = [] self.outDomainSwitch = {} self.shortestPath = {} #gqz self.QoS_dict = {} self.superExist = self.CONF.super_exist if self.superExist: self.superWsgiIp = self.CONF.super_wsgi_ip self.superWsgiPort = self.CONF.super_wsgi_port self.superLastEcho = time.time() self.monitorThreadFlag = self.CONF.monitor_thread_flag if self.monitorThreadFlag: self.monitorThread = hub.spawn(self._monitor) self.lastCollect = {} self.keepAliveThread = hub.spawn(self._keepAlive) wsgi = kwargs['wsgi'] data = {} data[DOMAINCONTROLLER] = self data[DomainReplyController] = DomainReplyController() wsgi.register(DomainWsgiController, data)
def __init__(self, *args, **kwargs): super(DomainController, self).__init__(*args, **kwargs) self.domainId = self.CONF.domain_id self.name = 'domain_controller' self.domainWsgiIp = self.CONF.domain_wsgi_ip self.domainWsgiPort = self.CONF.domain_port self.topo = DomainTopo(name='Domain ' + str(self.domainId)) self.dps = {} self.switches = [] self.sleep = 2 self.TASK_LIST = {} self.LabelsPool = MplsLabelsPool() self.LabelsPool.initPool() self.deviceInfo = {} self.edgePort = [] self.borderPeer = [] self.outDomainSwitch = {} self.shortestPath = {} #self.shortestPath = {(773,769):[773,770,769],(769,773):[769,770,773]} self.QoS_dict = {} self.superExist = self.CONF.super_exist if self.superExist: self.superWsgiIp = self.CONF.super_wsgi_ip self.superWsgiPort = self.CONF.super_wsgi_port self.superLastEcho = time.time() self.monitorThreadFlag = self.CONF.monitor_thread_flag if self.monitorThreadFlag: self.monitorThread = hub.spawn(self._monitor) self.lastCollect = {} self.keepAliveThread = hub.spawn(self._keepAlive) wsgi = kwargs['wsgi'] data = {} data[DOMAINCONTROLLER] = self data[DomainReplyController] = DomainReplyController() wsgi.register(DomainWsgiController, data)
def __init__(self, *args, **kwargs): super(DomainController, self).__init__(*args, **kwargs) self.domainId = self.CONF.domain_id self.domainWsgiIp = self.CONF.domain_wsgi_ip self.domainWsgiPort = self.CONF.wsapi_port self.topo = DomainTopo(name='Domain '+str(self.domainId)) self.dps = {} self.switches = [] self.sleep = 2 self.TASK_LIST = {} self.deviceInfo = {} self.QoS_dict = {} self.superExist = self.CONF.super_exist if self.superExist: self.superWsgiIp = self.CONF.super_wsgi_ip self.superWsgiPort = self.CONF.super_wsgi_port self.superLastEcho = time.time() self.monitorThreadFlag = self.CONF.monitor_thread_flag if self.monitorThreadFlag: self.monitorThread = hub.spawn(self._monitor) self.lastCollect = {} self.keepAliveThread = hub.spawn(self._keepAlive) wsgi = kwargs['wsgi'] data = {} data[DOMAINCONTROLLER] = self data[DomainReplyController] = DomainReplyController() wsgi.register(DomainWsgiController, data)