}
private void processCreatedEN(EndpointNetwork en, InstanceIdentifier<?> nodeIID,
- InstanceIdentifier<?> connectorIID, WriteTransaction wtx) {
+ String connectorIID, WriteTransaction wtx) {
for (AddressEndpoint endpoint : endpoints) {
if (endpoint.getContextType().isAssignableFrom(L3Context.class)
&& endpoint.getContextId().equals(en.getL3ContextId())
}
}
- private AbsoluteLocation createRealLocation(InstanceIdentifier<?> node, InstanceIdentifier<?> iface) {
+ private AbsoluteLocation createRealLocation(InstanceIdentifier<?> node, String iface) {
return new AbsoluteLocationBuilder()
.setLocationType(new ExternalLocationCaseBuilder().setExternalNodeMountPoint(node)
- .setExternalNodeConnector(iface.toString()).build()).build();
+ .setExternalNodeConnector(iface).build()).build();
}
private <T> List<T> nullToEmpty(@Nullable List<T> list) {
EndpointNetwork en = createEndpointNetwork(L3_CONTEXT_ID, IPv4_NETWORK_ADDRESS_2);
InstanceIdentifier<EndpointNetwork> iid = InstanceIdentifier.builder(NetworkElements.class)
.child(NetworkElement.class, new NetworkElementKey(createNetworkElementIid(NODE_ID_1)))
- .child(Interface.class, new InterfaceKey(createInterfaceIid(NODE_ID_1, CONNECTOR_ID_1)))
+ .child(Interface.class, new InterfaceKey(CONNECTOR_ID_1))
.child(EndpointNetwork.class, new EndpointNetworkKey(en.getKey()))
.build();
InstanceIdentifier<EndpointNetwork> removeIid =
InstanceIdentifier.builder(NetworkElements.class)
.child(NetworkElement.class, new NetworkElementKey(createNetworkElementIid(NODE_ID_1)))
- .child(Interface.class, new InterfaceKey(createInterfaceIid(NODE_ID_1, CONNECTOR_ID_1)))
+ .child(Interface.class, new InterfaceKey(CONNECTOR_ID_1))
.child(EndpointNetwork.class, new EndpointNetworkKey(
new IpPrefix(new Ipv4Prefix(IPv4_NETWORK_ADDRESS_1)),new ContextId(L3_CONTEXT_ID)))
.build();
writeBaseNetworkElements();
InstanceIdentifier<Interface> iid = InstanceIdentifier.builder(NetworkElements.class)
.child(NetworkElement.class, new NetworkElementKey(createNetworkElementIid(NODE_ID_1)))
- .child(Interface.class, new InterfaceKey(createInterfaceIid(NODE_ID_1, CONNECTOR_ID_1)))
+ .child(Interface.class, new InterfaceKey(CONNECTOR_ID_1))
.build();
WriteTransaction wtx = dataBroker.newWriteOnlyTransaction();
wtx.delete(LogicalDatastoreType.CONFIGURATION, iid);
.setAbsoluteLocation(new AbsoluteLocationBuilder()
.setLocationType(new ExternalLocationCaseBuilder()
.setExternalNodeMountPoint(createNetworkElementIid(NODE_ID_1))
- .setExternalNodeConnector(createInterfaceIid(
- NODE_ID_1, CONNECTOR_ID_1).toString())
+ .setExternalNodeConnector(CONNECTOR_ID_1)
.build())
.build())
.build()))
.setAbsoluteLocation(new AbsoluteLocationBuilder()
.setLocationType(new ExternalLocationCaseBuilder()
.setExternalNodeMountPoint(createNetworkElementIid(NODE_ID_1))
- .setExternalNodeConnector(createInterfaceIid(
- NODE_ID_1, CONNECTOR_ID_1).toString())
+ .setExternalNodeConnector(CONNECTOR_ID_1)
.build())
.build())
.build()))
.setAbsoluteLocation(new AbsoluteLocationBuilder()
.setLocationType(new ExternalLocationCaseBuilder()
.setExternalNodeMountPoint(createNetworkElementIid(NODE_ID_1))
- .setExternalNodeConnector(createInterfaceIid(
- NODE_ID_1, CONNECTOR_ID_1).toString())
+ .setExternalNodeConnector(CONNECTOR_ID_1)
.build())
.build())
.build()))
}
private Interface createInterface(String node, String iface, String l3c, String prefix) {
- return new InterfaceBuilder().setIid(createInterfaceIid(node, iface))
+ return new InterfaceBuilder().setIid(iface)
.setEndpointNetwork(Collections.singletonList(createEndpointNetwork(l3c, prefix)))
.build();
}