Bug 960997 - [REST-API] add descriptions to import vm/template SD source/destination params in RSDL
[REST-API] add descriptions to import vm/template SD source/destination param...
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.2.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.4.0
Assigned To: Ravi Nori
Barak Dagan
virt
:
: 961352 (view as bug list)
Depends On:
Blocks: 949642
  Show dependency treegraph
 
Reported: 2013-05-08 09:37 EDT by Barak Dagan
Modified: 2015-09-22 09 EDT (History)
12 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-beta3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-20 08:44:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine log (1.77 KB, application/x-gzip)
2013-05-08 09:37 EDT, Barak Dagan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 24126 None None None Never
oVirt gerrit 24191 None None None Never

  None (edit)
Description Barak Dagan 2013-05-08 09:37:19 EDT
Created attachment 745252 [details]
engine log

Description of problem:
import vm action fails due to missing storage domain type. However that parameter is missing both in automatic completion and in the RSDL file, therefore the action can't be completed.

Version-Release number of selected component (if applicable):
SF15

How reproducible:
100%

Steps to Reproduce:

[RHEVM shell (connected)]# action vm Migrations_VM-0 export --storage_domain-name export

id                 : ba2cf2da-55f4-400e-bcec-ddaa64b8476e
async              : True
status-state       : pending
storage_domain-name: export


[RHEVM shell (connected)]# remove vm Migrations_VM-0

accepted.


[RHEVM shell (connected)]# list vms --storagedomain-identifier 95c9ab87-1386-4904-b27d-1d26714704a7

id         : 954b1f6e-b2ea-4c08-a95e-6182084be971
name       : Migrations_VM-1

id         : 46165888-5b2e-449d-8faa-5c0fe43613a2
name       : test3

id         : bae28aa8-6c26-415a-bce4-b72a2dda1688
name       : Migrations_VM-0

id         : d658c1c5-cbcd-4b72-8ba0-1bb2a27ead88
name       : Migrations_VM-2


[RHEVM shell (connected)]# action vm bae28aa8-6c26-415a-bce4-b72a2dda1688 import_vm --storagedomain-identifier 95c9ab87-1386-4904-b27d-1d26714704a7 --cluster-name Migrations_DC1_CL1 --storage_domain-name export --async False


error: 
status: 400
reason: Bad Request
detail: Cannot import VM. Storage Domain type not specified.


  
Actual results:
operation fails

Expected results:
Expecting to have such an option / or remove the error in order to make  the operation success

Additional info:
Comment 2 Michael Pasternak 2013-05-09 09:47:02 EDT
Barak,

looks like you confused between destination and source storage domains,
can you check this please?
Comment 3 Barak Dagan 2013-05-09 11:16:36 EDT
Michael, 

You are right, I couldn't tell which is the source and which is the destination as one is called storagedomain-identifier and the other storage_domain-name.

1) The Error has nothing to do with the action - storage domain type is not the issue.

2) The parameters names are confusing, should be storage_domain_source_name|id and storage_domain_dest_name|id 

3) I couldn't find the right usage under help action vm
Comment 4 Michael Pasternak 2013-05-12 02:34:34 EDT
(In reply to comment #3)
> Michael, 
> 
> You are right, I couldn't tell which is the source and which is the
> destination as one is called storagedomain-identifier and the other
> storage_domain-name.
> 
> 1) The Error has nothing to do with the action - storage domain type is not
> the issue.
> 
> 2) The parameters names are confusing, should be
> storage_domain_source_name|id and storage_domain_dest_name|id 
> 
> 3) I couldn't find the right usage under help action vm


the parameters names cannot be changed cause they are exposed/used like
this in api, #2 and #3 can be easily achieved by adding descriptions to these
params in RSDL
Comment 5 Michael Pasternak 2013-05-12 02:38:47 EDT
*** Bug 961352 has been marked as a duplicate of this bug. ***
Comment 6 Ayal Baron 2013-05-12 09:50:00 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Michael, 
> > 
> > You are right, I couldn't tell which is the source and which is the
> > destination as one is called storagedomain-identifier and the other
> > storage_domain-name.
> > 
> > 1) The Error has nothing to do with the action - storage domain type is not
> > the issue.
> > 
> > 2) The parameters names are confusing, should be
> > storage_domain_source_name|id and storage_domain_dest_name|id 
> > 
> > 3) I couldn't find the right usage under help action vm
> 
> 
> the parameters names cannot be changed cause they are exposed/used like

Right, but we can introduce a new API with proper names and mark the old one as  deprecated.

> this in api, #2 and #3 can be easily achieved by adding descriptions to these
> params in RSDL

This would be good as well for the transition period.
Comment 7 Sandro Bonazzola 2014-02-19 07:27:00 EST
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA
Comment 8 Shai Revivo 2014-02-20 08:44:05 EST
This bug was fixed and is slated to be in the upcoming version. As we are focusing our testing at this phase on severe bugs, this bug was closed without going through its verification step. If you think this bug should be verified by QE, please set its severity to high and move it back to ON_QA
Comment 9 Barak Dagan 2014-02-24 05:35:31 EST
Verified on ovirt-3.4.0-beta3:

new description in rsdl only (
/api/storagedomains/{storagedomain:id}/templates/{template:id}/import"):
"import the template from the export or data domain identified by storagedomain-identifier into the destination storage domain identified by storage_domain.id|name"
instead of 
"import the template from the export or data domain into the specified cluster"

for vms (/api/storagedomains/{storagedomain:id}/vms/{vm:id}/import):
"import the specified virtual machine from the source storagedomain identified by storagedomain-identifier into the destination storage domain identified by storage_domain.id|name"

However, the auto complete feature enable the source & then the destination, which make sense.

Note You need to log in before you can comment on or make changes to this bug.