Merge "Fix a bunch of warnings"
authorDana Kutenicsova <dkutenic@cisco.com>
Thu, 21 Nov 2013 21:53:33 +0000 (21:53 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 Nov 2013 21:53:33 +0000 (21:53 +0000)
12 files changed:
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAdjRIBsIn.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/BGPImplTest.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractAdjRIBsIn.java
bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/topology/provider/bgp/AbstractTopologyBuilder.java
bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/topology/provider/bgp/LinkstateTopologyBuilder.java
concepts/pom.xml
integration-tests/pom.xml
pcep/topology-provider-config/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModule.java
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/ServerSessionManager.java
pcep/tunnel-provider/src/main/java/org/opendaylight/bgpcep/pcep/tunnel/provider/NodeChangedListener.java
pcep/tunnel-provider/src/main/java/org/opendaylight/bgpcep/pcep/tunnel/provider/PCEPTunnelTopologyProvider.java
pcep/tunnel-provider/src/main/java/org/opendaylight/bgpcep/pcep/tunnel/provider/TunnelProgramming.java

index 2ee9527e4d37e0610eb9293a29fd55a15d6e631b..081ea6eb7501504e266b47c4ec3779716051e85c 100644 (file)
@@ -83,7 +83,7 @@ final class LinkstateAdjRIBsIn extends AbstractAdjRIBsIn<CLinkstateDestination,
 
        @Override
        public InstanceIdentifier<?> identifierForKey(final InstanceIdentifier<Tables> basePath, final CLinkstateDestination key) {
-               return InstanceIdentifier.builder(basePath).node(LinkstateRoute.class, new LinkstateRouteKey(LinkstateNlriParser.serializeNlri(key))).toInstance();
+               return InstanceIdentifier.builder(basePath).child(LinkstateRoute.class, new LinkstateRouteKey(LinkstateNlriParser.serializeNlri(key))).toInstance();
        }
 
        @Override
index 086b1f6e9e619c8ece67f06f7c9890944ca0d4dd..22376d8ab3ab3b22b0b06a2e41ac144cc853645b 100644 (file)
@@ -23,7 +23,6 @@ import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.opendaylight.protocol.bgp.parser.BGPMessageFactory;
-import org.opendaylight.protocol.bgp.parser.BGPSession;
 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences;
index bc7ea2e51a3c69596167f63f6643a80550863d3c..3b59a2bf895387c69c1523c7d2fd5261e4397fb0 100644 (file)
@@ -122,7 +122,7 @@ public abstract class AbstractAdjRIBsIn<ID, DATA extends DataObject> implements
 
        protected AbstractAdjRIBsIn(final Comparator<PathAttributes> comparator, final TablesKey key) {
                this.comparator = Preconditions.checkNotNull(comparator);
-               this.basePath = InstanceIdentifier.builder().node(LocRib.class).child(Tables.class, key).toInstance();
+               this.basePath = InstanceIdentifier.builder(LocRib.class).child(Tables.class, key).toInstance();
        }
 
        @Override
index 03fd1c20b5d8f428602c7099c1e52a1a0f15db39..762d6660d7e47ced117a19fc5a888ef325b9d42d 100644 (file)
@@ -40,7 +40,7 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.JdkFutureAdapters;
 
 public abstract class AbstractTopologyBuilder<T extends Route> implements AutoCloseable, DataChangeListener, LocRIBListener, TopologyReference {
-       private static final InstanceIdentifier<LocRib> locRIBPath = InstanceIdentifier.builder().node(LocRib.class).toInstance();
+       private static final InstanceIdentifier<LocRib> locRIBPath = InstanceIdentifier.builder(LocRib.class).toInstance();
        private static final Logger LOG = LoggerFactory.getLogger(AbstractTopologyBuilder.class);
        private final InstanceIdentifier<Topology> topology;
        private final DataProviderService dataProvider;
@@ -48,7 +48,7 @@ public abstract class AbstractTopologyBuilder<T extends Route> implements AutoCl
 
        protected AbstractTopologyBuilder(final DataProviderService dataProvider, final TopologyId topologyId, final Class<T> idClass) {
                this.dataProvider = Preconditions.checkNotNull(dataProvider);
-               this.topology = InstanceIdentifier.builder().node(Topology.class, new TopologyKey(Preconditions.checkNotNull(topologyId))).toInstance();
+               this.topology = InstanceIdentifier.builder(Topology.class, new TopologyKey(Preconditions.checkNotNull(topologyId))).toInstance();
                this.idClass = Preconditions.checkNotNull(idClass);
        }
 
index c4f258411a0127f3397258024e24e38d734c2f23..098c21be26f2f25ce20ee492fdc4493710868102 100644 (file)
@@ -95,7 +95,7 @@ public final class LinkstateTopologyBuilder extends AbstractTopologyBuilder<Link
        }
 
        private InstanceIdentifier<?> buildLinkIdentifier(final String pfx, final Link l) {
-               return InstanceIdentifier.builder(getInstanceIdentifier()).node(
+               return InstanceIdentifier.builder(getInstanceIdentifier()).child(
                                org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link.class,
                                new LinkKey(buildLinkId(pfx, l))).toInstance();
        }
@@ -190,7 +190,7 @@ public final class LinkstateTopologyBuilder extends AbstractTopologyBuilder<Link
        }
 
        private InstanceIdentifierBuilder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> nodeIdentifierBuilder(final String pfx, final NodeIdentifier node) {
-               return InstanceIdentifier.builder(getInstanceIdentifier()).node(
+               return InstanceIdentifier.builder(getInstanceIdentifier()).child(
                                org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node.class,
                                new NodeKey(buildNodeId(pfx, node)));
        }
index 4be4606589c63f48601e3eea0695beae633e5e34..6394c43c64a913420fc6ce1887f82b474f8ced56 100644 (file)
@@ -35,7 +35,6 @@
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <version>${guava.version}</version>
         </dependency>
 
                 <!--
index 1cb735ab19a3006ee3d8525e0cec2c5a746d2d7d..164aff0fed3540a6cde8c611c8a0ec05bb19fd64 100644 (file)
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <version>${guava.version}</version>
             <scope>test</scope>
                </dependency>
         <dependency>
index 6aa323b4496e4ff0369a493d5eb8f2dbfc16abdc..1c3bce1b74b53571454a105f2ffdab07e940b741 100644 (file)
@@ -65,7 +65,7 @@ public final class PCEPTopologyProviderModule extends org.opendaylight.controlle
        @Override
        public java.lang.AutoCloseable createInstance() {
                final InstanceIdentifier<Topology> topology =
-                               InstanceIdentifier.builder().node(NetworkTopology.class).child(Topology.class, new TopologyKey(getTopologyId())).toInstance();
+                               InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, new TopologyKey(getTopologyId())).toInstance();
                final InetSocketAddress address = new InetSocketAddress(listenAddress(), getListenPort().getValue());
                try {
                        return PCEPTopologyProvider.create(getDispatcherDependency(), address,
index dd43709e9748c64abe2e1a63ecf02a963596a8de..05db074c25b9fac745c1ff3fdf6f8012ea59973e 100644 (file)
@@ -60,6 +60,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.PccSyncState;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.RemoveLspArgs;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.UpdateLspArgs;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.PathComputationClient;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.PathComputationClientBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.ReportedLsps;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.pcep.client.attributes.path.computation.client.ReportedLspsKey;
@@ -122,7 +123,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                         */
                        final NodeId id = new NodeId(pccId);
                        final NodeKey nk = new NodeKey(id);
-                       final InstanceIdentifier<Node> nti = InstanceIdentifier.builder(ServerSessionManager.this.topology).node(Node.class, nk).toInstance();
+                       final InstanceIdentifier<Node> nti = InstanceIdentifier.builder(ServerSessionManager.this.topology).child(Node.class, nk).toInstance();
 
                        final Node ret = new NodeBuilder().setKey(nk).setNodeId(id).build();
 
@@ -235,7 +236,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                private InstanceIdentifier<ReportedLsps> lspIdentifier(final SymbolicPathName name) {
-                       return InstanceIdentifier.builder(this.topologyAugment).node(ReportedLsps.class, new ReportedLspsKey(name.getPathName())).toInstance();
+                       return InstanceIdentifier.builder(this.topologyAugment).
+                                       child(PathComputationClient.class).
+                                       child(ReportedLsps.class, new ReportedLspsKey(name.getPathName())).toInstance();
                }
 
                @Override
@@ -403,8 +406,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                // Make sure there is no such LSP
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
-                               new ReportedLspsKey(input.getName())).toInstance();
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).
+                               child(PathComputationClient.class).
+                               child(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
                if (this.dataProvider.readOperationalData(lsp) != null) {
                        LOG.debug("Node {} already contains lsp {} at {}", input.getNode(), input.getName(), lsp);
                        return Futures.immediateFuture(OPERATION_UNSENT);
@@ -446,8 +450,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                // Make sure the LSP exists, we need it for PLSP-ID
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
-                               new ReportedLspsKey(input.getName())).toInstance();
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).
+                               child(PathComputationClient.class).
+                               child(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
                final ReportedLsps rep = (ReportedLsps) this.dataProvider.readOperationalData(lsp);
                if (rep == null) {
                        LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
@@ -473,8 +478,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                // Make sure the LSP exists
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
-                               new ReportedLspsKey(input.getName())).toInstance();
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).
+                               child(PathComputationClient.class).
+                               child(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
                final ReportedLsps rep = (ReportedLsps) this.dataProvider.readOperationalData(lsp);
                if (rep == null) {
                        LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
index a546d7d6d32c1441a92fdf084c00ac191d529899..12ff996d295ebbf542b8b6a02594233bcc2e1e0d 100644 (file)
@@ -318,6 +318,6 @@ public final class NodeChangedListener implements DataChangeListener {
        public static InstanceIdentifier<Link> linkIdentifier(final InstanceIdentifier<Topology> topology,
                        final NodeId node, final SymbolicPathName name) {
                return InstanceIdentifier.builder(topology).
-                               node(Link.class, new LinkKey(new LinkId(node.getValue() + "/lsp/" + name))).toInstance();
+                               child(Link.class, new LinkKey(new LinkId(node.getValue() + "/lsp/" + name))).toInstance();
        }
 }
index fd04a951908db752ec7255470ba3c1799d037a06..6d1f590c109c1a82f82fa03adceef0f11729352f 100644 (file)
@@ -33,7 +33,7 @@ public final class PCEPTunnelTopologyProvider implements AutoCloseable {
        public static PCEPTunnelTopologyProvider create(final DataProviderService dataProvider,
                        final InstanceIdentifier<Topology> sourceTopology, final TopologyId targetTopology) {
                final InstanceIdentifier<Topology> dst =
-                               InstanceIdentifier.builder().node(NetworkTopology.class).
+                               InstanceIdentifier.builder(NetworkTopology.class).
                                child(Topology.class, new TopologyKey(targetTopology)).toInstance();
                final NodeChangedListener ncl = new NodeChangedListener(dataProvider, dst);
 
index 37e5fb332c5789e90b62dce4404f5cab8bb77273..655f9c6ab1450499687bb0b75a0244860a6a3274 100644 (file)
@@ -102,8 +102,8 @@ public final class TunnelProgramming implements TopologyTunnelPcepProgrammingSer
                TpReader(final DataModificationTransaction t, final InstanceIdentifier<Topology> topo, final TpReference ref) {
                        this.t = Preconditions.checkNotNull(t);
 
-                       nii = InstanceIdentifier.builder(topo).node(Node.class, new NodeKey(ref.getNode())).toInstance();
-                       tii = InstanceIdentifier.builder(nii).node(TerminationPoint.class, new TerminationPointKey(ref.getTp())).toInstance();
+                       nii = InstanceIdentifier.builder(topo).child(Node.class, new NodeKey(ref.getNode())).toInstance();
+                       tii = InstanceIdentifier.builder(nii).child(TerminationPoint.class, new TerminationPointKey(ref.getTp())).toInstance();
                }
 
                private Node getNode() {
@@ -270,8 +270,7 @@ public final class TunnelProgramming implements TopologyTunnelPcepProgrammingSer
 
        // FIXME: topology programming utility class
        private InstanceIdentifier<Topology> topologyIdentifier(final TopologyInstructionInput input) {
-               return InstanceIdentifier.builder().
-                               node(NetworkTopology.class).child(Topology.class, new TopologyKey(input.getTopologyId())).toInstance();
+               return InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, new TopologyKey(input.getTopologyId())).toInstance();
        }
 
        // FIXME: tunnel programming utility class