Bug 1324866 - [RFE] Add rest API for getting unregistered disks from DB table and scan storage domain for unregistered disks
Summary: [RFE] Add rest API for getting unregistered disks from DB table and scan stor...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.0.0-alpha
: ---
Assignee: Maor
QA Contact: Aharon Canan
URL:
Whiteboard:
Depends On: 1138139
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-07 13:20 UTC by Maor
Modified: 2016-07-13 00:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Register unregistered disks from the Storage Domain Reason: The operation should reflect the GUI operation for register unregistered disks Result: To get the unregistered disks the user can use the following API: GET /storagedomain/{sd:id}/disks?unregistered=true Register a disk can be used as follow: POST /api/storagedomains/{sd:id}/disks;unregistered HTTP/1.1 Accept: application/xml Content-type: application/xml <disk id='{disk:id}'></disk>
Clone Of:
Environment:
Last Closed: 2016-04-13 10:48:09 UTC
oVirt Team: Storage
Embargoed:
amureini: ovirt-4.0.0?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 55964 0 master ABANDONED Add parameter for finding unregistered disks 2016-04-13 15:38:04 UTC

Description Maor 2016-04-07 13:20:25 UTC
Description of problem:
As part of the development of https://bugzilla.redhat.com/1138139 - Adding a button to import floating and unregistered disks.
two new flows was added in the GUI:
1. Get a list of unregistered disks from table unregistered_disks in the DB - Seen in sub tab "import disks"
2. Scan a storage domain for unregistered disks. - right click on Storage Domain and click on scan.

Those two actions should be added also through REST so that will be correlated with the GUI.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Maor 2016-04-13 10:48:09 UTC
Basically all the operations that should be supported for the user, which is register an unregistered disk, and fetch all the unregistered disks in the Storage Domain are already supported in the REST.

BZ1138139 is mainly GUI oriented and should not have any additional features which can't be provided by the REST today.

To get the unregistered disks the user can use the following API:
GET /storagedomain/{sd:id}/disks?unregistered=true

Register a disk can be used as follow:

POST /api/storagedomains/{sd:id}/disks;unregistered HTTP/1.1
Accept: application/xml
Content-type: application/xml

<disk id='{disk:id}'></disk>

based on this and after discussing this with Juan, there is no reason to add any logic/API in the REST, therefore closing the bug

Comment 2 Tahlia Richardson 2016-07-08 02:45:07 UTC
Hi Maor,
Since this is a feature that was available in 3.6, does it still require a release note for 4.0, or can I clear the requires_doc_text flag? 
(The REST API Guide includes the instructions for this, so documentation is covered).

Comment 3 Maor 2016-07-08 12:37:39 UTC
I'm not sure, the reason I thought a release note is required is to emphasis the reason why the REST API does not reflect the GUI "scan" option.
Allon what do you think?

Comment 4 Allon Mureinik 2016-07-11 14:14:45 UTC
This BZ definitely needs a release note. This BZ is all about adding new capabilities to the REST API to bring it up to par with the webadmin GUI. Actually, we had users specifically ask us where the REST API was for these new capabilities in 3.6, so now that we've provided it in 4.0 we'd like to highlight that.

The doctext given in the BZ (see comment 1) may be too detailed for a release note, though. I thin something like "with this release it's now possible to scan a storage domain for unregistered disks via the REST API, see section XYZ of the REST API Guide for details" would suffice. 

Tahlia - ultimately, it should be your call what gets a release note and what doesn't, and with what text, but I'd really like to see *something* about this RFE there.
Thanks!

Comment 5 Allon Mureinik 2016-07-11 14:18:22 UTC
(In reply to Allon Mureinik from comment #4)
> This BZ definitely needs a release note. This BZ is all about adding new
> capabilities to the REST API to bring it up to par with the webadmin GUI.
> Actually, we had users specifically ask us where the REST API was for these
> new capabilities in 3.6, so now that we've provided it in 4.0 we'd like to
> highlight that.
> 
> The doctext given in the BZ (see comment 1) may be too detailed for a
> release note, though. I thin something like "with this release it's now
> possible to scan a storage domain for unregistered disks via the REST API,
> see section XYZ of the REST API Guide for details" would suffice. 
> 
> Tahlia - ultimately, it should be your call what gets a release note and
> what doesn't, and with what text, but I'd really like to see *something*
> about this RFE there.
> Thanks!

Scratch all of that.
I had a completely different BZ in mind when answering this. I'm clearing the doctext flag, as Tahlia suggested in comment 2.

Comment 6 Tahlia Richardson 2016-07-13 00:27:55 UTC
Thanks Allon :)


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