@Test public void addIovisorResolvedEndpointTest() { Assert.assertNull(endpointManager.getResolvedEndpoints()); Assert.assertNull(endpointManager.getResolvedEndpointsByTenantByEpg(endpoint1.getTenant(), epgId1)); Assert.assertNull(iovisorModuleManager.getIovisorModulesByTenantByEpg(endpoint1.getTenant(), epgId1)); endpointManager.addIovisorResolvedEndpoint(endpoint1); Assert.assertTrue(endpointManager.isResolvedEndpoint(endpoint1.getL3Context(), endpoint1.getIpAddress())); Assert.assertFalse(endpointManager.isResolvedEndpoint(endpoint2.getL3Context(), endpoint2.getIpAddress())); Assert.assertTrue(endpointManager.getResolvedEndpoints().size() == 1); Assert.assertTrue(endpointManager.getResolvedEndpointsByTenantByEpg(endpoint1.getTenant(), epgId1).size() == 1); Assert.assertTrue(endpointManager.isResolvedEndpointByTenantByEpg(endpoint1.getL3Context(), endpoint1.getIpAddress(), endpoint1.getTenant(), epgId1)); Assert .assertTrue(iovisorModuleManager.getIovisorModulesByTenantByEpg(endpoint1.getTenant(), epgId1).size() == 1); Assert.assertTrue(iovisorModuleManager.getIovisorModulesByTenantByEpg(endpoint1.getTenant(), epgId1) .contains(iom1InstanceId)); endpointManager.addIovisorResolvedEndpoint(endpoint1); Assert.assertTrue(endpointManager.getResolvedEndpoints().size() == 1); Assert.assertTrue(endpointManager.getResolvedEndpointsByTenantByEpg(endpoint1.getTenant(), epgId1).size() == 1); Assert .assertTrue(iovisorModuleManager.getIovisorModulesByTenantByEpg(endpoint1.getTenant(), epgId1).size() == 1); }
@VisibleForTesting boolean addIovisorResolvedEndpoint(EndpointL3 endpoint) { WriteTransaction wTx = dataBroker.newWriteOnlyTransaction(); wTx = addToIovisorResolvedEndpointDatastore(endpoint, wTx); wTx = addToIovisorResolvedEndpointByTenantByEndpointgroupId(endpoint, wTx); wTx = addToIovisorModulesByTenantByEndpointgroupId(endpoint, wTx); return DataStoreHelper.submitToDs(wTx); }
EndpointManager implements AutoCloseable { @VisibleForTesting boolean addIovisorResolvedEndpoint(EndpointL3 endpoint) { WriteTransaction wTx = dataBroker.newWriteOnlyTransaction(); wTx = addToIovisorResolvedEndpointDatastore(endpoint, wTx); wTx = addToIovisorResolvedEndpointByTenantByEndpointgroupId(endpoint, wTx); wTx = addToIovisorModulesByTenantByEndpointgroupId(endpoint, wTx); return DataStoreHelper.submitToDs(wTx); } }
EndpointManager implements AutoCloseable { @VisibleForTesting boolean addIovisorResolvedEndpoint(EndpointL3 endpoint) { WriteTransaction wTx = dataBroker.newWriteOnlyTransaction(); wTx = addToIovisorResolvedEndpointDatastore(endpoint, wTx); wTx = addToIovisorResolvedEndpointByTenantByEndpointgroupId(endpoint, wTx); wTx = addToIovisorModulesByTenantByEndpointgroupId(endpoint, wTx); return DataStoreHelper.submitToDs(wTx); } EndpointManager(DataBroker passedDataBroker, EpRendererAugmentationRegistry epRendererAugmentationRegistry); }
EndpointManager implements AutoCloseable { @VisibleForTesting boolean addIovisorResolvedEndpoint(EndpointL3 endpoint) { WriteTransaction wTx = dataBroker.newWriteOnlyTransaction(); wTx = addToIovisorResolvedEndpointDatastore(endpoint, wTx); wTx = addToIovisorResolvedEndpointByTenantByEndpointgroupId(endpoint, wTx); wTx = addToIovisorModulesByTenantByEndpointgroupId(endpoint, wTx); return DataStoreHelper.submitToDs(wTx); } EndpointManager(DataBroker passedDataBroker, EpRendererAugmentationRegistry epRendererAugmentationRegistry); IovisorModuleManager getIovisorModuleManager(); void processEndpoint(EndpointL3 endpoint); @Override void close(); }
EndpointManager implements AutoCloseable { @VisibleForTesting boolean addIovisorResolvedEndpoint(EndpointL3 endpoint) { WriteTransaction wTx = dataBroker.newWriteOnlyTransaction(); wTx = addToIovisorResolvedEndpointDatastore(endpoint, wTx); wTx = addToIovisorResolvedEndpointByTenantByEndpointgroupId(endpoint, wTx); wTx = addToIovisorModulesByTenantByEndpointgroupId(endpoint, wTx); return DataStoreHelper.submitToDs(wTx); } EndpointManager(DataBroker passedDataBroker, EpRendererAugmentationRegistry epRendererAugmentationRegistry); IovisorModuleManager getIovisorModuleManager(); void processEndpoint(EndpointL3 endpoint); @Override void close();  }