@Test public void test_AddressEndpointWrite_NoNE_Overwrite() throws Exception { writeBaseAddrEndpoint(); NetworkContainment nc = new NetworkContainmentBuilder().setContainment( new NetworkDomainContainmentBuilder().setNetworkDomainId(new NetworkDomainId(L3_CONTEXT_ID)).build()) .build(); AddressEndpoint endpoint = new AddressEndpointBuilder().setKey( new AddressEndpointKey(IP_V4_HOST_ADDRESS_1, IpPrefixType.class, new ContextId(L3_CONTEXT_ID), L3Context.class)).setNetworkContainment(nc).setTenant(TENANT).setEndpointGroup(DEFAULT_EPG).build(); InstanceIdentifier<AddressEndpoint> iid = IidFactory.addressEndpointIid(endpoint.getKey()); WriteTransaction wtx = dataBroker.newWriteOnlyTransaction(); wtx.put(LogicalDatastoreType.OPERATIONAL, iid, endpoint, true); wtx.submit().get(); List<AddressEndpoint> endpoints = neProvider.getEndpoints(); assertEquals(1, endpoints.size()); assertEquals(endpoint, endpoints.get(0)); 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; }