BUG-6647 Increase code coverage and clean up II 61/46061/2
authorClaudio D. Gasparini <cgaspari@cisco.com>
Wed, 7 Sep 2016 09:55:04 +0000 (11:55 +0200)
committerMilos Fabian <milfabia@cisco.com>
Thu, 22 Sep 2016 19:12:41 +0000 (19:12 +0000)
Remove unused methods, parameters.

Change-Id: I14fdf71afc08a5c85fd86ea4a40c9b15993157e1
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
(cherry picked from commit f0f2090ce6b2d7c204737352b784275a908d300f)

46 files changed:
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpRouterPeerImpl.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/TableContext.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/spi/BmpRouterPeer.java
bgp/bmp-impl/src/test/java/org/opendaylight/protocol/bmp/impl/app/BmpMonitorImplTest.java
bgp/bmp-mock/src/main/java/org/opendaylight/protocol/bmp/mock/BmpMockUtil.java
bgp/bmp-mock/src/test/java/org/opendaylight/protocol/bmp/mock/BmpMockUtilTest.java
bgp/bmp-parser-impl/src/test/java/org/opendaylight/protocol/bmp/parser/message/TestUtil.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecParser.java [deleted file]
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecSerializer.java [deleted file]
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv4NlriParserTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/MultiProtocolCapabilityHandlerTest.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerActivator.java [deleted file]
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleBGPExtensionProviderContext.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImpl.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPServerDispatcher.java [deleted file]
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPSessionProposal.java [deleted file]
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/stats/peer/BGPPeerStatsImpl.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/stats/peer/route/PerTableTypeRouteCounter.java
bgp/rib-impl/src/test/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPApplicationPeerModuleTest.java
bgp/rib-impl/src/test/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPPeerModuleTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/AbstractRIBTestSetup.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/SimpleSessionListener.java
bgp/rib-mock/src/main/java/org/opendaylight/protocol/bgp/rib/mock/BGPMock.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/BGPSessionListener.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBExtensionConsumerActivator.java [deleted file]
bgp/testtool/src/main/java/org/opendaylight/protocol/bgp/testtool/TestingListener.java
concepts/src/main/java/org/opendaylight/protocol/concepts/KeyMapping.java
pcep/api/src/main/java/org/opendaylight/protocol/pcep/PCEPSessionProposalFactory.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringRequestMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPRequestMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorSpecificTlvParser.java
pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/BasePCEPSessionProposalFactory.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/MockPCE.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPDispatcherImplTest.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/ServerSessionMock.java [deleted file]
pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCSyncOptimization.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCDispatcherImplTest.java
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/PCEPExtensionConsumerActivator.java [deleted file]
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/AbstractTopologySessionListener.java
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/TopologyNodeState.java
pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModuleTest.java
pcep/tunnel-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/tunnel/provider/PCEPTunnelTopologyProviderModuleTest.java
rsvp/spi/src/main/java/org/opendaylight/protocol/rsvp/parser/spi/pojo/SimpleRSVPExtensionProviderContext.java
util/src/main/java/org/opendaylight/protocol/util/ByteBufWriteUtil.java

index ef52e1e22b03fb8b5a554817a69b6c978ccc3fee..89f30d943b4314fc757847a524b4aab30af167d9 100644 (file)
@@ -202,11 +202,6 @@ public final class BmpRouterPeerImpl implements BmpRouterPeer {
         close();
     }
 
-    @Override
-    public PeerId getPeerId() {
-        return this.peerId;
-    }
-
     @Override
     public void close() {
         Preconditions.checkState(this.up, "Already closed.");
index aed1e9b27b9d7afb9b7eb6dd9b48740ce92743f4..2c7a80c9233e4e4695bd2cc1a0a1748b454314fa 100644 (file)
@@ -104,10 +104,6 @@ final class TableContext {
                         new NodeIdentifier(TablesUtil.BMP_ROUTES_QNAME)).build()).build());
     }
 
-    void removeTable(final DOMDataWriteTransaction tx) {
-        tx.delete(LogicalDatastoreType.OPERATIONAL, this.tableId);
-    }
-
     void writeRoutes(final DOMDataWriteTransaction tx, final MpReachNlri nlri, final Attributes attributes) {
         final ContainerNode domNlri = serializeReachNlri(nlri);
         final ContainerNode routeAttributes = serializeAttributes(attributes);
index cff9917e4279f7bdddb37be1e1332fe35a37716b..ab8b0a53aecd46adc63227298b3526cab1014293 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.protocol.bmp.impl.spi;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 /**
@@ -17,12 +16,6 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  */
 public interface BmpRouterPeer extends AutoCloseable {
 
-    /**
-     * Peer is identified by it's BGP-ID.
-     * @return PeerId peer identifier.
-     */
-    PeerId getPeerId();
-
     /**
      * Process peer-peer message that is related to this peer.
      * @param message BMP Per-peer message.
index 6aeeb3efa459253a182dc4686bba99f204101ef4..fa6f752b6864623eee66b7b39252bcf0a5f336df 100644 (file)
@@ -43,7 +43,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.config.yang.bmp.impl.MonitoredRouter;
 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
 import org.opendaylight.controller.md.sal.binding.test.AbstractDataBrokerTest;
@@ -131,7 +130,6 @@ public class BmpMonitorImplTest extends AbstractDataBrokerTest {
     private BmpDispatcher dispatcher;
     private BmpMonitoringStation bmpApp;
     private BmpMessageRegistry msgRegistry;
-    private List<MonitoredRouter> mrs;
     private ModuleInfoBackedContext moduleInfoBackedContext;
 
 
@@ -169,7 +167,7 @@ public class BmpMonitorImplTest extends AbstractDataBrokerTest {
 
         this.bmpApp = BmpMonitoringStationImpl.createBmpMonitorInstance(ribExtension, this.dispatcher, getDomBroker(),
                 MONITOR_ID, new InetSocketAddress(InetAddresses.forString(MONITOR_LOCAL_ADDRESS), MONITOR_LOCAL_PORT), Optional.of(keys),
-                this.mappingService.getCodecFactory(), this.moduleInfoBackedContext.getSchemaContext(), this.mrs);
+                this.mappingService.getCodecFactory(), this.moduleInfoBackedContext.getSchemaContext(), null);
 
         readData(InstanceIdentifier.create(BmpMonitor.class), monitor -> {
             Assert.assertEquals(1, monitor.getMonitor().size());
@@ -419,7 +417,7 @@ public class BmpMonitorImplTest extends AbstractDataBrokerTest {
     public void deploySecondInstance() throws Exception {
         final BmpMonitoringStation monitoringStation2 = BmpMonitoringStationImpl.createBmpMonitorInstance(new SimpleRIBExtensionProviderContext(), this.dispatcher, getDomBroker(),
                 new MonitorId("monitor2"), new InetSocketAddress(InetAddresses.forString(MONITOR_LOCAL_ADDRESS_2), MONITOR_LOCAL_PORT), Optional.of(KeyMapping.getKeyMapping()),
-                this.mappingService.getCodecFactory(), this.moduleInfoBackedContext.getSchemaContext(), this.mrs);
+                this.mappingService.getCodecFactory(), this.moduleInfoBackedContext.getSchemaContext(), null);
 
         readData(InstanceIdentifier.create(BmpMonitor.class), monitor -> {
             Assert.assertEquals(2, monitor.getMonitor().size());
index 254b91a9983d9801dccd1ec40a97015c3003330f..6ee8c512edd96c033fcad8b0307659c500add372 100755 (executable)
@@ -94,7 +94,7 @@ final class BmpMockUtil {
     private static PeerHeader createPeerHeader(final Ipv4Address bgpId, final AdjRibInType ribType) {
         return new PeerHeaderBuilder()
             .setAddress(new IpAddress(bgpId))
-            .setAdjRibInType(AdjRibInType.PrePolicy)
+            .setAdjRibInType(ribType)
             .setAs(new AsNumber(ASN))
             .setBgpId(bgpId)
             .setIpv4(true)
index bd7b9156b004772c5a0d54701477658b680690b4..1f00469edc510f54437f746d6fd0d31072509f48 100644 (file)
@@ -77,7 +77,7 @@ public class BmpMockUtilTest {
     @Test
     public void testCreateRouteMonitoringPostPolicy() {
         final RouteMonitoringMessage routeMonitoring = BmpMockUtil.createRouteMonitoring(PEER_IP, AdjRibInType.PostPolicy, PREFIX);
-        assertEquals(AdjRibInType.PrePolicy, routeMonitoring.getPeerHeader().getAdjRibInType());
+        assertEquals(AdjRibInType.PostPolicy, routeMonitoring.getPeerHeader().getAdjRibInType());
     }
 
     @Test(expected=UnsupportedOperationException.class)
@@ -90,5 +90,4 @@ public class BmpMockUtilTest {
             throw e.getCause();
         }
     }
-
 }
index e8616865d150f9ab8b9b8dc5fd31e61880fbc095..fbb056eecfa64a41310a82ee99fcb2d155851a56 100644 (file)
@@ -274,10 +274,6 @@ public final class TestUtil {
         return routeMirrorMsgBuilder.build();
     }
 
-    public static RouteMirroringMessage createRouteMirrorMsg() {
-        return createRouteMirrorMsg(IPV4_ADDRESS_10);
-    }
-
     private static Update createUpdate(final boolean withNormalizedIpv4Prefixes) {
         final UpdateBuilder updateBuilder = new UpdateBuilder()
             .setAttributes(createAttributes())
diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecParser.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecParser.java
deleted file mode 100644 (file)
index 7296bb2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.flowspec.handlers;
-
-import io.netty.buffer.ByteBuf;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.flowspec.destination.Flowspec;
-
-public interface FlowspecParser {
-    Flowspec parseFlowspec(ByteBuf buffer);
-}
diff --git a/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecSerializer.java b/bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/FlowspecSerializer.java
deleted file mode 100644 (file)
index 962e6c8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.flowspec.handlers;
-
-import io.netty.buffer.ByteBuf;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.flowspec.destination.Flowspec;
-
-public interface FlowspecSerializer {
-    void serializeFlowspec(Flowspec value, ByteBuf output);
-}
index 5c8e0e8134c0da4a66fede19937af755948fe872..2f04afcbc0d412aced3376635febbc373a6b618d 100644 (file)
@@ -207,7 +207,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecCase) (result.getAdvertizedRoutes().getDestinationType()))
             .getDestinationFlowspec()
             .getFlowspec();
-        testFlows(flows, destinationPrefix, sourcePrefix, prots, prots, ps, dps, sps);
+        testFlows(flows, destinationPrefix, sourcePrefix, prots, ps, dps, sps);
 
         final ByteBuf buffer = Unpooled.buffer();
         parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class, new Attributes1Builder().setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build()).build()).build(), buffer);
@@ -216,7 +216,8 @@ public class SimpleFlowspecIpv4NlriParserTest {
         assertEquals("all packets to 10.0.1.0/32 AND from 1.2.3.4/32 AND where IP protocol equals to 6 AND where port is greater than or equals to 137 and is less than or equals to 139 or equals to 8080 AND where destination port is greater than 4089 or equals to 179 AND where source port equals to 8080 ", FS_PARSER.stringNlri(flows));
     }
 
-    private void testFlows(final List<Flowspec> flows, final DestinationPrefixCase destinationPrefix, final SourcePrefixCase sourcePrefix, final FlowspecType prots, final FlowspecType flowspecType, final PortCase ps, final FlowspecType dps, final FlowspecType sps) {
+    private void testFlows(final List<Flowspec> flows, final DestinationPrefixCase destinationPrefix, final SourcePrefixCase sourcePrefix,
+        final FlowspecType prots, final PortCase ps, final FlowspecType dps, final FlowspecType sps) {
         assertEquals(6, flows.size());
         assertEquals(destinationPrefix, flows.get(0).getFlowspecType());
         assertEquals(sourcePrefix, flows.get(1).getFlowspecType());
@@ -292,7 +293,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev150807.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecCase) (result.getAdvertizedRoutes().getDestinationType()))
             .getDestinationFlowspec()
             .getFlowspec();
-        testFlows(flows, destinationPrefix, sourcePrefix, prots, prots, ps, dps, sps);
+        testFlows(flows, destinationPrefix, sourcePrefix, prots, ps, dps, sps);
 
         final ByteBuf buffer = Unpooled.buffer();
         parser.serializeAttribute(new AttributesBuilder().addAugmentation(Attributes1.class, new Attributes1Builder().setMpReachNlri(mp.setAfi(Ipv4AddressFamily.class).build()).build()).build(), buffer);
index a4b753263b80c42ba0fc12cf8a3717d7c9a2b03f..c17a60384baa141665e76628d75eeabc45e2b88b 100644 (file)
@@ -38,7 +38,6 @@ public class MultiProtocolCapabilityHandlerTest {
     private final static Class safi = UnicastSubsequentAddressFamily.class;
     @Mock private SubsequentAddressFamilyRegistry safir;
     @Mock private SubsequentAddressFamilyRegistry safirException;
-    private final ByteBuf serializedBytes = Unpooled.copiedBuffer(new byte[] {1, 4, 1, 4, 0, 4});
 
     @Before
     public void setUp() {
diff --git a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerActivator.java b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/BGPExtensionConsumerActivator.java
deleted file mode 100644 (file)
index f01bbd3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.parser.spi;
-
-public interface BGPExtensionConsumerActivator {
-    void start(BGPExtensionConsumerContext context);
-
-    void stop();
-}
\ No newline at end of file
index eaf3ee8b46f6511315b891fad63d838e2dd1027f..363a932a2ed7c321e34a141f276badea66aecdba 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.protocol.bgp.parser.spi.pojo;
 
-import com.google.common.base.Preconditions;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import java.util.concurrent.atomic.AtomicReference;
@@ -147,18 +146,6 @@ public class SimpleBGPExtensionProviderContext extends SimpleBGPExtensionConsume
         return this.referenceCache;
     }
 
-    public final synchronized int getMaximumCachedObjects() {
-        return this.maximumCachedObjects;
-    }
-
-    public final synchronized void setMaximumCachedObjects(final int maximumCachedObjects) {
-        Preconditions.checkArgument(maximumCachedObjects >= 0);
-
-        final Cache<Object, Object> newCache = CacheBuilder.newBuilder().maximumSize(maximumCachedObjects).build();
-        newCache.putAll(this.cacheRef.get().asMap());
-        this.cacheRef.set(newCache);
-    }
-
     @Override
     public AutoCloseable registerExtendedCommunitySerializer(final Class<? extends ExtendedCommunity> extendedCommunityClass,
         final ExtendedCommunitySerializer serializer) {
index 272ce08200bbdf94d7c525e75c1066390c28610d..da0c276682e14b2d458277fb39e18ceca89ccacd 100644 (file)
@@ -417,11 +417,6 @@ public class BGPPeer implements BGPSessionListener, Peer, AutoCloseable, BGPPeer
         }
     }
 
-    @Override
-    public boolean isSessionActive() {
-        return this.session != null;
-    }
-
     @Override
     public synchronized byte[] getRawIdentifier() {
         return Arrays.copyOf(this.rawIdentifier, this.rawIdentifier.length);
@@ -439,10 +434,6 @@ public class BGPPeer implements BGPSessionListener, Peer, AutoCloseable, BGPPeer
         }
     }
 
-    public synchronized void registerRootRuntimeBean(final BGPPeerRuntimeRegistrator registrator) {
-        this.registrator = registrator;
-    }
-
     @Override
     public BgpSessionState getBgpSessionState() {
         if (this.session instanceof BGPSessionStats) {
index 9f3277539ff7cc4de86829a1e46f1b2daafaa3cd..2dad1f7475915868a68d59f16dadf1a646bfdfbe 100644 (file)
@@ -452,16 +452,6 @@ public class BGPSessionImpl extends SimpleChannelInboundHandler<Notification> im
         return this.channel != null && this.channel.isWritable();
     }
 
-    void schedule(final Runnable task) {
-        Preconditions.checkState(this.channel != null);
-        this.channel.eventLoop().submit(task);
-    }
-
-    @VisibleForTesting
-    protected synchronized void setLastMessageSentAt(final long lastMessageSentAt) {
-        this.lastMessageSentAt = lastMessageSentAt;
-    }
-
     @Override
     public synchronized BgpSessionState getBgpSessionState() {
         return this.sessionStats.getBgpSessionState();
diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPServerDispatcher.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPServerDispatcher.java
deleted file mode 100644 (file)
index 7325d6d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.rib.impl.spi;
-
-import io.netty.channel.ChannelFuture;
-import java.net.InetSocketAddress;
-import org.opendaylight.protocol.concepts.KeyMapping;
-
-/**
- * Dispatcher class for creating BGP server.
- */
-public interface BGPServerDispatcher {
-
-    /**
-     * Create new BGP server to accept incoming bgp connections (bound to provided socket address).
-     *
-     * @param peerRegistry BGP peer registry
-     * @param address server address
-     * @return ChannelFuture promising a server session
-     */
-    ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address);
-
-    /**
-     * Create new BGP server to accept incoming bgp connections (bound to provided socket address).
-     *
-     * @param peerRegistry BGP peer registry
-     * @param address server address
-     * @param keys KeyMapping
-     * @return ChannelFuture promising a server session
-     */
-    ChannelFuture createServer(BGPPeerRegistry peerRegistry, InetSocketAddress address, KeyMapping keys);
-}
diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPSessionProposal.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPSessionProposal.java
deleted file mode 100644 (file)
index 23b8fae..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.rib.impl.spi;
-
-/**
- * Interface that provides the initial acceptable session characteristics with which the session should be started.
- */
-public interface BGPSessionProposal {
-    /**
-     * Returns BGPSessionPreferences for this IP address.
-     *
-     * @return BGPSessionPreferences with acceptable session characteristics
-     */
-    BGPSessionPreferences getProposal();
-}
index 665bd09fdd2d9eb59cc087c1f4e48e02eaaeb3fe..537a578e2cab08554e06264903580467782cc5c4 100644 (file)
@@ -20,15 +20,8 @@ import org.opendaylight.protocol.bgp.rib.impl.stats.peer.route.PerTableTypeRoute
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey;
 import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/**
- * @author Kevin Wang
- */
 public final class BGPPeerStatsImpl implements BGPPeerStats {
-    private static final Logger LOG = LoggerFactory.getLogger(BGPPeerStatsImpl.class);
-
     private final Set<TablesKey> tablesKeySet;
     private final PerTableTypeRouteCounter adjRibInRouteCounters;
     private final PerTableTypeRouteCounter adjRibOutRouteCounters;
index acaf2674a20d70c17a6267ae3e59579d0e216ccb..07bdf06f8e7a08a7d7f8efad930c2d94465d18de 100644 (file)
@@ -17,9 +17,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * @author Kevin Wang
- */
 public final class PerTableTypeRouteCounter {
     private static final Logger LOG = LoggerFactory.getLogger(PerTableTypeRouteCounter.class);
 
@@ -63,15 +60,6 @@ public final class PerTableTypeRouteCounter {
         return this.counters.getOrDefault(Preconditions.checkNotNull(tablesKey), createCounter(tablesKey));
     }
 
-    /**
-     * Get the counter with given tablesKey
-     * @param tablesKey
-     * @return
-     */
-    public final UnsignedInt32Counter getCounter(@Nonnull final TablesKey tablesKey) {
-        return this.counters.get(Preconditions.checkNotNull(tablesKey));
-    }
-
     /**
      * Get the counter with given tablesKey.  Create an empty counter if it doesn't exist
      * This method will put the created empty counter back to map
index 4bdf2a6cff7368700a582e696bf131a812c5dcff..4b282a3894e08e6e955b988c2a8c5c9f4dde2138 100755 (executable)
@@ -24,7 +24,6 @@ public class BGPApplicationPeerModuleTest extends AbstractRIBImplModuleTest {
 
     private static final int EXP_INSTANCES = 8;
     private static final String INSTANCE_NAME = "application-peer-instance";
-    private static final String INSTANCE_NAME2 = "application-peer-instance-2";
     private static final String FACTORY_NAME = BGPApplicationPeerModuleFactory.NAME;
     private static final ApplicationRibId APP_RIB_ID = new ApplicationRibId("application-peer-test");
     private static final ApplicationRibId NEW_APP_RIB_ID = new ApplicationRibId("new-application-peer-name");
index 2b5f9b997fc794711855f0d7058022a2309b8628..0b82eb12e5ef3e66c1ba9a6a3ea39972b9603b03 100755 (executable)
@@ -173,13 +173,6 @@ public class BGPPeerModuleTest extends AbstractRIBImplModuleTest {
         return transaction.createModule(StrictBgpPeerRegistryModuleFactory.NAME, "peer-registry");
     }
 
-    private static BGPDispatcherImplModuleMXBean getBgpDispatcherImplModuleMXBean(final ConfigTransactionJMXClient transaction,
-            final BGPPeerModuleMXBean mxBean) {
-        final RIBImplModuleMXBean ribProxy = transaction.newMXBeanProxy(mxBean.getRib(), RIBImplModuleMXBean.class);
-        final ObjectName dispatcherON = ribProxy.getBgpDispatcher();
-        return transaction.newMXBeanProxy(dispatcherON, BGPDispatcherImplModuleMXBean.class);
-    }
-
     private CommitStatus createBgpPeerInstance() throws Exception {
         return createBgpPeerInstance(false);
     }
index c11e21dcd83a4cc1d3133312aed5a5ea6714ba75..f8090b4aa3f7a9cbc91d90871b45269850922617 100644 (file)
@@ -224,7 +224,7 @@ public class AbstractRIBTestSetup {
             b.addChild(Builders.leafBuilder().withNodeIdentifier(new NodeIdentifier(PREFIX_QNAME)).withValue(p).build());
 
             final DataTreeCandidateNode child = Mockito.mock(DataTreeCandidateNode.class);
-            Mockito.doReturn(createIdentifier(target, p)).when(child).getIdentifier();
+            Mockito.doReturn(createIdentifier(p)).when(child).getIdentifier();
             Mockito.doReturn(Optional.of(b.build())).when(child).getDataAfter();
             Mockito.doReturn(type).when(child).getModificationType();
             children.add(child);
@@ -234,7 +234,7 @@ public class AbstractRIBTestSetup {
         return col;
     }
 
-    public PathArgument createIdentifier(final YangInstanceIdentifier base, final Ipv4Prefix prefix) {
+    public PathArgument createIdentifier(final Ipv4Prefix prefix) {
         final NodeIdentifierWithPredicates routekey = new NodeIdentifierWithPredicates(Ipv4Route.QNAME, PREFIX_QNAME, prefix);
         return YangInstanceIdentifier.of(PREFIX_QNAME).node(routekey).getLastPathArgument();
     }
index e173a38820ce6373407212226ca493aa98f0582f..6e8f867adfe2978f522b1f065cb5bab19f6d19f8 100644 (file)
@@ -38,11 +38,6 @@ public final class SimpleSessionListener implements BGPSessionListener {
         return this.listMsg;
     }
 
-    @Override
-    public boolean isSessionActive() {
-        return getSession().isWritable();
-    }
-
     @Override
     public void markUptodate(final TablesKey tablesKey) {
         LOG.debug("Table marked as up-to-date {}", tablesKey);
index 11c82e26c509c9c34bd419e6bd3d9a132bd7e000..e50006587441d9578c119c0da1f73f3ce9ed95dc 100644 (file)
@@ -13,8 +13,6 @@ import com.google.common.eventbus.EventBus;
 import io.netty.buffer.Unpooled;
 
 import java.io.Closeable;
-import java.util.Arrays;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.annotation.concurrent.GuardedBy;
@@ -71,22 +69,6 @@ public final class BGPMock implements Closeable {
         return messages;
     }
 
-    public synchronized void insertConnectionLostEvent() {
-        this.insertMessage(CONNECTION_LOST_MAGIC_MSG);
-    }
-
-    public synchronized void insertMessages(final List<Notification> messages) {
-        for (final Notification message : messages) {
-            this.insertMessage(message);
-        }
-    }
-
-    @GuardedBy("this")
-    private void insertMessage(final Notification message) {
-        this.allPreviousBGPMessages.add(message);
-        this.eventBus.post(message);
-    }
-
     @Override
     public synchronized void close() {
         // unregister all EventBusRegistration instances
@@ -96,24 +78,6 @@ public final class BGPMock implements Closeable {
         this.openRegistrations.clear();
     }
 
-    public boolean isMessageListSame(final List<byte[]> newMessages) {
-        if (this.allPreviousBGPMessages.size() != newMessages.size()) {
-            return false;
-        }
-        final Iterator<byte[]> i1 = this.allPreviousByteMessages.iterator();
-        final Iterator<byte[]> i2 = newMessages.iterator();
-        for (int i = 0; i < this.allPreviousBGPMessages.size(); i++) {
-            if (!Arrays.equals(i1.next(), i2.next())) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public EventBus getEventBus() {
-        return this.eventBus;
-    }
-
     public ListenerRegistration<BGPSessionListener> registerUpdateListener(final BGPSessionListener listener) {
         return EventBusRegistration.createAndRegister(this.eventBus, listener, this.allPreviousBGPMessages);
     }
index 0dfdef39611aff882dd1ef22b63116bc93bcefca..be65fb4e24e60cb3fb08dc8673b6b6ec6f722396 100644 (file)
@@ -17,13 +17,6 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  */
 public interface BGPSessionListener extends EventListener {
 
-    /**
-     * Returns state of BGP session associated with this listener.
-     *
-     * @return false if session associated with this listener is null, true if its non-null
-     */
-    boolean isSessionActive();
-
     /**
      * Marks synchronization finished for given Table key
      *
diff --git a/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBExtensionConsumerActivator.java b/bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RIBExtensionConsumerActivator.java
deleted file mode 100644 (file)
index 691737c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.bgp.rib.spi;
-
-public interface RIBExtensionConsumerActivator {
-    void startRIBExtensionConsumer(RIBExtensionConsumerContext context);
-
-    void stopRIBExtensionConsumer(RIBExtensionConsumerContext context);
-}
\ No newline at end of file
index f882a78e95d20c1bdc4aa1d6e541a7c88fabbcfa..2297de7525351d7af0e4f86ee5232e5179239199 100644 (file)
@@ -34,11 +34,6 @@ final class TestingListener implements BGPSessionListener {
         this.multiPathSupport = multiPathSupport;
     }
 
-    @Override
-    public boolean isSessionActive() {
-        return true;
-    }
-
     @Override
     public void markUptodate(final TablesKey tablesKey) {
         LOG.debug("Table marked as up-to-date {}", tablesKey);
index b6a6c668e984e02e664a2f04a4c71b55f822f0ec..f2db5a5b545f31b7657f323b657d214311dd0bde 100644 (file)
@@ -9,14 +9,11 @@ package org.opendaylight.protocol.concepts;
 
 import static com.google.common.base.Strings.isNullOrEmpty;
 
-import com.google.common.base.Optional;
 import java.net.InetAddress;
 import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
-import java.util.Map;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.rfc2385.cfg.rev160324.Rfc2385Key;
 
 public final class KeyMapping extends HashMap<InetAddress, byte[]> {
     private static final long serialVersionUID = 1L;
@@ -25,18 +22,6 @@ public final class KeyMapping extends HashMap<InetAddress, byte[]> {
         super();
     }
 
-    private KeyMapping(final int initialCapacity, final float loadFactor) {
-        super(initialCapacity, loadFactor);
-    }
-
-    private KeyMapping(final int initialCapacity) {
-        super(initialCapacity);
-    }
-
-    private KeyMapping(final Map<? extends InetAddress, ? extends byte[]> m) {
-        super(m);
-    }
-
     public static KeyMapping getKeyMapping(@Nonnull final InetAddress inetAddress, @Nullable final String password){
         if (!isNullOrEmpty(password)) {
             final KeyMapping keyMapping = new KeyMapping();
@@ -50,11 +35,4 @@ public final class KeyMapping extends HashMap<InetAddress, byte[]> {
         final KeyMapping keyMapping = new KeyMapping();
         return keyMapping;
     }
-
-    public static KeyMapping getKeyMapping(@Nonnull final InetAddress inetAddress, final Optional<Rfc2385Key> password){
-        if (password.isPresent()) {
-            return getKeyMapping(inetAddress, password.get().getValue());
-        }
-        return null;
-    }
 }
index d84db397585ef497f632cbee05350f97a1b4d7ae..dbc6b7b03ea5847489a763ed1d7dafe0315a505d 100644 (file)
@@ -15,17 +15,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
  * Factory for generating PCEP Session proposals. Used by a server.
  */
 public interface PCEPSessionProposalFactory {
-
-    /**
-     * Returns one session proposal that is registered to this factory
-     *
-     * @param address serves as constraint, so that factory is able to return different proposals for different
-     *        addresses
-     * @param sessionId is used for creation of PCEPOpenObject
-     * @return specific session proposal
-     */
-    Open getSessionProposal(InetSocketAddress address, int sessionId);
-
     /**
      *
      * @param address serves as constraint, so that factory is able to return different proposals for different
index 5ab85a13b645b94de4abe7cf3ba038c63ee75aa8..dc11799a8c46ef21d821aa3532503f8dbfc3bdfe 100644 (file)
@@ -68,7 +68,7 @@ public class PCEPMonitoringRequestMessageParser extends PCEPRequestMessageParser
         }
         final PcreqMessageBuilder mBuilder = new PcreqMessageBuilder();
         mBuilder.setMonitoringRequest(monReq);
-        final List<Svec> svecs = getSvecs(objects, errors);
+        final List<Svec> svecs = getSvecs(objects);
         if (!svecs.isEmpty()) {
             mBuilder.setSvec(svecs);
         }
index 259829168dfc64a60a4042188068fbd1434e2f09..3f93e7e1e92ca886e1f29954ea6f13b06f860c97 100644 (file)
@@ -160,7 +160,7 @@ public class PCEPRequestMessageParser extends AbstractMessageParser {
         }
         final PcreqMessageBuilder mBuilder = new PcreqMessageBuilder();
         mBuilder.setMonitoringRequest(getMonitoring(objects));
-        final List<Svec> svecs = getSvecs(objects, errors);
+        final List<Svec> svecs = getSvecs(objects);
         if (!svecs.isEmpty()) {
             mBuilder.setSvec(svecs);
         }
@@ -176,7 +176,7 @@ public class PCEPRequestMessageParser extends AbstractMessageParser {
         return new PcreqBuilder().setPcreqMessage(mBuilder.build()).build();
     }
 
-    protected List<Svec> getSvecs(final List<Object> objects, final List<Message> errors) {
+    protected List<Svec> getSvecs(final List<Object> objects) {
         final List<Svec> svecList = new ArrayList<>();
         while (!objects.isEmpty()) {
             final SvecBuilder sBuilder = new SvecBuilder();
index 2ca7739113f7f5ea618f30c47025d68ceb428aa5..80476ff5212a5c215675a0a7fb2820f24044f18b 100644 (file)
@@ -32,8 +32,6 @@ public abstract class AbstractVendorSpecificTlvParser implements TlvParser, TlvS
 
     public static final int TYPE = 27;
 
-    protected static final int ENTERPRISE_NUM_LENGTH = 4;
-
     @Override
     public void serializeTlv(final Tlv tlv, final ByteBuf buffer) {
         Preconditions.checkArgument(tlv instanceof VsTlv, "Vendor Specific Tlv is mandatory.");
index 3ebc0130d5944b0bf95a5bd62d02896cb1b7a669..b76e3f89c28f0a9661127e32d3c33f73edf6c141 100644 (file)
@@ -12,12 +12,10 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 
 import com.google.common.collect.Lists;
-import com.google.common.primitives.Bytes;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import org.junit.Before;
index 22d76524fda0a337d9e98fb343d5fc7781528386..fcad92b22ab44a33afd37f2ee17c79a630f3dd11 100644 (file)
@@ -45,11 +45,6 @@ public final class BasePCEPSessionProposalFactory implements PCEPSessionProposal
         }
     }
 
-    @Override
-    public Open getSessionProposal(final InetSocketAddress address, final int sessionId) {
-        return getSessionProposal(address, sessionId, null);
-    }
-
     @Override
     public Open getSessionProposal(final InetSocketAddress address, final int sessionId,
             final PCEPPeerProposal peerProposal) {
@@ -71,14 +66,6 @@ public final class BasePCEPSessionProposalFactory implements PCEPSessionProposal
         return oBuilder.setTlvs(builder.build()).build();
     }
 
-    public int getKeepAlive() {
-        return this.keepAlive;
-    }
-
-    public int getDeadTimer() {
-        return this.deadTimer;
-    }
-
     @Override
     public List<PCEPCapability> getCapabilities() {
         return this.capabilities;
index 1031d87b7e6dce50d5f53c4c58efc6e2d8bbac45..7c9ee85a238895364f6224b4aaeffa320a0927f5 100644 (file)
@@ -12,10 +12,7 @@ import java.util.List;
 import org.opendaylight.protocol.pcep.PCEPSession;
 import org.opendaylight.protocol.pcep.PCEPSessionListener;
 import org.opendaylight.protocol.pcep.PCEPTerminationReason;
-import org.opendaylight.protocol.pcep.impl.spi.Util;
-import org.opendaylight.protocol.pcep.spi.PCEPErrors;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -31,25 +28,6 @@ public class MockPCE implements PCEPSessionListener {
 
     public boolean down = false;
 
-    public MockPCE() {
-    }
-
-    public void sendMessage(final Message msg) {
-        this.session.handleMessage(msg);
-    }
-
-    public void sendErrorMessage(final PCEPErrors value, final Open open) {
-        this.sendMessage(Util.createErrorMessage(value, open));
-    }
-
-    public List<Message> getListMsg() {
-        return this.listMsg;
-    }
-
-    public void addSession(final PCEPSessionImpl l) {
-        this.session = l;
-    }
-
     @Override
     public void onMessage(final PCEPSession session, final Message message) {
         this.listMsg.add(message);
index 7eb1a68d61efc1d1049a6098547bafefe72a4fde..69c40aa8a96c21a79274d1d01d3f8685b2ceff8e 100755 (executable)
@@ -19,7 +19,6 @@ import io.netty.channel.epoll.EpollEventLoopGroup;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.SocketChannel;
 import io.netty.channel.socket.nio.NioSocketChannel;
-import io.netty.util.concurrent.DefaultPromise;
 import io.netty.util.concurrent.EventExecutor;
 import io.netty.util.concurrent.Future;
 import io.netty.util.concurrent.GlobalEventExecutor;
@@ -80,8 +79,7 @@ public class PCEPDispatcherImplTest {
         this.disp2Spy = Mockito.spy(dispatcher2);
 
         this.pccMock = new PCCMock(new DefaultPCEPSessionNegotiatorFactory(sessionProposal, 0),
-                new PCEPHandlerFactory(msgReg), new DefaultPromise<PCEPSessionImpl>(
-                        GlobalEventExecutor.INSTANCE));
+                new PCEPHandlerFactory(msgReg));
     }
 
     @Test
@@ -188,11 +186,8 @@ public class PCEPDispatcherImplTest {
         private final PCEPHandlerFactory factory;
         private final EventExecutor executor;
         private final EventLoopGroup workerGroup;
-        private final EventLoopGroup bossGroup;
 
-        public PCCMock(final PCEPSessionNegotiatorFactory negotiatorFactory, final PCEPHandlerFactory factory,
-                final DefaultPromise<PCEPSessionImpl> defaultPromise) {
-            this.bossGroup = Preconditions.checkNotNull(new NioEventLoopGroup());
+        public PCCMock(final PCEPSessionNegotiatorFactory negotiatorFactory, final PCEPHandlerFactory factory) {
             this.workerGroup = Preconditions.checkNotNull(new NioEventLoopGroup());
             this.negotiatorFactory = Preconditions.checkNotNull(negotiatorFactory);
             this.factory = Preconditions.checkNotNull(factory);
diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/ServerSessionMock.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/ServerSessionMock.java
deleted file mode 100644 (file)
index 7f7a645..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.pcep.impl;
-
-import static org.mockito.Mockito.mock;
-import io.netty.channel.Channel;
-import io.netty.util.concurrent.Future;
-import io.netty.util.concurrent.GlobalEventExecutor;
-
-import org.opendaylight.protocol.pcep.PCEPCloseTermination;
-import org.opendaylight.protocol.pcep.PCEPSessionListener;
-import org.opendaylight.protocol.pcep.TerminationReason;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.OpenBuilder;
-
-public class ServerSessionMock extends PCEPSessionImpl {
-
-    private final MockPCE client;
-
-    public ServerSessionMock(final PCEPSessionListener listener, final PCEPSessionListener client) {
-        super(listener, 5, mock(Channel.class), new OpenBuilder().setKeepalive((short) 4).setDeadTimer((short) 9).setSessionId(
-                (short) 2).build(), new OpenBuilder().setKeepalive((short) 4).setDeadTimer((short) 9).setSessionId((short) 2).build());
-        this.client = (MockPCE) client;
-    }
-
-    @Override
-    public Future<Void> sendMessage(final Message msg) {
-        this.lastMessageSentAt = System.nanoTime();
-        this.client.onMessage(this, msg);
-        return GlobalEventExecutor.INSTANCE.newSucceededFuture(null);
-    }
-
-    @Override
-    public void close() {
-        this.client.onSessionTerminated(this, new PCEPCloseTermination(TerminationReason.UNKNOWN));
-    }
-}
index 0705b4aa55194f4e398784df89ed5d03572ffdbb..5d4ce11e81f5a15fb022e09a765256391f8a2ecf 100644 (file)
@@ -78,13 +78,6 @@ final class PCCSyncOptimization {
         return this.remoteLspDbVersion.getLspDbVersionValue();
     }
 
-    public boolean isRemoteLspDbVersionNull() {
-        if (this.remoteLspDbVersion == null) {
-            return true;
-        }
-        return false;
-    }
-
     private static LspDbVersion getLspDbVersion(final Tlvs openTlvs) {
         if (openTlvs != null) {
             final Tlvs3 tlvs3 = openTlvs.getAugmentation(Tlvs3.class);
index 1539456fb8457340277a3dbd4d19fa21db8b9684..98c765d47425adf08c31e1628d3fcdd8f345f79a 100644 (file)
@@ -18,15 +18,12 @@ import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.util.concurrent.Future;
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
 import org.opendaylight.protocol.pcep.PCEPCapability;
 import org.opendaylight.protocol.pcep.PCEPDispatcher;
 import org.opendaylight.protocol.pcep.PCEPSession;
diff --git a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/PCEPExtensionConsumerActivator.java b/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/PCEPExtensionConsumerActivator.java
deleted file mode 100644 (file)
index 2e8e800..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.pcep.spi;
-
-public interface PCEPExtensionConsumerActivator {
-    void start(PCEPExtensionConsumerContext context);
-
-    void stop();
-}
\ No newline at end of file
index 3380dc7f3b360397146b1236f6f5ceb2f20ba939..6cda92f8cb336d78cca18918d12960015acb198f 100755 (executable)
@@ -498,10 +498,6 @@ public abstract class AbstractTopologySessionListener<S, L> implements PCEPSessi
         return this.pccIdentifier.child(ReportedLsp.class, new ReportedLspKey(name));
     }
 
-    protected final InstanceIdentifier<PathComputationClient> getPccIdentifier() {
-        return this.pccIdentifier;
-    }
-
     /**
      * Remove LSP from the database.
      *
index 9104abda11d6ddd303673e63cba772a199b8ec0a..1f0e3488c210edb66d06e872029935c0be3c381e 100644 (file)
@@ -72,10 +72,6 @@ final class TopologyNodeState implements AutoCloseable, TransactionChainListener
         }
     }
 
-    public synchronized void removeLspMetadata(final String name) {
-        metadata.remove(name);
-    }
-
     public synchronized void cleanupExcept(final Collection<String> values) {
         final Iterator<String> it = metadata.keySet().iterator();
         while (it.hasNext()) {
index 86f165cd996b48a2a14ae286cc03b7cb45be9dc6..c18ccfa28bc0b48ed4e54286f2ba3ebcad3a1b88 100644 (file)
@@ -11,7 +11,6 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import io.netty.channel.nio.NioEventLoopGroup;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Random;
 import javax.management.ObjectName;
index 3d21ff947ceaec417cc2cb6dc870025498675260..b316753f73e2049d87fa0e3f917ebce0a98f2c70 100644 (file)
@@ -11,7 +11,6 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import io.netty.channel.nio.NioEventLoopGroup;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import javax.management.ObjectName;
 import org.junit.Before;
index 69a8a864748223faf3d43d78eaa0de22dea3dd14..6a2eb86b49fd07067b56dbbfd992bad4b1b19eb1 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.protocol.rsvp.parser.spi.pojo;
 
-import com.google.common.base.Preconditions;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import java.util.concurrent.atomic.AtomicReference;
@@ -61,18 +60,6 @@ public class SimpleRSVPExtensionProviderContext extends SimpleRSVPExtensionConsu
         this.cacheRef = new AtomicReference<Cache<Object,Object>>(cache);
     }
 
-    public final synchronized int getMaximumCachedObjects() {
-        return this.maximumCachedObjects;
-    }
-
-    public final synchronized void setMaximumCachedObjects(final int maximumCachedObjects) {
-        Preconditions.checkArgument(maximumCachedObjects >= 0);
-
-        final Cache<Object, Object> newCache = CacheBuilder.newBuilder().maximumSize(maximumCachedObjects).build();
-        newCache.putAll(this.cacheRef.get().asMap());
-        this.cacheRef.set(newCache);
-    }
-
     @Override
     public ReferenceCache getReferenceCache() {
         return this.referenceCache;
index 5e5422db776d3d243bb3d775d9c391fdd96e2d85..d7337091e26e020e038502a94e4e023286129c26 100644 (file)
@@ -40,10 +40,6 @@ public final class ByteBufWriteUtil {
 
     public static final int IPV6_PREFIX_BYTE_LENGTH = Ipv6Util.IPV6_LENGTH + 1;
 
-    public static final int AFI_BYTES_LENGTH = 2;
-
-    public static final int SAFI_BYTES_LENGTH = 1;
-
     private ByteBufWriteUtil() {
         throw new UnsupportedOperationException();
     }