+ if(ifType.isInstance(L2vlan.class)) {
+ IfL2vlan vlanIface = iface.getAugmentation(IfL2vlan.class);
+ long vlanVid = vlanIface.getVlanId();
+ LOG.trace("L2Vlan: {}",vlanIface);
+ if (vlanVid != 0) {
+ listActionInfo.add(new ActionInfo(ActionType.push_vlan, new String[] {}));
+ listActionInfo.add(new ActionInfo(ActionType.set_field_vlan_vid,
+ new String[] { Long.toString(vlanVid) }));
+ }
+ listActionInfo.add(new ActionInfo(ActionType.output, new String[] { Long.toString(portNo)}));
+
+ } else if (ifType.isInstance(L3tunnel.class)) {
+ //TODO: Handle different tunnel types
+ IfL3tunnel ifL3Tunnel = iface.getAugmentation(IfL3tunnel.class);
+ Class<? extends TunnelTypeBase> tunnType = ifL3Tunnel.getTunnelType();
+ LOG.trace("L3Tunnel: {}",ifL3Tunnel);
+ //TODO: check switch_type and configure accordingly
+ listActionInfo.add(new ActionInfo(ActionType.output, new String[] { Long.toString(portNo)}));
+
+ } else if (ifType.isInstance(StackedVlan.class)) {
+ IfStackedVlan ifStackedVlan = iface.getAugmentation(IfStackedVlan.class);
+ LOG.trace("StackedVlan: {}",ifStackedVlan);
+ // TBD
+ } else if (ifType.isInstance(Mpls.class)) {
+ IfMpls ifMpls = iface.getAugmentation(IfMpls.class);
+ LOG.trace("Mpls: {}",ifMpls);
+ // TBD
+ }
+ }
+ return listActionInfo;