Michael Pasternak has posted comments on this change.
Change subject: resapi: adding support for moving a VM disk
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(4 inline comments)
please deprecate [1], and file guide bug to document that's
deprecated.
[1] /api/vms/{vm:id}/move|rel=move
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata_v-3.1.yaml
Line 366: request:
Line 367: body:
Line 368: parameterType: Action
Line 369: signatures:
Line 370: - mandatoryArguments: {storagedomain.host.id|name: 'xs:string'}
should be storagedomain.id|name
Line 371: optionalArguments: {action.async: 'xs:boolean'}
Line 372: urlparams: {}
Line 373: headers:
Line 374: Content-Type: {value: application/xml|json, required: true}
Line 367: body:
Line 368: parameterType: Action
Line 369: signatures:
Line 370: - mandatoryArguments: {storagedomain.host.id|name: 'xs:string'}
Line 371: optionalArguments: {action.async: 'xs:boolean'}
please add action.grace_period.expiry: 'xs:long', e.g
optionalArguments: {action.async: 'xs:boolean', action.grace_period.expiry:
'xs:long'}
Line 372: urlparams: {}
Line 373: headers:
Line 374: Content-Type: {value: application/xml|json, required: true}
Line 375: Correlation-Id: {value: 'any string', required: false}
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmDiskResource.java
Line 80: public Response move(Action action) {
Line 81: validateParameters(action, "storageDomain.id|name");
Line 82: MoveDisksParameters params =
Line 83: new MoveDisksParameters(Collections.singletonList(new
MoveDiskParameters(
Line 84: asGuid(get().getImageId()),
disk has image_id property, you do not need to run extra query to fetch it
Line 85: Guid.Empty,
Line 86: getStorageDomainId(action))));
Line 87: return doAction(VdcActionType.MoveDisks, params, action);
Line 88: }
Line 82: MoveDisksParameters params =
Line 83: new MoveDisksParameters(Collections.singletonList(new
MoveDiskParameters(
Line 84: asGuid(get().getImageId()),
Line 85: Guid.Empty,
Line 86: getStorageDomainId(action))));
won't work for no-admins as it uses search to fetch the SD when sd.name has
passed.
Line 87: return doAction(VdcActionType.MoveDisks, params, action);
Line 88: }
Line 89:
Line 90: @Override
--
To view, visit http://gerrit.ovirt.org/10676
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c864a81463388f8ac82eba6f909c5a4359efab6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches