@Test public void test_AddressEndpointModified_NoNE() throws Exception { writeBaseAddrEndpoint(); NetworkContainment nc = new NetworkContainmentBuilder().setContainment( new NetworkDomainContainmentBuilder().setNetworkDomainId(new NetworkDomainId(L3_CONTEXT_ID)).build()) .build(); InstanceIdentifier<NetworkContainment> iid = InstanceIdentifier .builder(Endpoints.class) .child(AddressEndpoints.class) .child(AddressEndpoint.class, new AddressEndpointKey(IP_V4_HOST_ADDRESS_1, IpPrefixType.class, new ContextId(L3_CONTEXT_ID), L3Context.class)) .child(NetworkContainment.class) .build(); WriteTransaction wtx = dataBroker.newWriteOnlyTransaction(); wtx.put(LogicalDatastoreType.OPERATIONAL, iid, nc); wtx.submit().get(); List<AddressEndpoint> l3Endpoint = neProvider.getEndpoints(); assertEquals(1, l3Endpoint.size()); assertNotNull(l3Endpoint.get(0).getNetworkContainment()); assertEquals(nc, l3Endpoint.get(0).getNetworkContainment()); verifyEmptyLocations(); }
@VisibleForTesting synchronized List<AddressEndpoint> getEndpoints() { return endpoints; }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized List<AddressEndpoint> getEndpoints() { return endpoints; } }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized List<AddressEndpoint> getEndpoints() { return endpoints; } NeLocationProvider(DataBroker dataBroker); }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized List<AddressEndpoint> getEndpoints() { return endpoints; } NeLocationProvider(DataBroker dataBroker); @Override void close(); synchronized void onEndpointsChange(Collection<DataTreeModification<AddressEndpoint>> changes); @Override synchronized void onDataTreeChanged(Collection<DataTreeModification<NetworkElements>> changes); }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized List<AddressEndpoint> getEndpoints() { return endpoints; } NeLocationProvider(DataBroker dataBroker); @Override void close(); synchronized void onEndpointsChange(Collection<DataTreeModification<AddressEndpoint>> changes); @Override synchronized void onDataTreeChanged(Collection<DataTreeModification<NetworkElements>> changes); static final String NE_LOCATION_PROVIDER_NAME; }