Example #1
0
    def create_buckets(dp, config):
        #
        buckets = []
        #
        # print "@@@@@@@@@@@@@@@@@@@@@@"
        # print "buckets config: %s" % config
        # print "@@@@@@@@@@@@@@@@@@@@@@"
        #
        for entry in config:
            #
            print "entry: %s " % entry

            actions = Actions.create_actions(dp, entry["actions"])

            bucket = dp.ofproto_parser.OFPBucket(
                weight=Utils.to_int(entry["weight"]),
                watch_port=Utils.get_mod_port(dp, entry["watch_port"]),
                watch_group=Utils.get_mod_group(dp, entry["watch_group"]),
                actions=actions
                #entry[]
            )
            print "bucket: %s" % bucket
            buckets.append(bucket)
            print "buckets: %s" % buckets
        return buckets
Example #2
0
 def process_write(dp, config):
     print config
     type = dp.ofproto.OFPIT_WRITE_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type, actions)
Example #3
0
 def process_apply(dp, config):
     #
     type = dp.ofproto.OFPIT_APPLY_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type, actions)
Example #4
0
 def process_write(dp,config):
     print config
     type = dp.ofproto.OFPIT_WRITE_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type,actions)
Example #5
0
 def process_apply(dp,config):
     #
     type = dp.ofproto.OFPIT_APPLY_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type,actions)
Example #6
0
    def create_buckets(dp, config):
        #
        buckets = []
        #
        print "buckets config: %s" % config
        #
        for entry in config:
            #
            print "entry: %s " % entry

            actions = Actions.create_actions(dp, entry["actions"])

            bucket = dp.ofproto_parser.OFPBucket(
                weight=Utils.to_int(entry["weight"]),
                watch_port=Utils.get_mod_port(dp, entry["watch_port"]),
                watch_group=Utils.get_mod_group(dp, entry["watch_group"]),
                actions=actions
                # entry[]
            )
            print "bucket: %s" % bucket
            buckets.append(bucket)
            print "buckets: %s" % buckets
        return buckets
Example #7
0
 def process_clear(dp, config):
     type = dp.ofproto.OFPIT_CLEAR_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type, actions)
Example #8
0
 def process_clear(dp,config):
     type = dp.ofproto.OFPIT_CLEAR_ACTIONS
     #
     for entry in config:
         actions = Actions.create_actions(dp, entry["actions"])
     return dp.ofproto_parser.OFPInstructionActions(type,actions)