private static void mapIps(VmGuestAgentInterface vmGuestAgentInterface, ReportedDevice model) { List<String> ipv4 = vmGuestAgentInterface.getIpv4Addresses(); List<String> ipv6 = vmGuestAgentInterface.getIpv6Addresses(); if (ipv4 != null && !ipv4.isEmpty() || ipv6 != null && !ipv6.isEmpty()) { Ips ips = new Ips(); model.setIps(ips); addIpsByVersion(ips, ipv4, IpVersion.V4); addIpsByVersion(ips, ipv6, IpVersion.V6); } }
to.setIps(new Ips()); to.getIps().getIps().addAll(adaptIn(from.getIps().getIPs()));