import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev160812.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.mldp.p2mp.lsp.mldp.p2mp.lsp.OpaqueValueBuilder;
public class OpaqueUtilTest {
- private final static byte[] OPAQUE_WRONG= {
+ private static final byte[] OPAQUE_WRONG= {
(byte) 0xfc, (byte) 0x00, (byte) 0x03, // Opaque Type - Length
(byte) 0xb5, (byte) 0xeb, (byte) 0x2d, //Value
};
- private final static byte[] OPAQUE_EXPECTED = {
+ private static final byte[] OPAQUE_EXPECTED = {
(byte) 0x01, (byte) 0x00, (byte) 0x0e, // Opaque Type - Length
(byte) 0x07, (byte) 0x00, (byte) 0x0B, //Value
(byte) 0x00, (byte) 0x00, (byte) 0x01,
(byte) 0x01, (byte) 0x00, (byte) 0x00,
(byte) 0x00, (byte) 0x00
};
- private final static byte[] OPAQUE_EXT_EXPECTED = {
+ private static final byte[] OPAQUE_EXT_EXPECTED = {
(byte) 0xff, (byte) 0x00, (byte) 0x04, (byte) 0x00, (byte) 0x10, // Opaque Type -Ext Type - Length
(byte) 0x07, (byte) 0x00, (byte) 0x0B, //Value
(byte) 0x00, (byte) 0x00, (byte) 0x01,
(byte) 0x00, (byte) 0x00, (byte) 0x01,
(byte) 0x02
};
- private final static byte[] OPAQUE_VALUES_EXPECTED = {
+ private static final byte[] OPAQUE_VALUES_EXPECTED = {
(byte) 0x01, (byte) 0x00, (byte) 0x0e, // Opaque Type - Length
(byte) 0x07, (byte) 0x00, (byte) 0x0B, //Value
(byte) 0x00, (byte) 0x00, (byte) 0x01,
static final HexString OPAQUE_TEST = new HexString("07:00:0b:00:00:01:00:00:00:01:00:00:00:00");
static final HexString OPAQUE_TEST2 = new HexString ("07:00:0b:00:00:01:00:00:00:01:00:00:00:00:01:02");
- private final static Opaque OPAQUE = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST).setOpaqueType(OpaqueUtil.GENERIC_LSP_IDENTIFIER).build();
- private final static Opaque OPAQUE_EXTENDED = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST2).setOpaqueType((short) 2)
+ private static final Opaque OPAQUE = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST).setOpaqueType(OpaqueUtil.GENERIC_LSP_IDENTIFIER).build();
+ private static final Opaque OPAQUE_EXTENDED = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST2).setOpaqueType((short) 2)
.setOpaqueType(OpaqueUtil.EXTENDED_TYPE).setOpaqueExtendedType(4).build();
- private final static List<OpaqueValue> OPAQUE_VALUE_LIST = Arrays.asList((OpaqueValue) OPAQUE, (OpaqueValue) OPAQUE_EXTENDED);
+ private static final List<OpaqueValue> OPAQUE_VALUE_LIST = Arrays.asList((OpaqueValue) OPAQUE, (OpaqueValue) OPAQUE_EXTENDED);
@Test
public void serializeOpaque() throws Exception {
import org.opendaylight.yangtools.yang.binding.DataContainer;
public class PAddressPMulticastGroupUtilTest {
- private final static byte[] IPV4_ADDRESS_EXPECTED = {
+ private static final byte[] IPV4_ADDRESS_EXPECTED = {
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01
};
- private final static byte[] IPV6_ADDRESS_EXPECTED = {
+ private static final byte[] IPV6_ADDRESS_EXPECTED = {
0x20, (byte) 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
};
- private final static byte[] SENDER_P_MULTICAST_GROUP_EXPECTED = {
+ private static final byte[] SENDER_P_MULTICAST_GROUP_EXPECTED = {
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
(byte) 0x17, (byte) 0x01, (byte) 0x01, (byte) 0x01
};
* PMSI FLAG - PMSI TYPE 0- MPLS LABEL
* No tunnel information present
*/
- final static byte[] NO_TUNNEL_INFORMATION_PRESENT_EXPECTED = {
+ static final byte[] NO_TUNNEL_INFORMATION_PRESENT_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x05,
(byte) 0x01, (byte) 0x00, (byte) 0x05, (byte) 0xdc, (byte) 0x10
};
* PMSI FLAG - PMSI TYPE 1- MPLS LABEL
* mLDP P2MP LSP
*/
- final static byte[] RSVP_TE_P2MP_LSP_LSP_EXPECTED = {
+ static final byte[] RSVP_TE_P2MP_LSP_LSP_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x11,
(byte) 0x01, (byte) 0x01, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x00, (byte) 0x00, (byte) 0x0d, (byte) 0x82,
* PMSI FLAG - PMSI TYPE 2- MPLS LABEL
* mLDP P2MP LSP
*/
- final static byte[] M_LDP_P2MP_LSP_EXPECTED_IPV4 = {
+ static final byte[] M_LDP_P2MP_LSP_EXPECTED_IPV4 = {
(byte) 0x80, (byte) 0x16, (byte) 0x35,
(byte) 0x01, (byte) 0x02, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x06, (byte) 0x00, (byte) 0x01, (byte) 0x04,
* PMSI FLAG - PMSI TYPE 2- MPLS LABEL
* mLDP P2MP LSP
*/
- final static byte[] M_LDP_P2MP_LSP_EXPECTED_WRONG_FAMILY = {
+ static final byte[] M_LDP_P2MP_LSP_EXPECTED_WRONG_FAMILY = {
(byte) 0x80, (byte) 0x16, (byte) 0x20,
(byte) 0x01, (byte) 0x02, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x06, (byte) 0x00, (byte) 0xfc, (byte) 0x04,
* PMSI FLAG - PMSI TYPE 2- MPLS LABEL
* mLDP P2MP LSP L2VPN
*/
- final static byte[] M_LDP_P2MP_LSP_EXPECTED_L2VPN = {
+ static final byte[] M_LDP_P2MP_LSP_EXPECTED_L2VPN = {
(byte) 0x80, (byte) 0x16, (byte) 0x35,
(byte) 0x01, (byte) 0x02, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x06, (byte) 0x00, (byte) 0x19, (byte) 0x04,
* PMSI FLAG - PMSI TYPE 2- MPLS LABEL
* mLDP P2MP LSP IPV4
*/
- final static byte[] M_LDP_P2MP_LSP_EXPECTED_IPV4_2 = {
+ static final byte[] M_LDP_P2MP_LSP_EXPECTED_IPV4_2 = {
(byte) 0x80, (byte) 0x16, (byte) 0x3b,
(byte) 0x01, (byte) 0x02, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x06, (byte) 0x00, (byte) 0x01, (byte) 0x04,
* PMSI FLAG - PMSI TYPE 2- MPLS LABEL
* mLDP P2MP LSP IPV6
*/
- final static byte[] M_LDP_P2MP_LSP_EXPECTED_IPV6 = {
+ static final byte[] M_LDP_P2MP_LSP_EXPECTED_IPV6 = {
(byte) 0x80, (byte) 0x16, (byte) 0x41,
(byte) 0x01, (byte) 0x02, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x06, (byte) 0x00, (byte) 0x02, (byte) 0x10,
* PMSI FLAG - PMSI TYPE 3- MPLS LABEL
* PIM-SSM Tree
*/
- final static byte[] PIM_SSM_TREE_EXPECTED = {
+ static final byte[] PIM_SSM_TREE_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x0d,
(byte) 0x01, (byte) 0x03, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
* PMSI FLAG - PMSI TYPE 4- MPLS LABEL
* PIM-SM Tree
*/
- final static byte[] PIM_SM_TREE_EXPECTED = {
+ static final byte[] PIM_SM_TREE_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x0d,
(byte) 0x01, (byte) 0x04, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
* PMSI FLAG - PMSI TYPE 5- MPLS LABEL
* BIDIR-PIM Tree
*/
- final static byte[] BIDIR_PIM_EXPECTED = {
+ static final byte[] BIDIR_PIM_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x0d,
(byte) 0x01, (byte) 0x05, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
* PMSI FLAG - PMSI TYPE 6- MPLS LABEL
* Ingress Replication
*/
- final static byte[] INGRESS_REPLICATION_EXPECTED = {
+ static final byte[] INGRESS_REPLICATION_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x09,
(byte) 0x01, (byte) 0x06, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01
* PMSI FLAG - PMSI TYPE 7- MPLS LABEL
* mLDP MP2MP LSP
*/
- final static byte[] M_LDP_MP_2_MP_LSP_EXPECTED = {
+ static final byte[] M_LDP_MP_2_MP_LSP_EXPECTED = {
(byte) 0x80, (byte) 0x16, (byte) 0x16,
(byte) 0x01, (byte) 0x07, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0x01, (byte) 0x00, (byte) 0x0e, // Opaque Type - Length
* PMSI FLAG - PMSI TYPE 7- MPLS LABEL
* mLDP MP2MP LSP
*/
- final static byte[] M_LDP_MP_2_MP_LSP_WRONG = {
+ static final byte[] M_LDP_MP_2_MP_LSP_WRONG = {
(byte) 0x80, (byte) 0x16, (byte) 0x0b,
(byte) 0x01, (byte) 0x07, (byte) 0x05, (byte) 0xdc, (byte) 0x10,
(byte) 0xfc, (byte) 0x00, (byte) 0x03, // Opaque Type - Length
private static final DestinationPrefixCase DEST_PREFIX = new DestinationPrefixCaseBuilder().setDestinationPrefix(new Ipv4Prefix("10.0.1.0/32")).build();
private static final List<Flowspec> FLOW_LIST = Collections.singletonList(new FlowspecBuilder().setFlowspecType(DEST_PREFIX).build());
- private final static DestinationFlowspec DEST_FLOW = new DestinationFlowspecBuilder().setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
+ private static final DestinationFlowspec DEST_FLOW = new DestinationFlowspecBuilder().setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
private static final DestinationFlowspecCase REACH_NLRI = new DestinationFlowspecCaseBuilder().setDestinationFlowspec(DEST_FLOW).build();
private static final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update
.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecCase UNREACH_NLRI = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update
private static final DestinationIpv6PrefixCase DEST_PREFIX = new DestinationIpv6PrefixCaseBuilder().setDestinationPrefix(new Ipv6Prefix("2001:db8:1:2::/64")).build();
private static final List<Flowspec> FLOW_LIST = Collections.singletonList(new FlowspecBuilder().setFlowspecType(DEST_PREFIX).build());
- private final static DestinationFlowspec DEST_FLOW = new DestinationFlowspecBuilder().setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
+ private static final DestinationFlowspec DEST_FLOW = new DestinationFlowspecBuilder().setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
private static final DestinationFlowspecIpv6Case REACH_NLRI = new DestinationFlowspecIpv6CaseBuilder().setDestinationFlowspec(DEST_FLOW).build();
private static final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update
.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecIpv6Case UNREACH_NLRI = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update
private static final DestinationPrefixCase DEST_PREFIX = new DestinationPrefixCaseBuilder()
.setDestinationPrefix(new Ipv4Prefix("172.17.1.0/24")).build();
private static final List<Flowspec> FLOW_LIST = Collections.singletonList(new FlowspecBuilder().setFlowspecType(DEST_PREFIX).build());
- private final static DestinationFlowspecL3vpnIpv4 DEST_FLOW = new DestinationFlowspecL3vpnIpv4Builder().setRouteDistinguisher(RD)
+ private static final DestinationFlowspecL3vpnIpv4 DEST_FLOW = new DestinationFlowspecL3vpnIpv4Builder().setRouteDistinguisher(RD)
.setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
private static final DestinationFlowspecL3vpnIpv4Case REACH_NLRI = new DestinationFlowspecL3vpnIpv4CaseBuilder().setDestinationFlowspecL3vpnIpv4(DEST_FLOW).build();
private static final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.
private static final DestinationIpv6PrefixCase DEST_PREFIX = new DestinationIpv6PrefixCaseBuilder()
.setDestinationPrefix(new Ipv6Prefix("2001:db8:1:2::/64")).build();
private static final List<Flowspec> FLOW_LIST = Collections.singletonList(new FlowspecBuilder().setFlowspecType(DEST_PREFIX).build());
- private final static DestinationFlowspecL3vpnIpv6 DEST_FLOW = new DestinationFlowspecL3vpnIpv6Builder().setRouteDistinguisher(RD)
+ private static final DestinationFlowspecL3vpnIpv6 DEST_FLOW = new DestinationFlowspecL3vpnIpv6Builder().setRouteDistinguisher(RD)
.setFlowspec(FLOW_LIST).setPathId(PATH_ID).build();
private static final DestinationFlowspecL3vpnIpv6Case REACH_NLRI = new DestinationFlowspecL3vpnIpv6CaseBuilder().setDestinationFlowspecL3vpnIpv6(DEST_FLOW).build();
private static final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.
private final InstanceIdentifier<Bgp> bgpInstanceIdentifier = InstanceIdentifier.create(NetworkInstances.class)
.child(NetworkInstance.class, new NetworkInstanceKey("global-bgp")).child(Protocols.class)
.child(Protocol.class, new ProtocolKey(BGP.class, this.ribId)).augmentation(Protocol1.class).child(Bgp.class);
- final static TablesKey TABLES_KEY = new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
+ static final TablesKey TABLES_KEY = new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
private final AsNumber as = new AsNumber(72L);
private final BgpId bgpId = new BgpId("127.0.0.1");
private final IpAddress neighborAddress = new IpAddress(new Ipv4Address("127.0.0.2"));
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public final class SimpleRouteEntryTest extends AbstractRouteEntryTest {
- private final static long N_PATHS = 2;
+ private static final long N_PATHS = 2;
private SimpleRouteEntry testBARE;
@Before
private static final YangInstanceIdentifier YII_PEER4 = YangInstanceIdentifier.builder().node(BgpRib.QNAME).node(Peer.QNAME)
.nodeWithKey(Peer.QNAME, PEER_ID_QNAME, PEER_ID4.getValue()).build();
private static final PeerId PEER_ID5 = new PeerId("bgp://42.42.42.46");
- private final static List<AutoCloseable> TABLE_REGISTRATION = new ArrayList<>();
+ private static final List<AutoCloseable> TABLE_REGISTRATION = new ArrayList<>();
@Test
public void testExportPolicyPeerTrackerImpl() throws Exception {
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily;
public class BGPRenderStatsImplTest {
- private final static BgpId BGP_ID = new BgpId("127.0.0.1");
+ private static final BgpId BGP_ID = new BgpId("127.0.0.1");
private static final RibId RIB_ID = new RibId("test-rib");
private static final ClusterIdentifier CLUSTER_ID = new ClusterIdentifier("192.168.1.2");
private static final AsNumber AS = new AsNumber(0x10L);
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
public abstract class AbstractRIBSupportTest {
- protected final static long PATH_ID = 1;
+ protected static final long PATH_ID = 1;
protected static final Attributes ATTRIBUTES = new AttributesBuilder().build();
private static final InstanceIdentifier<LocRib> RIB = InstanceIdentifier.builder(BgpRib.class).child(Rib.class, new RibKey(new RibId("rib"))).child(LocRib.class).build();
private static final InstanceIdentifier<Attributes> ATTRIBUTES_IID = InstanceIdentifier.create(Update.class).child(Attributes.class);
import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder;
public class MultiPathAbstractRIBSupportTest {
- private final static long PATH_ID = 0;
- private final static String ROUTE_KEY = "prefix";
+ private static final long PATH_ID = 0;
+ private static final String ROUTE_KEY = "prefix";
private static final String PREFIX = "1.2.3.4/32";
private static final QName PATH_ID_QNAME = QName.create(Ipv4Route.QNAME, "path-id").intern();
private static final QName PREFIX_QNAME = QName.create(Ipv4Route.QNAME, ROUTE_KEY).intern();
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
public class RibSupportUtilsTest {
- private final static NodeIdentifierWithPredicates NII;
- private final static NodeIdentifierWithPredicates NII_PATH;
+ private static final NodeIdentifierWithPredicates NII;
+ private static final NodeIdentifierWithPredicates NII_PATH;
final Class<? extends AddressFamily> AFI = Ipv4AddressFamily.class;
final Class<? extends SubsequentAddressFamily> SAFI = UnicastSubsequentAddressFamily.class;
private static final TablesKey TABLE_KEY = new TablesKey(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
public final class MultiPathAbstractTest extends MultiPathAbstractRIBSupport {
- private final static String ROUTE_KEY = "prefix";
+ private static final String ROUTE_KEY = "prefix";
private static final String PREFIX = "1.2.3.4/32";
private static final NodeIdentifierWithPredicates PREFIX_NII = new NodeIdentifierWithPredicates(Ipv4Route.QNAME,
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
public class NetworkTopologyConfigFileProcessorTest extends AbstractConfigLoader {
- private final static InstanceIdentifier<Topology> TOPOLOGY_IID = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class);
+ private static final InstanceIdentifier<Topology> TOPOLOGY_IID = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class);
@Mock
private BgpTopologyDeployer bgpDeployer;
@Mock
public class TopologyDataChangeCounterDeployer implements DataTreeChangeListener<DataChangeCounterConfig>,
AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(TopologyDataChangeCounterDeployer.class);
- private final static InstanceIdentifier<DataChangeCounterConfig> DATA_CHANGE_COUNTER_IID =
+ private static final InstanceIdentifier<DataChangeCounterConfig> DATA_CHANGE_COUNTER_IID =
InstanceIdentifier.builder(DataChangeCounterConfig.class).build();
private final DataBroker dataBroker;
@GuardedBy("this")
public class PCCEndPointIpv4ObjectParserTest {
- private final static String IP1 = "1.2.3.4";
- private final static String IP2 = "1.2.3.5";
+ private static final String IP1 = "1.2.3.4";
+ private static final String IP2 = "1.2.3.5";
@Test(expected=PCEPDeserializerException.class)
public void testParseEmptyObject() throws PCEPDeserializerException {