def taskDeleteReply(self, jsonMsg, SC): assert jsonMsg[TYPE] == 'taskDeleteReply' taskId = jsonMsg[TASK_ID] src = jsonMsg['src'] dst = jsonMsg['dst'] if not assertTaskInDict(taskId): self.logger.info("No such task") return # taskInstance = getTask(taskId) # taskInstance = Task(1) # domainId = jsonMsg[DOMAINID] # # allDeleteDomians = taskInstance.getDeleteDomains() # # assert domainId in allDeleteDomians # # taskInstance.removeDeleteDomain(domainId) # # if taskInstance.isCheckToDelete(): # allLabels = taskInstance.getAllMpls() # SC.LabelsPool.recycleLabels(allLabels) delTask(taskId) self.logger.info("Task %d deleted" % taskId) self.logger.info('link between ' + str(src) + ' and ' + str(dst) + ' has been deleted!')
def taskDeleteReply(self, jsonMsg, SC): assert jsonMsg[TYPE] == 'taskDeleteReply' taskId = jsonMsg[TASK_ID] if not assertTaskInDict(taskId): self.logger.info("No such task") return taskInstance = getTask(taskId) # taskInstance = Task(1) domainId = jsonMsg[DOMAINID] allDeleteDomians = taskInstance.getDeleteDomains() assert domainId in allDeleteDomians taskInstance.removeDeleteDomain(domainId) if taskInstance.isCheckToDelete(): allLabels = taskInstance.getAllMpls() SC.LabelsPool.recycleLabels(allLabels) delTask(taskId) self.logger.info("Task %d deleted" % taskId)
def taskDeleteReply(self, jsonMsg, SC): assert jsonMsg[TYPE] == 'taskDeleteReply' taskId = jsonMsg[TASK_ID] src = jsonMsg['src'] dst = jsonMsg['dst'] if not assertTaskInDict(taskId): self.logger.info("No such task") return # taskInstance = getTask(taskId) # taskInstance = Task(1) # domainId = jsonMsg[DOMAINID] # # allDeleteDomians = taskInstance.getDeleteDomains() # # assert domainId in allDeleteDomians # # taskInstance.removeDeleteDomain(domainId) # # if taskInstance.isCheckToDelete(): # allLabels = taskInstance.getAllMpls() # SC.LabelsPool.recycleLabels(allLabels) delTask(taskId) self.logger.info("Task %d deleted" % taskId) self.logger.info('link between '+str(src)+' and '+str(dst)+' has been deleted!')