connectedNode.toString());
reconciliationPreProcess(connectedNode);
}
- LOG.debug("Bundle based reconciliation status : {}",
- provider.isBundleBasedReconciliationEnabled() ? "Enable" : "Disable");
if (provider.isBundleBasedReconciliationEnabled()) {
BundleBasedReconciliationTask bundleBasedReconTask = new BundleBasedReconciliationTask(connectedNode);
return JdkFutureAdapters.listenInPoolThread(executor.submit(bundleBasedReconTask));
Optional<FlowCapableNode> flowNode = Optional.absent();
BundleId bundleIdValue = new BundleId(BUNDLE_ID.getAndIncrement());
BigInteger dpnId = getDpnIdFromNodeName(node);
- LOG.debug("Triggering bundle based reconciliation for device :{}", dpnId);
+ LOG.info("Triggering bundle based reconciliation for device : {}", dpnId);
ReadOnlyTransaction trans = provider.getReadTranaction();
try {
flowNode = trans.read(LogicalDatastoreType.CONFIGURATION, nodeIdentity).get();
LOG.debug("FlowNode present for Datapath ID {}", dpnId);
final NodeRef nodeRef = new NodeRef(nodeIdentity.firstIdentifierOf(Node.class));
+ final ControlBundleInput closeBundleInput = new ControlBundleInputBuilder().setNode(nodeRef)
+ .setBundleId(bundleIdValue).setFlags(BUNDLE_FLAGS)
+ .setType(BundleControlType.ONFBCTCLOSEREQUEST).build();
+
final ControlBundleInput openBundleInput = new ControlBundleInputBuilder().setNode(nodeRef)
.setBundleId(bundleIdValue).setFlags(BUNDLE_FLAGS).setType(BundleControlType.ONFBCTOPENREQUEST)
.build();
.setNode(nodeRef).setBundleId(bundleIdValue).setFlags(BUNDLE_FLAGS)
.setMessages(createMessages(nodeRef, flowNode)).build();
- ListenableFuture<RpcResult<ControlBundleOutput>> openBundle
- = salBundleService.controlBundle(openBundleInput);
+ /* Close previously opened bundle on the openflow switch if any */
+ ListenableFuture<RpcResult<ControlBundleOutput>> closeBundle
+ = salBundleService.controlBundle(closeBundleInput);
- ListenableFuture<RpcResult<AddBundleMessagesOutput>> addBundleMessagesFuture = Futures
- .transformAsync(JdkFutureAdapters.listenInPoolThread(openBundle), rpcResult -> {
+ /* Open a new bundle on the switch */
+ ListenableFuture<RpcResult<ControlBundleOutput>> openBundle =
+ Futures.transformAsync(closeBundle,
+ rpcResult -> salBundleService.controlBundle(openBundleInput),
+ MoreExecutors.directExecutor());
+
+ /* Push groups and flows via bundle add messages */
+ ListenableFuture<RpcResult<AddBundleMessagesOutput>> addBundleMessagesFuture
+ = Futures.transformAsync(openBundle, rpcResult -> {
if (rpcResult.isSuccessful()) {
- return JdkFutureAdapters
- .listenInPoolThread(salBundleService.addBundleMessages(addBundleMessagesInput));
+ return salBundleService.addBundleMessages(addBundleMessagesInput);
}
return Futures.immediateFuture(null);
}, MoreExecutors.directExecutor());
+
+ /* Commit the bundle on the openflow switch */
ListenableFuture<RpcResult<ControlBundleOutput>> commitBundleFuture
= Futures.transformAsync(addBundleMessagesFuture, rpcResult -> {
if (rpcResult.isSuccessful()) {
- return JdkFutureAdapters
- .listenInPoolThread(salBundleService.controlBundle(commitBundleInput));
+ return salBundleService.controlBundle(commitBundleInput);
}
return Futures.immediateFuture(null);
}, MoreExecutors.directExecutor());
InstanceIdentifier<NodeConnector> srcInstanceId = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, new NodeKey(srcNodeId))
.child(NodeConnector.class, new NodeConnectorKey(srcNodeConnectorId))
- .toInstance();
+ .build();
nodeConnectorRef = new NodeConnectorRef(srcInstanceId);
} catch (Exception e) {
LOG.debug("Caught exception while parsing out lldp optional and custom fields", e);
private static FlowMods readFlowModAddMatchFromField(ByteBuf message, short numBits) {
FlowModAddMatchFromFieldBuilder builder = new FlowModAddMatchFromFieldBuilder();
- builder.setSrcField((long) message.readInt());
+ builder.setSrcField(message.readUnsignedInt());
builder.setSrcOfs((int) message.readShort());
- builder.setDstField((long) message.readInt());
+ builder.setDstField(message.readUnsignedInt());
builder.setDstOfs((int) message.readShort());
builder.setFlowModNumBits((int) numBits);
length -= FROM_FIELD_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
private static FlowMods readFlowModAddMatchFromValue(ByteBuf message, short numBits) {
FlowModAddMatchFromValueBuilder builder = new FlowModAddMatchFromValueBuilder();
builder.setValue(message.readUnsignedShort());
- builder.setSrcField((long) message.readInt());
+ builder.setSrcField(message.readUnsignedInt());
builder.setSrcOfs((int) message.readShort());
builder.setFlowModNumBits((int) numBits);
length -= FROM_VALUE_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
private static FlowMods readFlowModCopyFromField(ByteBuf message, short numBits) {
FlowModCopyFieldIntoFieldBuilder builder = new FlowModCopyFieldIntoFieldBuilder();
- builder.setSrcField((long) message.readInt());
+ builder.setSrcField(message.readUnsignedInt());
builder.setSrcOfs((int) message.readShort());
- builder.setDstField((long) message.readInt());
+ builder.setDstField(message.readUnsignedInt());
builder.setDstOfs((int) message.readShort());
builder.setFlowModNumBits((int) numBits);
length -= FROM_FIELD_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
private static FlowMods readFlowModCopyFromValue(ByteBuf message, short numBits) {
FlowModCopyValueIntoFieldBuilder builder = new FlowModCopyValueIntoFieldBuilder();
builder.setValue(message.readUnsignedShort());
- builder.setDstField((long) message.readInt());
+ builder.setDstField(message.readUnsignedInt());
builder.setDstOfs((int) message.readShort());
builder.setFlowModNumBits((int) numBits);
length -= FROM_VALUE_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
private static FlowMods readFlowToPort(ByteBuf message, short numBits) {
FlowModOutputToPortBuilder builder = new FlowModOutputToPortBuilder();
- builder.setSrcField((long) message.readInt());
+ builder.setSrcField(message.readUnsignedInt());
builder.setSrcOfs((int) message.readShort());
builder.setFlowModNumBits((int) numBits);
length -= TO_PORT_LENGTH - EncodeConstants.SIZE_OF_SHORT_IN_BYTES;
*/
@Nonnull
public static byte[] getBits(final byte[] data, final int startOffset, final int numBits) throws BufferException {
- int startByteOffset = 0;
+ int startByteOffset;
int extranumBits = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
final int extraOffsetBits = startOffset % NetUtils.NUM_BITS_IN_A_BYTE;
int numBytes = numBits % NetUtils.NUM_BITS_IN_A_BYTE != 0 ? 1 + numBits / NetUtils.NUM_BITS_IN_A_BYTE
public static long toNumber(final byte[] array) {
long ret = 0;
long length = array.length;
- int value = 0;
+ int value;
for (int i = 0; i < length; i++) {
value = array[i];
if (value < 0) {
int bitsRest = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
int startOffset = array.length - length;
long ret = 0;
- int value = 0;
+ int value;
value = array[startOffset - 1] & getLSBMask(bitsRest);
value = array[startOffset - 1] < 0 ? array[startOffset - 1] + 256 : array[startOffset - 1];
*/
public static byte[] toByteArray(final Number input) {
Class<? extends Number> dataType = input.getClass();
- short size = 0;
+ short size;
long longValue = input.longValue();
if (dataType == Byte.class || dataType == byte.class) {
*/
public static byte[] toByteArray(final Number input, final int numBits) {
Class<? extends Number> dataType = input.getClass();
- short size = 0;
+ short size;
long longValue = input.longValue();
if (dataType == Short.class) {
}
if (bytes[0] == 0 && dataType == Long.class || bytes[0] == 0 && dataType == Integer.class) {
- int index = 0;
+ int index;
for (index = 0; index < length; ++index) {
if (bytes[index] != 0) {
bytes[0] = bytes[index];
* @return byte[]
*/
public static byte[] shiftBitsToMSB(final byte[] inputBytes, final int numBits) {
- int numBitstoShiftBy = 0;
+ int numBitstoShiftBy;
int leadZeroesMSB = 8;
- int numEndRestBits = 0;
+ int numEndRestBits;
int size = inputBytes.length;
byte[] shiftedBytes = new byte[size];
int numBytes = inputBytes.length;
int numBitstoShift = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
byte[] shiftedBytes = new byte[numBytes];
- int inputLsb = 0;
- int inputMsb = 0;
+ int inputLsb;
+ int inputMsb;
if (numBitstoShift == 0) {
return inputBytes;
int extraOffsetBits = startOffset % NetUtils.NUM_BITS_IN_A_BYTE;
int extranumBits = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
int restBits = numBits % NetUtils.NUM_BITS_IN_A_BYTE;
- int inputMSBbits = 0;
+ int inputMSBbits;
int inputLSBbits = 0;
if (numBits == 0) {
}
CustomTLVKey other = (CustomTLVKey) obj;
- if (oui != other.oui) {
- return false;
- }
-
- if (subtype != other.subtype) {
- return false;
- }
-
- return true;
+ return oui == other.oui && subtype == other.subtype;
}
}
CISCOQINQ("Cisco QINQ", 0x9200); // Cisco non-standard QinQ
private static final String REGEX_NUMBER_STRING = "^[0-9]+$";
- private String description;
- private int number;
+ private final String description;
+ private final int number;
EtherTypes(final String description, final int number) {
this.description = description;
return false;
}
EthernetAddress other = (EthernetAddress) obj;
- if (!Arrays.equals(macAddress, other.macAddress)) {
- return false;
- }
- return true;
+ return Arrays.equals(macAddress, other.macAddress);
}
@Override
}
public static long stringToLong(final String values) {
- long value = new BigInteger(values.replaceAll(":", ""), 16).longValue();
- return value;
+ return new BigInteger(values.replaceAll(":", ""), 16).longValue();
}
/**
/**
* Returns the TLV byte type.
*
- * @param String description of the type of TLV
+ * @param typeDesc description of the type of TLV
* @return byte type of TLV
*/
private byte getType(final String typeDesc) {
- if (typeDesc.equals(CHASSISID)) {
- return LLDPTLV.TLVType.ChassisID.getValue();
- } else if (typeDesc.equals(PORTID)) {
- return LLDPTLV.TLVType.PortID.getValue();
- } else if (typeDesc.equals(TTL)) {
- return LLDPTLV.TLVType.TTL.getValue();
- } else if (typeDesc.equals(SYSTEMNAMEID)) {
- return LLDPTLV.TLVType.SystemName.getValue();
- } else {
- return LLDPTLV.TLVType.Unknown.getValue();
+ switch (typeDesc) {
+ case CHASSISID:
+ return LLDPTLV.TLVType.ChassisID.getValue();
+ case PORTID:
+ return LLDPTLV.TLVType.PortID.getValue();
+ case TTL:
+ return LLDPTLV.TLVType.TTL.getValue();
+ case SYSTEMNAMEID:
+ return LLDPTLV.TLVType.SystemName.getValue();
+ default:
+ return LLDPTLV.TLVType.Unknown.getValue();
}
}
private LLDPTLV getFromTLVs(final Byte type) {
- LLDPTLV tlv = null;
+ LLDPTLV tlv;
tlv = mandatoryTLVs.get(type);
if (tlv == null) {
tlv = optionalTLVs.get(type);
int lldpSize = size; // LLDP size
if (LOG.isTraceEnabled()) {
- LOG.trace("LLDP: {} (offset {} bitsize {})", new Object[] { HexEncode.bytesToHexString(data),
- lldpOffset, lldpSize });
+ LOG.trace("LLDP: {} (offset {} bitsize {})", HexEncode.bytesToHexString(data), lldpOffset, lldpSize);
}
/*
* Deserialize the TLVs until we reach the end of the packet
(byte) 4), SystemName((byte) 5), SystemDesc((byte) 6), Custom(
(byte) 127);
- private byte value;
+ private final byte value;
TLVType(final byte value) {
this.value = value;
*/
public int getLength() {
return (int) BitBufferHelper.toNumber(fieldValues.get(LENGTH),
- FIELD_COORDINATES.get(LENGTH).getRight().intValue());
+ FIELD_COORDINATES.get(LENGTH).getRight());
}
/**
public int getfieldnumBits(final String fieldName) {
if (fieldName.equals(VALUE)) {
return NetUtils.NUM_BITS_IN_A_BYTE * BitBufferHelper.getShort(
- fieldValues.get(LENGTH), FIELD_COORDINATES.get(LENGTH)
- .getRight().intValue());
+ fieldValues.get(LENGTH), FIELD_COORDINATES.get(LENGTH).getRight());
}
return FIELD_COORDINATES.get(fieldName).getRight();
}
}
public static boolean fieldsConflict(final int field1, final int field2) {
- if (field1 == 0 || field2 == 0 || field1 == field2) {
- return false;
- }
- return true;
+ return field1 != 0 && field2 != 0 && field1 != field2;
}
public static InetAddress parseInetAddress(final String addressString) {
startOffset = bitOffset + this.getfieldOffset(hdrField);
numBits = this.getfieldnumBits(hdrField);
- byte[] hdrFieldBytes = null;
+ byte[] hdrFieldBytes;
try {
hdrFieldBytes = BitBufferHelper.getBits(data, startOffset,
numBits);
}
private void stepByStepVersionSubStep(Short remoteVersion) throws Exception {
- if (remoteVersion.equals(lastProposedVersion)) {
+ if (remoteVersion >= lastProposedVersion) {
postHandshake(lastProposedVersion, getNextXid());
LOG.trace("ret - OK - switch answered with lastProposedVersion");
} else {
return flowRegistryKey;
}
} else {
- for (Map.Entry<FlowRegistryKey, FlowDescriptor> keyValueSet : flowRegistry.entrySet()) {
- if (keyValueSet.getKey().equals(flowRegistryKey)) {
- return keyValueSet.getKey();
+ synchronized (flowRegistry) {
+ for (Map.Entry<FlowRegistryKey, FlowDescriptor> keyValueSet : flowRegistry.entrySet()) {
+ if (keyValueSet.getKey().equals(flowRegistryKey)) {
+ return keyValueSet.getKey();
+ }
}
}
}
import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlInCaseBuilder;
-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.GroupActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetMplsTtlActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.BucketsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket;
import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.BucketBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.GroupCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetMplsTtlCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupModCommand;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupType;
assertEquals((Long) 22L, outAddGroupInput.getBucketsList().get(0).getWatchGroup());
final List<Action> outActionList = outAddGroupInput.getBucketsList().get(0).getAction();
- for (int outItem = 0; outItem < outActionList.size(); outItem++) {
- final Action action = outActionList
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
- assertEquals((Long) 5L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
-
- }
- // TODO:setMplsTTL :OF layer doesnt have get();
- }
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action
+ .rev150203.actions.grouping.ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping
+ .action.choice.group._case.GroupActionBuilder().setGroupId(5L).build()).build()).build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.group._case.GroupActionBuilder().setGroupId(5L).build()).build())
+ .build()), outActionList);
assertEquals((Integer) 50, outAddGroupInput.getBucketsList().get(1).getWeight());
assertEquals((long) 60, (long) outAddGroupInput.getBucketsList().get(1).getWatchPort().getValue());
assertEquals((Long) 70L, outAddGroupInput.getBucketsList().get(1).getWatchGroup());
- final List<Action> outActionList1 = outAddGroupInput.getBucketsList().get(1).getAction();
- for (int outItem = 0; outItem < outActionList1.size(); outItem++) {
- final Action action = outActionList1
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
-
- assertEquals((Long) 6L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
-
-
- }
- // TODO:setMplsTTL :OF layer doesnt have get();
- }
+ final List<Action> outActionList1 = outAddGroupInput.getBucketsList().get(1).getAction();
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action
+ .rev150203.actions.grouping.ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping
+ .action.choice.group._case.GroupActionBuilder().setGroupId(5L).build()).build()).build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.group._case.GroupActionBuilder().setGroupId(5L).build()).build())
+ .build()), outActionList1);
}
/**
assertEquals(10L, outAddGroupInput.getGroupId().getValue().longValue());
final List<Action> outActionList = outAddGroupInput.getBucketsList().get(0).getAction();
- for (int outItem = 0; outItem < outActionList.size(); outItem++) {
- final Action action = outActionList
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
- assertEquals((Long) 5L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
- }
- }
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .actions.grouping.ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.group._case.GroupActionBuilder().setGroupId(5L).build()).build())
+ .build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .action.grouping.action.choice.group._case.GroupActionBuilder().setGroupId(6L)
+ .build()).build()).build()), outActionList);
final List<Action> outActionList1 = outAddGroupInput.getBucketsList().get(1).getAction();
- for (int outItem = 0; outItem < outActionList1.size(); outItem++) {
- final Action action = outActionList1
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
- assertEquals((Long) 6L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
- }
- }
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .actions.grouping.ActionBuilder().setActionChoice(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.CopyTtlInCaseBuilder().build()).build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new SetMplsTtlCaseBuilder().setSetMplsTtlAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .action.grouping.action.choice.set.mpls.ttl._case.SetMplsTtlActionBuilder()
+ .setMplsTtl((short) 1).build()).build()).build()), outActionList1);
}
/**
assertEquals(10L, outAddGroupInput.getGroupId().getValue().longValue());
final List<Action> outActionList = outAddGroupInput.getBucketsList().get(0).getAction();
- for (int outItem = 0; outItem < outActionList.size(); outItem++) {
- final Action action = outActionList
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
- assertEquals((Long) 5L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
-
- }
-
- }
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .actions.grouping.ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.group._case.GroupActionBuilder().setGroupId(5L).build())
+ .build()).build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .action.grouping.action.choice.group._case.GroupActionBuilder()
+ .setGroupId(6L).build()).build()).build()), outActionList);
final List<Action> outActionList1 = outAddGroupInput.getBucketsList().get(1).getAction();
- for (int outItem = 0; outItem < outActionList1.size(); outItem++) {
- final Action action = outActionList1
- .get(outItem);
- if (action.getActionChoice() instanceof GroupActionCase) {
-
- assertEquals((Long) 6L, ((GroupActionCase) action.getActionChoice()).getGroupAction().getGroupId());
-
- }
-
- }
-
+ assertEquals(ImmutableList.of(new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .actions.grouping.ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action
+ .grouping.action.choice.group._case.GroupActionBuilder().setGroupId(5L).build())
+ .build()).build(),
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+ .ActionBuilder().setActionChoice(new GroupCaseBuilder().setGroupAction(
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203
+ .action.grouping.action.choice.group._case.GroupActionBuilder()
+ .setGroupId(6L).build()).build()).build()), outActionList1);
}
- private GroupModInputBuilder convert(Group group, VersionDatapathIdConvertorData data) {
+ private GroupModInputBuilder convert(final Group group, final VersionDatapathIdConvertorData data) {
final Optional<GroupModInputBuilder> outAddGroupInputOptional = convertorManager.convert(group, data);
assertTrue("Group convertor not found", outAddGroupInputOptional.isPresent());
return outAddGroupInputOptional.get();