@Test public void routerPortMac_noL3ContextId() { L3ContextBuilder contextBuilder = new L3ContextBuilder(); MacAddress result = utils.routerPortMac(contextBuilder.build(), new IpAddress(new Ipv4Address(IPV4_0)), buildTenant().getId()); assertEquals(result, DestinationMapper.ROUTER_MAC); }
MacAddress routerPortMac(L3Context l3c, IpAddress ipAddress, TenantId tenantId) { MacAddress defaultMacAddress = DestinationMapper.ROUTER_MAC; if (l3c.getId() != null) { EndpointL3 endpointL3 = ctx.getEndpointManager().getL3Endpoint(l3c.getId(), ipAddress, tenantId); if (endpointL3 == null || endpointL3.getMacAddress() == null) { return defaultMacAddress; } else { return endpointL3.getMacAddress(); } } else { return defaultMacAddress; } }
DestinationMapperUtils { MacAddress routerPortMac(L3Context l3c, IpAddress ipAddress, TenantId tenantId) { MacAddress defaultMacAddress = DestinationMapper.ROUTER_MAC; if (l3c.getId() != null) { EndpointL3 endpointL3 = ctx.getEndpointManager().getL3Endpoint(l3c.getId(), ipAddress, tenantId); if (endpointL3 == null || endpointL3.getMacAddress() == null) { return defaultMacAddress; } else { return endpointL3.getMacAddress(); } } else { return defaultMacAddress; } } }
DestinationMapperUtils { MacAddress routerPortMac(L3Context l3c, IpAddress ipAddress, TenantId tenantId) { MacAddress defaultMacAddress = DestinationMapper.ROUTER_MAC; if (l3c.getId() != null) { EndpointL3 endpointL3 = ctx.getEndpointManager().getL3Endpoint(l3c.getId(), ipAddress, tenantId); if (endpointL3 == null || endpointL3.getMacAddress() == null) { return defaultMacAddress; } else { return endpointL3.getMacAddress(); } } else { return defaultMacAddress; } } DestinationMapperUtils(OfContext ctx); }
DestinationMapperUtils { MacAddress routerPortMac(L3Context l3c, IpAddress ipAddress, TenantId tenantId) { MacAddress defaultMacAddress = DestinationMapper.ROUTER_MAC; if (l3c.getId() != null) { EndpointL3 endpointL3 = ctx.getEndpointManager().getL3Endpoint(l3c.getId(), ipAddress, tenantId); if (endpointL3 == null || endpointL3.getMacAddress() == null) { return defaultMacAddress; } else { return endpointL3.getMacAddress(); } } else { return defaultMacAddress; } } DestinationMapperUtils(OfContext ctx);  }
DestinationMapperUtils { MacAddress routerPortMac(L3Context l3c, IpAddress ipAddress, TenantId tenantId) { MacAddress defaultMacAddress = DestinationMapper.ROUTER_MAC; if (l3c.getId() != null) { EndpointL3 endpointL3 = ctx.getEndpointManager().getL3Endpoint(l3c.getId(), ipAddress, tenantId); if (endpointL3 == null || endpointL3.getMacAddress() == null) { return defaultMacAddress; } else { return endpointL3.getMacAddress(); } } else { return defaultMacAddress; } } DestinationMapperUtils(OfContext ctx);   }