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;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.arbitrator.reconcile.service.rev180227.GetActiveBundleOutput;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
return flowRef.getValue().firstKeyOf(Flow.class).getId().getValue();
}
- public static short getTableId(final FlowTableRef flowTableRef) {
+ public static Uint8 getTableId(final FlowTableRef flowTableRef) {
return flowTableRef.getValue().firstKeyOf(Table.class).getId();
}
return new BigInteger(dpId);
}
- public static Long isFlowDependentOnGroup(final Flow flow) {
+ public static Uint32 isFlowDependentOnGroup(final Flow flow) {
LOG.debug("Check if flow {} is dependent on group", flow);
if (flow.getInstructions() != null) {
List<Instruction> instructions = flow.getInstructions().getInstruction();
.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()
}
public static InstanceIdentifier<Group> buildGroupInstanceIdentifier(
- final InstanceIdentifier<FlowCapableNode> nodeIdent, final Long groupId) {
+ final InstanceIdentifier<FlowCapableNode> nodeIdent, final Uint32 groupId) {
NodeId nodeId = getNodeIdFromNodeIdentifier(nodeIdent);
InstanceIdentifier<Group> groupInstanceId = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, new NodeKey(nodeId)).augmentation(FlowCapableNode.class)
}
public static boolean isGroupExistsOnDevice(final InstanceIdentifier<FlowCapableNode> nodeIdent,
- final Long groupId, final ForwardingRulesManager provider) {
+ final Uint32 groupId, final ForwardingRulesManager provider) {
NodeId nodeId = getNodeIdFromNodeIdentifier(nodeIdent);
return provider.getDevicesGroupRegistry().isGroupPresent(nodeId, groupId);
}