import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCase;
public enum ActionType {
APPLY_ACTION(ApplyActionsCase.class),
- GROUP_ACTION(GroupActionCase.class);
+ GROUP_ACTION(GroupActionCase.class),
+ WRITE_ACTION(WriteActionsCase.class);
private Class<?> actionType;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
import org.opendaylight.openflowplugin.applications.frm.FlowNodeReconciliation;
import org.opendaylight.openflowplugin.applications.frm.ForwardingRulesManager;
+import org.opendaylight.openflowplugin.applications.frm.util.FrmUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.StaleGroup;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.StaleGroupKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId;
@Override
public ListenableFuture<Boolean> reconcileConfiguration(InstanceIdentifier<FlowCapableNode> connectedNode) {
LOG.info("Triggering reconciliation for device {}", connectedNode.firstKeyOf(Node.class));
+ // Clearing the group registry cache for the connected node if exists
+ NodeId nodeId = FrmUtil.getNodeIdFromNodeIdentifier(connectedNode);
+ provider.getDevicesGroupRegistry().clearNodeGroups(nodeId);
if (provider.isStaleMarkingEnabled()) {
LOG.info("Stale-Marking is ENABLED and proceeding with deletion of " + "stale-marked entities on switch {}",
connectedNode.toString());
public ListenableFuture<Boolean> startReconciliation(DeviceInfo node) {
InstanceIdentifier<FlowCapableNode> connectedNode = node.getNodeInstanceIdentifier()
.augmentation(FlowCapableNode.class);
- // Clearing the group registry cache for the connected node if exists
- provider.getDevicesGroupRegistry().clearNodeGroups(node.getNodeId());
return futureMap.computeIfAbsent(node, future -> reconcileConfiguration(connectedNode));
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowTableRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.WriteActionsCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
.equals(ActionType.APPLY_ACTION.getActionType())) {
actions = ((ApplyActionsCase) instruction.getInstruction())
.getApplyActions().getAction();
+ } else if (instruction.getInstruction().implementedInterface()
+ .equals(ActionType.WRITE_ACTION.getActionType())) {
+ actions = ((WriteActionsCase)instruction.getInstruction())
+ .getWriteActions().getAction();
}
for (Action action : actions) {
if (action.getAction().implementedInterface()