Michael Pasternak has posted comments on this change. Change subject: Use FQDN from guest agent for RDP ......................................................................
Patch Set 8: Code-Review-1 (4 comments) .................................................... File backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd Line 2296: Line 2297: <xs:complexType name="GuestInfo"> Line 2298: <xs:sequence> Line 2299: <xs:element ref="ips" minOccurs="0" maxOccurs="1"/> Line 2300: <xs:element name="fqdn" type="xs:string" minOccurs="0" maxOccurs="1"/> 1. no modelling for the RdpUseFqdnIfAvailable?, if you expose it, please do it in : <display> ... <use_fqdn>true|false</use_fqdn> ... </display> 2. please add entry in FeatureHelper describing this feature Line 2301: </xs:sequence> Line 2302: </xs:complexType> Line 2303: Line 2304: <xs:element name="vms" type="VMs"/> .................................................... File backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java Line 359: } Line 360: final boolean hasIps = entity.getVmIp() != null && !entity.getVmIp().isEmpty(); Line 361: final boolean hasFqdn = entity.getVmFQDN() != null && !entity.getVmFQDN().isEmpty(); Line 362: if (hasIps || hasFqdn) { Line 363: model.setGuestInfo(new GuestInfo()); you should create this element only if hasFqdn != false Line 364: model.getGuestInfo().setIps(new IPs()); Line 365: model.getGuestInfo().setFqdn(hasFqdn ? entity.getVmFQDN() : ""); Line 366: Line 367: if(hasIps){ Line 360: final boolean hasIps = entity.getVmIp() != null && !entity.getVmIp().isEmpty(); Line 361: final boolean hasFqdn = entity.getVmFQDN() != null && !entity.getVmFQDN().isEmpty(); Line 362: if (hasIps || hasFqdn) { Line 363: model.setGuestInfo(new GuestInfo()); Line 364: model.getGuestInfo().setIps(new IPs()); you should not create empty element of <ips/> if they not available, please move it to the if(hasIps){} clouse Line 365: model.getGuestInfo().setFqdn(hasFqdn ? entity.getVmFQDN() : ""); Line 366: Line 367: if(hasIps){ Line 368: for (String item : entity.getVmIp().split(" ")) { Line 361: final boolean hasFqdn = entity.getVmFQDN() != null && !entity.getVmFQDN().isEmpty(); Line 362: if (hasIps || hasFqdn) { Line 363: model.setGuestInfo(new GuestInfo()); Line 364: model.getGuestInfo().setIps(new IPs()); Line 365: model.getGuestInfo().setFqdn(hasFqdn ? entity.getVmFQDN() : ""); you should map backend value when it's available, otherwise this element should not be created Line 366: Line 367: if(hasIps){ Line 368: for (String item : entity.getVmIp().split(" ")) { Line 369: if (!item.equals("")) { -- To view, visit http://gerrit.ovirt.org/17709 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e7f8e46c6a71ccbfe9af9bf85271d7294b03526 Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@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