openflow - opendaylight: Genius install flow in switch -
i using opendaylight / carbon , trying work genius wrapper. want install flow in switch based on mac address match incoming packet. instruction want install "goto" instruction. proceed follows:
flowentitybuilder flowentitybuilder = new flowentitybuilder(); flowentitybuilder.settableid(tableid) .setdpnid(dpnid) .setflowid(flowutils.createflowid().tostring()) .setflowname("gototable1"); matchinfo matchinfo = new matchethernetsource(macaddress); instructioninfo instructioninfo = new instructiongototable(tableid); flowentity flowentity = flowentitybuilder.addinstructioninfolist(instructioninfo).addmatchinfolist(matchinfo).build(); mdsalapimanager.installflow(dpnid,flowentity);
mu intention create flow entity , install using imdsalapimanager.installflow method.
here exception see:
java.lang.illegalargumentexception: node (urn:opendaylight:flow:inventory?revision=2013-08-19)ethernet-source missing mandatory descendant /(urn:opendaylight:flow:inventory?revision=2013-08-19)address
any debugging appreciated.
this how build goto instruction opendaylight :
gototablebuilder gttb = new gototablebuilder(); gttb.settableid(tablegoto); instruction gotoinstruction = new instructionbuilder() .setorder(1).setinstruction(new gototablecasebuilder() .setgototable(gttb.build()) .build()) .build();
you can use adjust code.
Comments
Post a Comment