private Lisp getLispLocationFromSff(List<SffDataPlaneLocator> locations) { for (SffDataPlaneLocator location : locations) { DataPlaneLocator dpl = location.getDataPlaneLocator(); LocatorType lt = dpl.getLocatorType(); if (lt instanceof Lisp) { return (Lisp) lt; } } return null; }
public boolean containsLispAddress(ServiceFunctionForwarder serviceFunctionForwarder) { List<SffDataPlaneLocator> locations = serviceFunctionForwarder.getSffDataPlaneLocator(); for (SffDataPlaneLocator location : locations) { if (location.getDataPlaneLocator().getLocatorType() instanceof Lisp) { return true; } } return false; }
public Ip getSffIp(ServiceFunctionForwarder serviceFunctionForwarder) { if (serviceFunctionForwarder != null && serviceFunctionForwarder.getSffDataPlaneLocator() != null && serviceFunctionForwarder.getSffDataPlaneLocator().get(0) != null && serviceFunctionForwarder.getSffDataPlaneLocator().get(0).getDataPlaneLocator() != null) { return (Ip)serviceFunctionForwarder.getSffDataPlaneLocator().get(0) .getDataPlaneLocator().getLocatorType(); } else { LOG.info("getSffIp: ServiceFunctionForwarder is null"); return null; } }
if ((sffDpl.getDataPlaneLocator() != null) && sffDpl.getDataPlaneLocator().getLocatorType() != null) { Class<? extends DataContainer> locatorType = sffDpl.getDataPlaneLocator().getLocatorType().getImplementedInterface(); if (locatorType.isAssignableFrom(Ip.class)) { Ip ipPortLocator = (Ip) sffDpl.getDataPlaneLocator().getLocatorType(); IpAddress ipAddress = new IpAddress(ipPortLocator.getIp().getValue()); ip = ipAddress;
private ServiceFunctionForwarder findSffByIp(ServiceFunctionForwarders sffs, final IpAddress remoteIp) { List<ServiceFunctionForwarder> serviceFunctionForwarders = sffs.getServiceFunctionForwarder(); if (serviceFunctionForwarders != null && !serviceFunctionForwarders.isEmpty()) for (ServiceFunctionForwarder sff : serviceFunctionForwarders) { List<SffDataPlaneLocator> sffDataPlaneLocator = sff.getSffDataPlaneLocator(); for (SffDataPlaneLocator sffLocator : sffDataPlaneLocator) { LocatorType locatorType = sffLocator.getDataPlaneLocator().getLocatorType(); if (locatorType instanceof Ip) { Ip ip = (Ip) locatorType; if (ip.getIp().equals(remoteIp)) { return sff; } } } } return null; } }
DataPlaneLocator dpLocator = locator.getDataPlaneLocator(); LOG.debug("Found for SFF {} the locator {}", sffName, dpLocator); if (dpLocator.getLocatorType() instanceof Ip) { Ip sffLocator = (Ip) dpLocator.getLocatorType();
/** * This gets VxlanDataLocator * * @param sff - Service Function Forwarder * @return Ip */ public static Ip getSffVxlanDataLocator(ServiceFunctionForwarder sff) { List<SffDataPlaneLocator> dplList = sff.getSffDataPlaneLocator(); for (SffDataPlaneLocator dpl: dplList) { if (dpl.getDataPlaneLocator() != null && dpl.getDataPlaneLocator().getTransport() == VxlanGpe.class) { return (Ip) dpl.getDataPlaneLocator().getLocatorType(); } } return null; }
DataPlaneLocator dpLocator = locator.getDataPlaneLocator(); LOG.debug("Found for SFF {} the locator {}", sffName, dpLocator); if (dpLocator.getLocatorType() instanceof Ip) { Ip sffLocator = (Ip) dpLocator.getLocatorType();
&& (sffDataPlaneLocator.getDataPlaneLocator().getLocatorType() != null) && (sffDataPlaneLocator.getDataPlaneLocator().getLocatorType().getImplementedInterface() != null) && (sffDataPlaneLocator.getDataPlaneLocator() .getLocatorType() .getImplementedInterface() .getSimpleName() != null)) { .getLocatorType() .getImplementedInterface() .getSimpleName() break; case IP: Ip ipLocator = (Ip) sffDataPlaneLocator.getDataPlaneLocator().getLocatorType(); if (ipLocator.getIp() != null) { renderedServicePathFirstHopBuilder.setIp(ipLocator.getIp());