@Test public void getEpNetworkContainment_getDomainIdFromEndpoint() { String domainId = "domainId"; EndpointBuilder endpointBuilder = buildEndpoint(IPV4_0, MAC_1, CONNECTOR_1); endpointBuilder.setNetworkContainment(new NetworkDomainId(domainId)); NetworkDomainId result = utils.getEPNetworkContainment(endpointBuilder.build(), getTestIndexedTenant()); assertEquals(result, new NetworkDomainId(domainId)); }
NetworkDomainId getEPNetworkContainment(Endpoint endpoint, IndexedTenant tenant) { if (endpoint.getNetworkContainment() != null) { return endpoint.getNetworkContainment(); } else if (tenant != null) { return tenant.getEndpointGroup(endpoint.getEndpointGroup()) .getNetworkDomain(); } else { return null; } }
DestinationMapperUtils { NetworkDomainId getEPNetworkContainment(Endpoint endpoint, IndexedTenant tenant) { if (endpoint.getNetworkContainment() != null) { return endpoint.getNetworkContainment(); } else if (tenant != null) { return tenant.getEndpointGroup(endpoint.getEndpointGroup()) .getNetworkDomain(); } else { return null; } } }
DestinationMapperUtils { NetworkDomainId getEPNetworkContainment(Endpoint endpoint, IndexedTenant tenant) { if (endpoint.getNetworkContainment() != null) { return endpoint.getNetworkContainment(); } else if (tenant != null) { return tenant.getEndpointGroup(endpoint.getEndpointGroup()) .getNetworkDomain(); } else { return null; } } DestinationMapperUtils(OfContext ctx); }
DestinationMapperUtils { NetworkDomainId getEPNetworkContainment(Endpoint endpoint, IndexedTenant tenant) { if (endpoint.getNetworkContainment() != null) { return endpoint.getNetworkContainment(); } else if (tenant != null) { return tenant.getEndpointGroup(endpoint.getEndpointGroup()) .getNetworkDomain(); } else { return null; } } DestinationMapperUtils(OfContext ctx);  }
DestinationMapperUtils { NetworkDomainId getEPNetworkContainment(Endpoint endpoint, IndexedTenant tenant) { if (endpoint.getNetworkContainment() != null) { return endpoint.getNetworkContainment(); } else if (tenant != null) { return tenant.getEndpointGroup(endpoint.getEndpointGroup()) .getNetworkDomain(); } else { return null; } } DestinationMapperUtils(OfContext ctx);   }