<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
*/
package test.mock.util;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfigBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
import org.opendaylight.yangtools.yang.common.Uint16;
public abstract class AbstractFRMTest extends AbstractDataBrokerTest {
}
protected void addFlowCapableNode(final NodeKey nodeKey) {
- Nodes nodes = new NodesBuilder().build();
-
- NodeBuilder nodeBuilder = new NodeBuilder();
- nodeBuilder.withKey(nodeKey);
- nodeBuilder.addAugmentation(new FlowCapableNodeBuilder().build());
+ Nodes nodes = new NodesBuilder()
+ .setNode(BindingMap.of(new NodeBuilder()
+ .withKey(nodeKey)
+ .addAugmentation(new FlowCapableNodeBuilder().build())
+ .build()))
+ .build();
WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Nodes.class), nodes);
+ assertCommit(writeTx.commit());
- InstanceIdentifier<Node> flowNodeIdentifier = InstanceIdentifier.create(Nodes.class).child(Node.class, nodeKey);
- writeTx.put(LogicalDatastoreType.OPERATIONAL, flowNodeIdentifier, nodeBuilder.build());
+ writeTx = getDataBroker().newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Nodes.class), nodes);
- writeTx.put(LogicalDatastoreType.CONFIGURATION, flowNodeIdentifier, nodeBuilder.build());
assertCommit(writeTx.commit());
}
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
</parent>
<groupId>org.opendaylight.openflowplugin</groupId>
<artifactId>openflowplugin-karaf</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
- <version>4.0.2</version>
+ <version>5.0.1</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-openflowplugin-libraries">
<feature name="odl-openflowplugin-libraries">
- <feature version="[11,12)">odl-apache-commons-lang3</feature>
- <feature version="[11,12)">odl-guava</feature>
+ <feature version="[12,13)">odl-apache-commons-lang3</feature>
+ <feature version="[12,13)">odl-guava</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>10.0.2</version>
+ <version>11.0.4</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>controller-artifacts</artifactId>
- <version>6.0.2</version>
+ <version>7.0.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<?xml version="1.0" encoding="UTF-8"?>
<features name="odl-openflowplugin-nsf-model-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
<feature name="odl-openflowplugin-nsf-model" version="${project.version}">
- <feature version="[10,11)">odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal</feature>
- <feature version="[10,11)">odl-mdsal-model-odl-l2-types</feature>
+ <feature version="[11,12)">odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal</feature>
+ <feature version="[11,12)">odl-mdsal-model-odl-l2-types</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>controller-artifacts</artifactId>
- <version>6.0.2</version>
+ <version>7.0.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
- <version>4.0.1</version>
+ <version>5.0.1</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<features name="openflowplugin-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
<feature name="odl-openflowplugin-southbound" version="${project.version}">
<configfile finalname="etc/org.opendaylight.openflowplugin.cfg">mvn:org.opendaylight.openflowplugin/openflowplugin-blueprint-config/${project.version}/cfg/config</configfile>
- <feature version="[6,7)">odl-mdsal-broker</feature>
- <feature version="[4,5)">odl-infrautils-diagstatus</feature>
+ <feature version="[7,8)">odl-mdsal-broker</feature>
+ <feature version="[5,6)">odl-infrautils-diagstatus</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
- <version>4.0.1</version>
+ <version>5.0.1</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yangtools-artifacts</artifactId>
- <version>9.0.1</version>
+ <version>10.0.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>10.0.2</version>
+ <version>11.0.4</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<feature name='odl-openflowjava-protocol' version='${project.version}'>
<configfile finalname="etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin.openflowjava/openflowjava-blueprint-config/${project.version}/xml/config</configfile>
<configfile finalname="etc/opendaylight/datastore/initial/config/legacy-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin.openflowjava/openflowjava-blueprint-config/${project.version}/xml/legacyConfig</configfile>
- <feature version="[9,10)">odl-yangtools-netty</feature>
- <feature version="[10,11)">odl-mdsal-model-rfc6991</feature>
- <feature version="[4,5)">odl-infrautils-diagstatus</feature>
+ <feature version="[10,11)">odl-yangtools-netty</feature>
+ <feature version="[11,12)">odl-mdsal-model-rfc6991</feature>
+ <feature version="[5,6)">odl-infrautils-diagstatus</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMask;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PacketInMask;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMask;
-import org.opendaylight.yangtools.yang.binding.Enumeration;
+import org.opendaylight.yangtools.yang.binding.EnumTypeObject;
/**
* Translates GetAsyncOutput messages.
}
}
- private static void serializeReasons(final Collection<? extends Enumeration> reasons, final ByteBuf outBuffer) {
+ private static void serializeReasons(final Collection<? extends EnumTypeObject> reasons, final ByteBuf outBuffer) {
if (reasons != null) {
int bitmap = 0;
- for (Enumeration reason : reasons) {
+ for (var reason : reasons) {
bitmap |= 1 << reason.getIntValue();
}
outBuffer.writeInt(bitmap);
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.FlowRemovedMask;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PacketInMask;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMask;
-import org.opendaylight.yangtools.yang.binding.Enumeration;
+import org.opendaylight.yangtools.yang.binding.EnumTypeObject;
/**
* Translates SetAsync messages.
}
}
- private static void serializeReasons(final Collection<? extends Enumeration> reasons, final ByteBuf outBuffer) {
+ private static void serializeReasons(final Collection<? extends EnumTypeObject> reasons, final ByteBuf outBuffer) {
if (reasons != null) {
int bitmap = 0;
- for (Enumeration reason : reasons) {
+ for (var reason : reasons) {
bitmap |= 1 << reason.getIntValue();
}
outBuffer.writeInt(bitmap);
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", false, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
+ Assert.assertFalse("Wrong flag", builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyDescCase messageCase = (MultipartReplyDescCase) builtByFactory.getMultipartReplyBody();
MultipartReplyDesc message = messageCase.getMultipartReplyDesc();
Assert.assertEquals("Wrong mfrDesc", "Manufacturer description", message.getMfrDesc());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x01, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
+ Assert.assertTrue("Wrong flag", builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyFlowCase messageCase = (MultipartReplyFlowCase) builtByFactory.getMultipartReplyBody();
MultipartReplyFlow message = messageCase.getMultipartReplyFlow();
Assert.assertEquals("Wrong tableId", 1, message.getFlowStats().get(0).getTableId().intValue());
BufferHelper.checkHeaderV10(builtByFactory);
Assert.assertEquals("Wrong type", 0x02, builtByFactory.getType().getIntValue());
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE().booleanValue());
+ Assert.assertTrue("Wrong flag", builtByFactory.getFlags().getOFPMPFREQMORE());
MultipartReplyAggregateCase messageCase = (MultipartReplyAggregateCase) builtByFactory.getMultipartReplyBody();
MultipartReplyAggregate message = messageCase.getMultipartReplyAggregate();
Assert.assertEquals("Wrong packet-count", Uint64.valueOf("FF01020304050607", 16), message.getPacketCount());
f2 = flags2 == null ? DEFAULT_FLOW_MOD_FLAGS : flags2;
}
- return equalsWithDefault(f1.getCHECKOVERLAP(), f2.getCHECKOVERLAP(), Boolean.FALSE)
- && equalsWithDefault(f1.getNOBYTCOUNTS(), f2.getNOBYTCOUNTS(), Boolean.FALSE)
- && equalsWithDefault(f1.getNOPKTCOUNTS(), f2.getNOPKTCOUNTS(), Boolean.FALSE)
- && equalsWithDefault(f1.getRESETCOUNTS(), f2.getRESETCOUNTS(), Boolean.FALSE)
- && equalsWithDefault(f1.getSENDFLOWREM(), f2.getSENDFLOWREM(), Boolean.FALSE);
+ return f1.getCHECKOVERLAP() == f2.getCHECKOVERLAP()
+ && f1.getNOBYTCOUNTS() == f2.getNOBYTCOUNTS()
+ && f1.getNOPKTCOUNTS() == f2.getNOPKTCOUNTS()
+ && f1.getRESETCOUNTS() == f2.getRESETCOUNTS()
+ && f1.getSENDFLOWREM() == f2.getSENDFLOWREM();
}
/**
assertNotNull(SwitchFeaturesUtil.buildSwitchFeatures(featuresOutputBuilder.build()));
}
- /**
- * Test method for
- * {@link SwitchFeaturesUtil#buildSwitchFeatures} for malformed switch feature capabilities
- * - at least one feature is null
- * .
- */
- //@Test TODO:do we need to check if capability is null?
- public void testSwFeaturesCapabilitiesMalformed() {
- CapabilitiesV10 capabilities = new CapabilitiesV10(true, false, true, false, true, false, true, null);
- featuresOutputBuilder.setCapabilitiesV10(capabilities).setCapabilities(null).setVersion(Uint8.ONE);
-
- assertNull(SwitchFeaturesUtil.buildSwitchFeatures(featuresOutputBuilder.build()));
- }
-
/**
* Test method for
* {@link SwitchFeaturesUtil#buildSwitchFeatures} for mismatch between
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.flow.capable.port.State;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.flow.capable.port.StateBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfig;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfigV10;
private DeviceInfo deviceInfo;
private org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig portConfig;
- private StateBuilder portStateBld;
+ private State portState;
private PortStatusMessageBuilder portBld;
@Before
public void setUp() {
portUpdateTranslator = new PortUpdateTranslator();
- portStateBld = new StateBuilder().setLive(true);
+ portState = new StateBuilder().setLive(true).setBlocked(false).setLinkDown(false).build();
portConfig = org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig
.getDefaultInstance("nOFWD");
portBld = assemblePortStatusMessage(21L, 84L);
Assert.assertEquals(portFeatures, nodeConnector.getAdvertisedFeatures());
Assert.assertEquals(portFeatures, nodeConnector.getPeerFeatures());
Assert.assertEquals(portFeatures, nodeConnector.getSupported());
- Assert.assertEquals(portStateBld.build(), nodeConnector.getState());
+ Assert.assertEquals(portState, nodeConnector.getState());
Assert.assertNull(nodeConnector.getQueue());
}
Mockito.when(deviceInfo.getVersion()).thenReturn(OFConstants.OFP_VERSION_1_0);
final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures portFeatures =
new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures(
- null, null, null, false, false, true, null, null,
- null, false, false, null, null, null, null, null
+ false, false, false, false, false, true, false, false,
+ false, false, false, false, false, false, false, false
);
final FlowCapableNodeConnector nodeConnector =
Assert.assertEquals(portFeatures, nodeConnector.getAdvertisedFeatures());
Assert.assertEquals(portFeatures, nodeConnector.getPeerFeatures());
Assert.assertEquals(portFeatures, nodeConnector.getSupported());
- Assert.assertEquals(portStateBld.build(), nodeConnector.getState());
+ Assert.assertEquals(portState, nodeConnector.getState());
Assert.assertNull(nodeConnector.getQueue());
}
*/
@Test
public void testEqualsFlowModFlags() {
- final FlowModFlags[] defaults = {null, new FlowModFlags(false, false, false, false, false), new FlowModFlags(
- false, null, false, null, Boolean.FALSE),};
+ final FlowModFlags[] defaults = {
+ null,
+ new FlowModFlags(false, false, false, false, false),
+ new FlowModFlags(false, false, false, false, false)
+ };
final FlowModFlags all = new FlowModFlags(true, true, true, true, true);
- final FlowModFlags none = new FlowModFlags(null, null, null, null, null);
+ final FlowModFlags none = new FlowModFlags(false, false, false, false, false);
for (final FlowModFlags f : defaults) {
assertTrue(FlowCreatorUtil.equalsFlowModFlags(f, null));
private static final String DEFAULT_MAC_ADDRESS = "01:02:03:04:05:06";
- private final PortFeatures features = new PortFeatures(true, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null);
+ private final PortFeatures features = new PortFeatures(
+ true, false, false, false, false, false, false, false,
+ false, false, false, false, false, false, false, false);
private final PortConfig config = new PortConfig(false, false, false, false);
private final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeatures portf31 =
- new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeatures(
- null, null, null, null, null, null, null, null, null, null, true, null, null, null, null, null);
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortFeatures(
+ false, false, false, false, false, false, false, false,
+ false, false, true, false, false, false, false, false);
private final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfig config31 =
new org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortConfig(
portModInputBld.setConfigV10(portConfV10);
portModInputBld.setMaskV10(portConfMaskV10);
- portModInputBld.setAdvertiseV10(
- new PortFeaturesV10(null, null, null, null, null, null, null, true, null, null, null, null));
+ portModInputBld.setAdvertiseV10(new PortFeaturesV10(
+ false, false, false, false, false, false,
+ false, true, false, false, false, false));
portModInputBld.setVersion(EncodeConstants.OF_VERSION_1_3);
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
public Uri getTransactionUri() {
return null;
}
+
+ @Override
+ public Match nonnullMatch() {
+ return Objects.requireNonNullElse(getMatch(), MatchBuilder.empty());
+ }
+
+ @Override
+ public Instructions nonnullInstructions() {
+ return Objects.requireNonNullElse(getInstructions(), InstructionsBuilder.empty());
+ }
}
}
public void testIpv6ExthdrFlagsToInt() throws Exception {
Ipv6ExthdrFlags flags;
Constructor<Ipv6ExthdrFlags> ctor = Ipv6ExthdrFlags.class.getConstructor(
- Boolean.class, Boolean.class, Boolean.class, Boolean.class,
- Boolean.class, Boolean.class, Boolean.class, Boolean.class, Boolean.class);
+ boolean.class, boolean.class, boolean.class, boolean.class,
+ boolean.class, boolean.class, boolean.class, boolean.class, boolean.class);
int[] expectedFlagCumulants = new int[] { 4, 8, 2, 16, 64, 1, 32, 128, 256 };
portNumber = new PortNumberUni(OutputPortValues.FLOOD.toString());
Assert.assertEquals("FLOOD", OpenflowPortsUtil.portNumberToString(portNumber));
-
-
- portNumber = new PortNumberUni((String) null);
- Assert.assertNotNull(portNumber);
}
}
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>10.0.2</version>
+ <version>11.0.4</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>controller-artifacts</artifactId>
- <version>6.0.2</version>
+ <version>7.0.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
- <version>4.0.1</version>
+ <version>5.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>11.0.1</version>
+ <version>12.0.1</version>
<relativePath/>
</parent>