Michael Pasternak has posted comments on this change. Change subject: restapi: add support to regenerate ids when adding vm from configuration ......................................................................
Patch Set 2: (2 comments) > the ovf used in that scenario already contains id > information, > the regenerate matrix parameters tell the engine to ignore > those id's and generate new ones - that's why "force" > won't suit here, even if the vm doesn't exist we might > want to generate new ids and not use the old ones (which > basically doesn't mean "force") - therefore it was > decided together with michael to use the "regenerate" > parameter (if you have other naming suggestion, i'd happily rename it :) ) > well it's not entirely correct, we did not agreed on 'regenerate', but that you need something more than 'force', but i think that mentioned use-case is not realistic, i.e why should user care about having id X and not Y, id is our implementation detail, we should only allow for user to re- create vm from same meta (as we do in import vm), therefore i'm still convinced that 'force' works for you. .................................................... File backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml Line 245: vm.initialization.configuration.data: 'xs:string' Line 246: vm.cpu.cpu_tune.vcpu_pin--COLLECTION: {vcpu_pin.vcpu: 'xs:int', vcpu_pin.cpu_set: 'xs:string'} Line 247: description: add a virtual machine to the system from a configuration - requires the configuration type and the configuration data Line 248: urlparams: Line 249: regenerate: {context: matrix, type: 'xs:boolean', value: true|false, required: false} i don't think that this is a good name Line 250: headers: Line 251: Content-Type: {value: application/xml|json, required: true} Line 252: Correlation-Id: {value: 'any string', required: false} Line 253: Expect: {value: 201-created, required: false} .................................................... File backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmsResourceTest.java Line 679: verifyModel((VM) response.getEntity(), 2); Line 680: } Line 681: Line 682: @Test Line 683: public void testAddFromConfiguration() throws Exception { i think he's right cause he check for matrix param in every request of create from ovf Line 684: setUriInfo(setUpGetMatrixConstraintsExpectations(BackendHostResource.REGENERATE_CONSTRAINT, Line 685: false, Line 686: "false", Line 687: setUpBasicUriExpectations(), -- To view, visit http://gerrit.ovirt.org/22207 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9ccf0f61b58ad49aa50d1efe3aa0b9a8bd31da70 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Juana Garcia <garciajuan...@gmail.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@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