Vinzenz Feenstra has posted comments on this change.

Change subject: Use FQDN from guest agent for RDP
......................................................................


Patch Set 8:

(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"/>
RdpUseFqdnIfAvailable is soley required for our RDP code to know that it should 
try to favour the FQDN value over an IP.
If someone wants to implement something on top of the REST API he wouldn't be 
affected at all by this. The FQDN value here is reported nevertheless. It's 
only in the frontend code where the decision is made if it should use FQDN or 
an IP.

So there is no need for RdpUseFqdnIfAvailable modeling for the rest api.
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());
The GuestInfo element is created if either IPs or FQDN are present. If both are 
false it won't create it.
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());
Done
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() : "");
Done
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

Reply via email to