@Test public void test_NetworkElementsWrite_NoEP_Overwrite() throws Exception { writeBaseNetworkElements(); NetworkElements nes = createNetworkElements(NODE_ID_2, CONNECTOR_ID_2, L3_CONTEXT_ID, IP_V4_NETWORK_ADDRESS_1); InstanceIdentifier<NetworkElements> iid = InstanceIdentifier.builder(NetworkElements.class).build(); WriteTransaction wtx = dataBroker.newWriteOnlyTransaction(); wtx.put(LogicalDatastoreType.CONFIGURATION, iid, nes); wtx.submit().get(); NetworkElements networkElements = neProvider.getNetworkElements(); assertEquals(nes, networkElements); verifyEmptyLocations(); }
@VisibleForTesting synchronized NetworkElements getNetworkElements() { return networkElements; }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized NetworkElements getNetworkElements() { return networkElements; } }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized NetworkElements getNetworkElements() { return networkElements; } NeLocationProvider(DataBroker dataBroker); }
NeLocationProvider implements ClusteredDataTreeChangeListener<NetworkElements>, AutoCloseable { @VisibleForTesting synchronized NetworkElements getNetworkElements() { return networkElements; } 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 NetworkElements getNetworkElements() { return networkElements; } 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; }