Hi,
On Thu, 28 Nov 2013 23:58:45 -0800
Sameer Katti <ska...@usc.edu> wrote:
> I am trying to create a group using the example mentioned at:-
> http://ryu.readthedocs.org/en/latest/ofproto_v1_2_ref.html#ryu.ofproto.ofproto_v1_2_parser.OFPGroupMod
>
> But When I send the request to the switch I get the following error:-
Hmm, I can't reproduce this error. The example code works for me (I've
attached the code). Can you send your code?
from ryu.controller import handler
from ryu.controller import dpset
from ryu.controller import ofp_event
from ryu.ofproto import ofproto_v1_2
from ryu.ofproto import ofproto_v1_2_parser
from ryu.base import app_manager
from ryu.ofproto.ofproto_parser import MsgBase, msg_pack_into, msg_str_attr
class OF12(app_manager.RyuApp):
OFP_VERSIONS = [ofproto_v1_2.OFP_VERSION]
_CONTEXTS = {
'dpset': dpset.DPSet,
}
def __init__(self, *args, **kwargs):
super(OF12, self).__init__(*args, **kwargs)
def add_actions(self, dp, match, inst, table_id=0):
m = dp.ofproto_parser.OFPFlowMod(datapath=dp, table_id=table_id,
match=match, instructions=inst)
dp.send_msg(m)
def send_group_mod(self, datapath):
ofp = datapath.ofproto
ofp_parser = datapath.ofproto_parser
port = 1
max_len = 2000
actions = [ofp_parser.OFPActionOutput(port, max_len)]
weight = 100
watch_port = 0
watch_group = 0
buckets = [ofp_parser.OFPBucket(weight, watch_port, watch_group,
actions)]
group_id = 1
req = ofp_parser.OFPGroupMod(datapath, ofp.OFPFC_ADD,
ofp.OFPGT_SELECT, group_id, buckets)
datapath.send_msg(req)
@handler.set_ev_cls(dpset.EventDP, dpset.DPSET_EV_DISPATCHER)
def handler_datapath(self, ev):
if ev.enter:
print "send group mod"
self.send_group_mod(ev.dp)
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel