@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
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;
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
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;
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);
}
}
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();
}
}
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)));
}
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>${guava.version}</version>
</dependency>
<!--
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>${guava.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@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,
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;
*/
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();
}
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
}
// 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);
}
// 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());
}
// 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());
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();
}
}
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);
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() {
// 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