I just figured it out. I was looking through the Openflow Plugin code, and found in this file:
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertor.java This piece of code: final VlanId zeroVlan = new VlanId(0); VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder = new VlanIdBuilder(); vlanIdBuilder.setVlanIdPresent(false); vlanIdBuilder.setVlanId(zeroVlan); vlanMatchBuilder.setVlanId(vlanIdBuilder.build()); VLAN_MATCH_FALSE = vlanMatchBuilder.build(); VlanMatchBuilder vlanMatchBuilder2 = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder2 = new VlanIdBuilder(); vlanIdBuilder2.setVlanIdPresent(true); vlanIdBuilder2.setVlanId(zeroVlan); vlanMatchBuilder2.setVlanId(vlanIdBuilder2.build()); VLAN_MATCH_TRUE = vlanMatchBuilder2.build(); So, I tried the following match: final VlanId vlanId = new VlanId(vlan); VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder = new VlanIdBuilder(); vlanIdBuilder.setVlanIdPresent(true); vlanIdBuilder.setVlanId(vlanId); vlanMatchBuilder.setVlanId(vlanIdBuilder.build()); match.setVlanMatch(vlanMatchBuilder.build()); And now I can add SetVlanId and StripVlan Actions. Im hoping that matching on VlanId=0 is basically matching on any VlanId. Here are the 2 flows that I get: cookie=0xba5eba11, duration=4.454s, table=30, n_packets=0, n_bytes=0, priority=500,ip,vlan_tci=0x1000/0x1000,nw_dst=192.168.1.0/24 actions=load:0x5ad2a7aa->NXM_NX_REG1[],set_field:4196->vlan_vid,goto_table:40 cookie=0xba5eba11, duration=4.453s, table=90, n_packets=0, n_bytes=0, priority=700,vlan_tci=0x1000/0x1000 actions=pop_vlan,output:8 Thanks, *Brady Johnson* bjohn...@inocybe.ca <https://twitter.com/inocybetech> <http://www.inocybe.com/> <https://www.linkedin.com/company/2661537?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2661537%2Cidx%3A1-1-1%2CtarId%3A1441300264767%2Ctas%3Ainocybe> [image: Screenshot 2017-02-14 at 10.43.55 AM.png] <https://www.youtube.com/channel/UC9uUWABdPR0Je9Du_15FCkw> On Sat, Apr 14, 2018 at 7:38 PM, Brady Johnson <bjohn...@inocybe.ca> wrote: > That's right Ryan, this is Nitrogen-SR2. > > If nobody has experienced this, can somebody please point me to where the > Openflow Plugin VLAN validation code is? That is, there must be a Config > Data Store listener that validates the flows, and if there is something it > doesnt like, it wont write the flows to the Operational data store. I would > like to see what it considers as valid/invalid for flows with setVlanId and > popVlan actions. > > Regards, > > *Brady Johnson* > bjohn...@inocybe.ca > > <https://twitter.com/inocybetech> <http://www.inocybe.com/> > <https://www.linkedin.com/company/2661537?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2661537%2Cidx%3A1-1-1%2CtarId%3A1441300264767%2Ctas%3Ainocybe> > [image: > Screenshot 2017-02-14 at 10.43.55 AM.png] > <https://www.youtube.com/channel/UC9uUWABdPR0Je9Du_15FCkw> > > > > On Sat, Apr 14, 2018 at 7:02 PM, Ryan Goulding <ryandgould...@gmail.com> > wrote: > >> IIRC this is based off Nitrogen-SR2, so shouldn't be prone to the issues >> listed there. >> >> Thanks! >> >> Regards, >> >> Ryan Goulding >> >> On Sat, Apr 14, 2018 at 6:52 PM, M. Ranganathan <mra...@gmail.com> wrote: >> >>> >>> >>> Not sure if this would help ( I was trying something a little different >>> than you are ) but I had some issues creating set Vlan flows in Carbon >>> https://stackoverflow.com/questions/47610513/how-to-create-a >>> -set-vlan-flow >>> >>> I had much better luck with Nitrogen >>> >>> >>> >>> Ranga >>> >>> On Fri, Apr 13, 2018 at 5:42 PM, Brady Johnson <bjohn...@inocybe.ca> >>> wrote: >>> >>>> >>>> Hello, >>>> >>>> Im trying to write flows to pop-vlan or just simply set the vlan-id, >>>> but the flows arent being written to operational, nor the bridge. I tried >>>> doing an etherType match on VLAN (0x8100) but that doesnt help. >>>> >>>> The 2 use cases I have are for flows that ingress the bridge with VLAN >>>> already set are: >>>> >>>> 1) if VLAN present (could be lots of different vlan IDs), pop it. >>>> 2) if VLAN present set the VLAN id to a different one. >>>> >>>> Ive tried flows for both of these cases, and neither are written to >>>> Operational. Ideally there should be an 802.1Q TPID (Tag protocol ID) match >>>> field, where you could match on 0x8100, but I couldnt find anything like >>>> this. >>>> >>>> Regards, >>>> >>>> *Brady Johnson* >>>> bjohn...@inocybe.ca >>>> >>>> <https://twitter.com/inocybetech> <http://www.inocybe.com/> >>>> <https://www.linkedin.com/company/2661537?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2661537%2Cidx%3A1-1-1%2CtarId%3A1441300264767%2Ctas%3Ainocybe> >>>> [image: >>>> Screenshot 2017-02-14 at 10.43.55 AM.png] >>>> <https://www.youtube.com/channel/UC9uUWABdPR0Je9Du_15FCkw> >>>> >>>> >>>> >>>> _______________________________________________ >>>> openflowplugin-dev mailing list >>>> openflowplugin-dev@lists.opendaylight.org >>>> https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev >>>> >>>> >>> >>> >>> -- >>> M. Ranganathan >>> >>> >>> _______________________________________________ >>> openflowplugin-dev mailing list >>> openflowplugin-dev@lists.opendaylight.org >>> https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev >>> >>> >> >
_______________________________________________ openflowplugin-dev mailing list openflowplugin-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev