import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.NodeIdentifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.TopologyIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.LinkstateRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.Attributes1;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.ObjectType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.attributes.attribute.type.link.LinkAttributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.attributes.attribute.type.node.NodeAttributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.attributes.attribute.type.prefix.PrefixAttributes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.object.type.Link;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.object.type.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes.linkstate.route.object.type.Prefix;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.LinkstateRoute;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.linkstate.route.Attributes1;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.linkstate.route.ObjectType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.linkstate.route.object.type.LinkCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.linkstate.route.object.type.NodeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.loc.rib.tables.routes.linkstate.routes._case.linkstate.routes.linkstate.route.object.type.PrefixCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.node.identifier.CRouterIdentifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.node.identifier.c.router.identifier.c.isis.node.IsisNode;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.node.identifier.c.router.identifier.c.isis.pseudonode.IsisPseudonode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.node.identifier.c.router.identifier.isis.node._case.IsisNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.node.identifier.c.router.identifier.isis.pseudonode._case.IsisPseudonode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.update.path.attributes.linkstate.path.attribute.link.state.attribute.link.attributes._case.LinkAttributes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.update.path.attributes.linkstate.path.attribute.link.state.attribute.node.attributes._case.NodeAttributes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.update.path.attributes.linkstate.path.attribute.link.state.attribute.prefix.attributes._case.PrefixAttributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.route.Attributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.Bandwidth;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IsoPseudonodeId;
return sb.toString();
}
- private LinkId buildLinkId(final String pfx, final Link link) {
+ private LinkId buildLinkId(final String pfx, final LinkCase link) {
final StringBuilder sb = new StringBuilder(pfx);
// FIXME: finish this
return new NodeId(sb.toString());
}
- private InstanceIdentifier<?> buildLinkIdentifier(final String pfx, final Link l) {
+ private InstanceIdentifier<?> buildLinkIdentifier(final String pfx, final LinkCase l) {
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();
return BigDecimal.valueOf(bandwidthToFloat(bandwidth));
}
- private static List<UnreservedBandwidth> unreservedBandwidthList(final List<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.UnreservedBandwidth> input) {
+ private static List<UnreservedBandwidth> unreservedBandwidthList(
+ final List<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.UnreservedBandwidth> input) {
final List<UnreservedBandwidth> ret = new ArrayList<>(input.size());
- for (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.UnreservedBandwidth i : input) {
- ret.add(new UnreservedBandwidthBuilder().
- setBandwidth(bandwidthToBigDecimal(i.getBandwidth())).
- setKey(new UnreservedBandwidthKey(i.getPriority())).build());
+ for (final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.UnreservedBandwidth i : input) {
+ ret.add(new UnreservedBandwidthBuilder().setBandwidth(bandwidthToBigDecimal(i.getBandwidth())).setKey(
+ new UnreservedBandwidthKey(i.getPriority())).build());
}
return ret;
}
-
- private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpLinkAttributes1 isisLinkAttributes(final TopologyIdentifier topologyIdentifier, final LinkAttributes la) {
- final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.link.attributes.isis.link.attributes.TedBuilder tb =
- new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.link.attributes.isis.link.attributes.TedBuilder();
+ private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpLinkAttributes1 isisLinkAttributes(
+ final TopologyIdentifier topologyIdentifier, final LinkAttributes la) {
+ final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.link.attributes.isis.link.attributes.TedBuilder tb = new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.link.attributes.isis.link.attributes.TedBuilder();
tb.setColor(la.getAdminGroup().getValue());
tb.setTeDefaultMetric(la.getTeMetric().getValue());
tb.setMaxResvLinkBandwidth(bandwidthToBigDecimal(la.getMaxReservableBandwidth()));
return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpLinkAttributes1Builder().setIsisLinkAttributes(
- new IsisLinkAttributesBuilder().setMultiTopologyId(topologyIdentifier.getValue().shortValue()).
- setTed(tb.build()).build()).build();
+ new IsisLinkAttributesBuilder().setMultiTopologyId(topologyIdentifier.getValue().shortValue()).setTed(tb.build()).build()).build();
}
-
- private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpLinkAttributes1 ospfLinkAttributes(final TopologyIdentifier topologyIdentifier, final LinkAttributes la) {
- final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.link.attributes.ospf.link.attributes.TedBuilder tb =
- new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.link.attributes.ospf.link.attributes.TedBuilder();
+ private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpLinkAttributes1 ospfLinkAttributes(
+ final TopologyIdentifier topologyIdentifier, final LinkAttributes la) {
+ final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.link.attributes.ospf.link.attributes.TedBuilder tb = new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.link.attributes.ospf.link.attributes.TedBuilder();
tb.setColor(la.getAdminGroup().getValue());
tb.setTeDefaultMetric(la.getTeMetric().getValue());
tb.setMaxResvLinkBandwidth(bandwidthToBigDecimal(la.getMaxReservableBandwidth()));
return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpLinkAttributes1Builder().setOspfLinkAttributes(
- new OspfLinkAttributesBuilder().
- setMultiTopologyId(topologyIdentifier.getValue().shortValue()).
- setTed(tb.build()).build()).build();
+ new OspfLinkAttributesBuilder().setMultiTopologyId(topologyIdentifier.getValue().shortValue()).setTed(tb.build()).build()).build();
}
- private void createLink(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkstateRoute value, final Link l, final Attributes attributes) {
+ private void createLink(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkstateRoute value,
+ final LinkCase l, final Attributes attributes) {
final LinkAttributes la = (LinkAttributes) attributes.getAugmentation(Attributes1.class).getAttributeType();
final IgpLinkAttributesBuilder ilab = new IgpLinkAttributesBuilder();
break;
case IsisLevel1:
case IsisLevel2:
- ilab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpLinkAttributes1.class, isisLinkAttributes(l.getLinkDescriptors().getMultiTopologyId(), la));
+ ilab.addAugmentation(
+ org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpLinkAttributes1.class,
+ isisLinkAttributes(l.getLinkDescriptors().getMultiTopologyId(), la));
break;
case Ospf:
- ilab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpLinkAttributes1.class, ospfLinkAttributes(l.getLinkDescriptors().getMultiTopologyId(), la));
+ ilab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpLinkAttributes1.class,
+ ospfLinkAttributes(l.getLinkDescriptors().getMultiTopologyId(), la));
break;
}
trans.putOperationalData(buildLinkIdentifier(pfx, l), lb.build());
}
- private void removeLink(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final Link l) {
+ private void removeLink(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkCase l) {
trans.removeOperationalData(buildLinkIdentifier(pfx, l));
}
- 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) {
+ 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()).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)));
}
- private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1 isisNodeAttributes(final NodeIdentifier node, final NodeAttributes na) {
- final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.node.attributes.isis.node.attributes.TedBuilder tb =
- new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.node.attributes.isis.node.attributes.TedBuilder();
+ private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1 isisNodeAttributes(
+ final NodeIdentifier node, final NodeAttributes na) {
+ final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.node.attributes.isis.node.attributes.TedBuilder tb = new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.isis.node.attributes.isis.node.attributes.TedBuilder();
if (na.getIpv4RouterId() != null) {
tb.setTeRouterIdIpv4(na.getIpv4RouterId());
}
ab.setTed(tb.build());
- return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1Builder().setIsisNodeAttributes(ab.build()).build();
+ return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1Builder().setIsisNodeAttributes(
+ ab.build()).build();
}
- private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1 ospfNodeAttributes(final NodeAttributes na) {
- final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.node.attributes.ospf.node.attributes.TedBuilder tb =
- new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.node.attributes.ospf.node.attributes.TedBuilder();
+ private org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1 ospfNodeAttributes(
+ final NodeAttributes na) {
+ final org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.node.attributes.ospf.node.attributes.TedBuilder tb = new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.ospf.node.attributes.ospf.node.attributes.TedBuilder();
final OspfNodeAttributesBuilder ab = new OspfNodeAttributesBuilder();
ab.setTed(tb.build());
- return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1Builder().setOspfNodeAttributes(ab.build()).build();
+ return new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1Builder().setOspfNodeAttributes(
+ ab.build()).build();
}
- private void createNode(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkstateRoute value, final Node n, final Attributes attributes) {
+ private void createNode(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkstateRoute value,
+ final NodeCase n, final Attributes attributes) {
final NodeAttributes na = (NodeAttributes) attributes.getAugmentation(Attributes1.class).getAttributeType();
-
final List<IpAddress> ids = new ArrayList<>();
if (na.getIpv4RouterId() != null) {
ids.add(new IpAddress(na.getIpv4RouterId()));
break;
case IsisLevel1:
case IsisLevel2:
- inab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1.class, isisNodeAttributes(n.getNodeDescriptors(), na));
+ inab.addAugmentation(
+ org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.isis.topology.rev131021.IgpNodeAttributes1.class,
+ isisNodeAttributes(n.getNode(), na));
break;
case Ospf:
- inab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1.class, ospfNodeAttributes(na));
+ inab.addAugmentation(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.ospf.topology.rev131021.IgpNodeAttributes1.class,
+ ospfNodeAttributes(na));
break;
}
final NodeBuilder nb = new NodeBuilder();
- nb.setNodeId(buildNodeId(pfx, n.getNodeDescriptors()));
- nb.addAugmentation(Node1.class, new Node1Builder().setIgpNodeAttributes(
- inab.build()).build());
+ nb.setNodeId(buildNodeId(pfx, n.getNode()));
+ nb.addAugmentation(Node1.class, new Node1Builder().setIgpNodeAttributes(inab.build()).build());
- trans.putOperationalData(nodeIdentifierBuilder(pfx, n.getNodeDescriptors()).toInstance(), nb.build());
+ trans.putOperationalData(nodeIdentifierBuilder(pfx, n.getNode()).toInstance(), nb.build());
}
- private void removeNode(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final Node n) {
- trans.removeOperationalData(nodeIdentifierBuilder(pfx, n.getNodeDescriptors()).toInstance());
+ private void removeNode(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final NodeCase n) {
+ trans.removeOperationalData(nodeIdentifierBuilder(pfx, n.getNode()).toInstance());
}
- private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.igp.node.attributes.Prefix>
- prefixIdentifier(final String pfx, final Prefix p) {
- return nodeIdentifierBuilder(pfx, p.getAdvertisingNodeDescriptors()).
- augmentation(Node1.class).
- child(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.IgpNodeAttributes.class).
- child(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.igp.node.attributes.Prefix.class,
- new PrefixKey(p.getIpReachabilityInformation())).toInstance();
+ private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.igp.node.attributes.Prefix> prefixIdentifier(
+ final String pfx, final PrefixCase p) {
+ return nodeIdentifierBuilder(pfx, p.getAdvertisingNodeDescriptors()).augmentation(Node1.class).child(
+ org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.IgpNodeAttributes.class).child(
+ org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.nt.l3.unicast.igp.topology.rev131021.igp.node.attributes.igp.node.attributes.Prefix.class,
+ new PrefixKey(p.getIpReachabilityInformation())).toInstance();
}
- private void createPrefix(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final LinkstateRoute value, final Prefix p, final Attributes attributes) {
+ private void createPrefix(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx,
+ final LinkstateRoute value, final PrefixCase p, final Attributes attributes) {
final PrefixAttributes pa = (PrefixAttributes) attributes.getAugmentation(Attributes1.class).getAttributeType();
final PrefixBuilder pb = new PrefixBuilder();
case Unknown:
break;
case Ospf:
- pb.addAugmentation(Prefix1.class, new Prefix1Builder().setOspfPrefixAttributes(
- new OspfPrefixAttributesBuilder().setForwardingAddress(pa.getOspfForwardingAddress()).build()).build());
+ pb.addAugmentation(
+ Prefix1.class,
+ new Prefix1Builder().setOspfPrefixAttributes(
+ new OspfPrefixAttributesBuilder().setForwardingAddress(pa.getOspfForwardingAddress()).build()).build());
break;
}
trans.putOperationalData(prefixIdentifier(pfx, p), pb.build());
}
- private void removePrefix(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final Prefix p) {
+ private void removePrefix(final DataModification<InstanceIdentifier<?>, DataObject> trans, final String pfx, final PrefixCase p) {
trans.removeOperationalData(prefixIdentifier(pfx, p));
}
@Override
- protected void createObject(final DataModification<InstanceIdentifier<?>, DataObject> trans, final InstanceIdentifier<LinkstateRoute> id, final LinkstateRoute value) {
+ protected void createObject(final DataModification<InstanceIdentifier<?>, DataObject> trans,
+ final InstanceIdentifier<LinkstateRoute> id, final LinkstateRoute value) {
final String pfx = buildNamePrefix(value);
final ObjectType t = value.getObjectType();
- if (t instanceof Link) {
- createLink(trans, pfx, value, (Link)t, value.getAttributes());
- } else if (t instanceof Node) {
- createNode(trans, pfx, value, (Node)t, value.getAttributes());
- } else if (t instanceof Prefix) {
- createPrefix(trans, pfx, value, (Prefix)t, value.getAttributes());
+ if (t instanceof LinkCase) {
+ createLink(trans, pfx, value, (LinkCase) t, value.getAttributes());
+ } else if (t instanceof NodeCase) {
+ createNode(trans, pfx, value, (NodeCase) t, value.getAttributes());
+ } else if (t instanceof PrefixCase) {
+ createPrefix(trans, pfx, value, (PrefixCase) t, value.getAttributes());
} else {
throw new IllegalStateException("Unhandled object class " + t.getImplementedInterface());
}
}
@Override
- protected void removeObject(final DataModification<InstanceIdentifier<?>, DataObject> trans, final InstanceIdentifier<LinkstateRoute> id, final LinkstateRoute value) {
+ protected void removeObject(final DataModification<InstanceIdentifier<?>, DataObject> trans,
+ final InstanceIdentifier<LinkstateRoute> id, final LinkstateRoute value) {
final String pfx = buildNamePrefix(value);
final ObjectType t = value.getObjectType();
- if (t instanceof Link) {
- removeLink(trans, pfx, (Link)t);
- } else if (t instanceof Node) {
- removeNode(trans, pfx, (Node)t);
- } else if (t instanceof Prefix) {
- removePrefix(trans, pfx, (Prefix)t);
+ if (t instanceof LinkCase) {
+ removeLink(trans, pfx, (LinkCase) t);
+ } else if (t instanceof NodeCase) {
+ removeNode(trans, pfx, (NodeCase) t);
+ } else if (t instanceof PrefixCase) {
+ removePrefix(trans, pfx, (PrefixCase) t);
} else {
throw new IllegalStateException("Unhandled object class " + t.getImplementedInterface());
}