def actionTransitionRule(rule): Globals.INSTALLLOG.write("***Transition Rule: " + str(rule) + '\n') (flow, defaultActions, rewriteActions) = IPs.get_controller_dstrule(ipstr_to_int(rule['ip']), rule['wild'], Globals.VIP) Multipath.install_controller_flow(flow, openflow.OFP_FLOW_PERMANENT, openflow.OFP_FLOW_PERMANENT, defaultActions, None, openflow.OFP_DEFAULT_PRIORITY, 0, None, rule['replica'], rewriteActions) Globals.COMPONENT.post_callback(Globals.HARD_TIMEOUT, lambda: hardTimeoutHandler(rule))
def installRuleToController(self, rule): Globals.RULESLOG.write('Installed CONTROLLER Rule ' + self.ruleToString(rule) + '\n') (flow, defaultActions, rewriteActions) = IPs.get_controller_dstrule(rule['IP'], rule['NumWild'], Globals.VIP) self.Multipath.install_controller_flow(flow, Globals.CACHE_TIMEOUT, openflow.OFP_FLOW_PERMANENT, defaultActions, None, openflow.OFP_DEFAULT_PRIORITY, 0, None, rule['Replica'], rewriteActions)
def installRuleToController(self, rule): Globals.RULESLOG.write('Installed CONTROLLER Rule ' + self.ruleToString(rule) + '\n') (flow, defaultActions, rewriteActions) = IPs.get_controller_dstrule(rule['IP'], rule['NumWild'], Globals.VIP) self.Multipath.install_controller_flow(flow, Globals.CACHE_TIMEOUT, openflow.OFP_FLOW_PERMANENT, defaultActions, None, openflow.OFP_DEFAULT_PRIORITY, 0, None, rule['Replica'], rewriteActions)
def actionTransitionRule(rule): Globals.INSTALLLOG.write("***Transition Rule: " + str(rule) + '\n') (flow, defaultActions, rewriteActions) = IPs.get_controller_dstrule(ipstr_to_int(rule['ip']), rule['wild'], Globals.VIP) Multipath.install_controller_flow(flow, openflow.OFP_FLOW_PERMANENT, openflow.OFP_FLOW_PERMANENT, defaultActions, None, openflow.OFP_DEFAULT_PRIORITY, 0, None, rule['replica'], rewriteActions) Globals.COMPONENT.post_callback(Globals.HARD_TIMEOUT, lambda : hardTimeoutHandler(rule))