Eli Mesika has posted comments on this change.

Change subject: API: [RFE] Add PM Proxy Preferences
......................................................................


Patch Set 3: (4 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 2791:   </xs:complexType>
Line 2792: 
Line 2793:   <xs:element name="pm_proxy" type="PmProxy"/>
Line 2794:   <xs:complexType name="PmProxy">
Line 2795:    <xs:sequence>
propietary reflects PmProxyType

This was done since in post 3.2 we will have also engine and specific hosts as 
a proxy

<host>
    <power_management>
       <pm_proxies>
          <pm_proxy>
             <proprietary>cluster</proprietary>
          </pm_proxy>
         <pm_proxy>
             <proprietary>dc</proprietary>
          </pm_proxy>
       </pm_proxies>
    </power_management>
 </host>
Line 2796:      <xs:element name="propietary" type="xs:string" minOccurs="0" 
maxOccurs="1"/>
Line 2797:    </xs:sequence>
Line 2798:   </xs:complexType>


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
Line 573:                 version.getUsages().getUsages().add(usage.value());
Line 574:             }
Line 575:         }
Line 576:     }
Line 577: 
Done
Line 578: 
Line 579:     @Override
Line 580:     public CapabiliyResource getCapabilitiesSubResource(String id) {
Line 581:         return new BackendCapabilityResource(id, this);


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/HostValidator.java
Line 9: public class HostValidator implements Validator<Host> {
Line 10: 
Line 11:     @Override
Line 12:     public void validateEnums(Host host) {
Line 13:         if (host.isSetType()) {
Done
Line 14:             validateEnum(PmProxyType.class, host.getType(), true);
Line 15:         }
Line 16:     }


....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
Line 199:             model.setOptions(map(entity.getPmOptionsMap(), null));
Line 200:         }
Line 201:         if (entity.getPmProxyPreferences() != null) {
Line 202:                 PmProxies pmProxies = (model.getPmProxies() != null) 
? model.getPmProxies() : new PmProxies();
Line 203:                 pmProxies.getPmProxy().clear();
Done
Line 204:                 String[] proxies = 
StringUtils.split(entity.getPmProxyPreferences(), ",");
Line 205:                 for (String proxy : proxies) {
Line 206:                         PmProxy pmProxy = new PmProxy();
Line 207:                         pmProxy.setPropietary(proxy);


--
To view, visit http://gerrit.ovirt.org/9674
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If906312ecf028a5db1c9726a407a1643b6c000b7
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to