Douglas Schilling Landgraf has posted comments on this change. Change subject: backend: getLdapServers() use getCanonicalHostName ......................................................................
Patch Set 2: (3 comments) .................................................... File backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java Line 482: result.add(ldapDnsResult.getAddresses()[counter]); Line 483: } Line 484: return result; Line 485: } else { Line 486: for (String host: argValue.split(DOMAIN_SEPERATOR)) { null, then entry into if (StringUtils.isEmpty(argValue)) {. Yes, tested it worked. Here my test: engine-manage-domains -action=add -domain=ad.local -user=doug -interactive -provider=ActiveDirectory Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); Line 490: } catch (UnknownHostException e) { Line 485: } else { Line 486: for (String host: argValue.split(DOMAIN_SEPERATOR)) { Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); I do believe yes (to get FQDN). Please correct me if I am wrong. getByName - Determines the IP address of a host, given the host's name. getCanonicalHostName - Gets the fully qualified domain name for this IP address. Line 490: } catch (UnknownHostException e) { Line 491: log.error("Cannot resolve FQDN: " + e.getMessage()); Line 492: } Line 493: } Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); Line 490: } catch (UnknownHostException e) { Line 491: log.error("Cannot resolve FQDN: " + e.getMessage()); Agreed. I have reduced to warn since the tool worked until here without it. Please let me know your thoughts. Line 492: } Line 493: } Line 494: } Line 495: return new ArrayList<String>(Arrays.asList(argValue.split(DOMAIN_SEPERATOR))); -- To view, visit http://gerrit.ovirt.org/19547 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibae81ccd6b2a402c856934839f1dbdad316bbc3d Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches