private String getSfDplIp(SfDataPlaneLocator sfDpl) { String sfIp = null; LocatorType sffLocatorType = sfDpl.getLocatorType(); Class<? extends DataContainer> implementedInterface = sffLocatorType.getImplementedInterface(); if (implementedInterface.equals(Ip.class)) { if (((IpPortLocator) sffLocatorType).getIp() != null) { sfIp = String.valueOf(((IpPortLocator) sffLocatorType).getIp().getValue()); } } return sfIp; }
private String getSfDplMac(SfDataPlaneLocator sfDpl) { String sfMac = null; LocatorType sffLocatorType = sfDpl.getLocatorType(); Class<? extends DataContainer> implementedInterface = sffLocatorType.getImplementedInterface(); LOG.debug("implementedInterface: {}", implementedInterface); // Mac/IP and possibly VLAN if (implementedInterface.equals(Mac.class)) { if (((MacAddressLocator) sffLocatorType).getMac() != null) { sfMac = ((MacAddressLocator) sffLocatorType).getMac().getValue(); } } return sfMac; }