Ejemplo n.º 1
0
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))
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
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))