def do_action_flows(self, action, kwargs_list): # We force our own run_ofctl to keep OpenFlow version parameter for kw in kwargs_list: kw.setdefault('cookie', self._cookie) if action is 'mod' or action is 'del': kw['cookie'] = ovs_lib.check_cookie_mask(str(kw['cookie'])) flow_strs = [ovs_lib._build_flow_expr_str(kw, action) for kw in kwargs_list] self.run_ofctl('%s-flows' % action, ['-'], '\n'.join(flow_strs))
def do_action_flows(self, action, kwargs_list): # We force our own run_ofctl to keep OpenFlow version parameter for kw in kwargs_list: kw.setdefault('cookie', self._cookie) if action is 'mod' or action is 'del': kw['cookie'] = ovs_lib.check_cookie_mask(str(kw['cookie'])) flow_strs = [ ovs_lib._build_flow_expr_str(kw, action) for kw in kwargs_list ] self.run_ofctl('%s-flows' % action, ['-'], '\n'.join(flow_strs))
def do_action_flows(self, action, kwargs_list): # NOTE(tmorin): the OVSBridge code is excluding the 'del' # action from this step where a cookie # is added, but I think we need to keep it so that # an extension does not delete flows of another # extension for kw in kwargs_list: kw.setdefault('cookie', self._cookie) if action is 'mod' or action is 'del': kw['cookie'] = ovs_lib.check_cookie_mask(str(kw['cookie'])) self.bridge.do_action_flows(action, kwargs_list)
def do_action_flows(self, action, kwargs_list): # NOTE(tmorin): the OVSBridge code is excluding the 'del' # action from this step where a cookie # is added, but I think we need to keep it so that # an extension does not delete flows of another # extension for kw in kwargs_list: kw.setdefault('cookie', self._cookie) if action is 'mod' or action is 'del': kw['cookie'] = ovs_lib.check_cookie_mask(str(kw['cookie'])) self.bridge.do_action_flows(action, kwargs_list)