Michael Pasternak has posted comments on this change.

Change subject: restapi : Placement policy template properties should be 
listed(#949285)
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
Line 2380:           template.type: xs:string
Line 2381:           template.stateless: 'xs:boolean'
Line 2382:           template.delete_protected: xs:boolean
Line 2383:           template.placement_policy.affinity: xs:string
Line 2384:           template.placement_policy.host.id|name: xs:string
what about adding this to update() signature?
Line 2385:           template.description: xs:string
Line 2386:           template.custom_properties.custom_property--COLLECTION: 
{custom_property.name: 'xs:string', custom_property.value: 'xs:string'}
Line 2387:           template.os.type: xs:string
Line 2388:           template.os.boot--COLLECTION: {boot.dev: 'xs:string'}


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplateResource.java
Line 54:             Host host = incoming.getPlacementPolicy().getHost();
Line 55:             if (host.isSetName() && !host.isSetId()) {
Line 56:                 host.setId(getHostId(host).toString());
Line 57:             }
Line 58:         }
you should be addressing here a isFiltered() flow (as being done in the 
vm.update())
Line 59:         return performUpdate(incoming,
Line 60:                              new 
QueryIdResolver<Guid>(VdcQueryType.GetVmTemplate, 
GetVmTemplateParameters.class),
Line 61:                              VdcActionType.UpdateVmTemplate,
Line 62:                              new UpdateParametersProvider());


....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/TemplateMapper.java
Line 355:         }
Line 356:         return null;
Line 357:     }
Line 358: 
Line 359:     public static void map(VmPlacementPolicy placementPolicy, 
VmStatic staticVm) {
can't you reuse these mappings form the VmMapper?
Line 360:         if (placementPolicy.isSetHost() && 
placementPolicy.getHost().isSetId()) {
Line 361:             
staticVm.setDedicatedVmForVds(GuidUtils.asGuid(placementPolicy.getHost().getId()));
Line 362:         }
Line 363:         if (placementPolicy.isSetAffinity()) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3ecaca8e07bed62861f8e1d3fa5a92071d06693d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to