def create_buckets(dp, config): LOG.debug('BUCKETS:') buckets = [] ''' Buckets config is a list ''' LOG.debug('buckets config: %s', config) for entry in config: LOG.debug('entry: %s ', entry) actions = Actions.create_actions(dp, entry['actions']) bucket = dp.ofproto_parser.OFPBucket( weight=int(entry['weight'], 0), watch_port=Utils.get_mod_port(dp, entry['watch_port']), watch_group=Utils.get_mod_group(dp, entry['watch_group']), actions=actions) LOG.debug('bucket: %s', bucket) buckets.append(bucket) LOG.debug('buckets: %s', buckets) return buckets
def create_buckets(dp, config): LOG.debug('BUCKETS:') buckets = [] ''' Buckets config is a list ''' LOG.debug('buckets config: %s', config) for entry in config: LOG.debug('entry: %s ', entry) actions = Actions.create_actions(dp, entry['actions']) bucket = dp.ofproto_parser.OFPBucket( weight = int(entry['weight'], 0), watch_port = Utils.get_mod_port(dp,entry['watch_port']), watch_group = Utils.get_mod_group(dp,entry['watch_group']), actions = actions ) LOG.debug('bucket: %s', bucket) buckets.append(bucket) LOG.debug('buckets: %s', buckets) return buckets
def process_clear(dp, config): act_type = dp.ofproto.OFPIT_CLEAR_ACTIONS for entry in config: actions = Actions.create_actions(dp, entry['actions']) return dp.ofproto_parser.OFPInstructionActions(act_type, actions)
def process_clear(dp,config): act_type = dp.ofproto.OFPIT_CLEAR_ACTIONS for entry in config: actions = Actions.create_actions(dp, entry['actions']) return dp.ofproto_parser.OFPInstructionActions(act_type, actions)