Change in ovirt-engine[master]: restapi: Implement 'StorageDomainDisks' and 'AttachedStorage...

Code Review gerrit at ovirt.org
Thu Feb 9 10:14:43 UTC 2017


>From Juan Hernandez <juan.hernandez at redhat.com>:

Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Implement 'StorageDomainDisks' and 'AttachedStorageDomainDisks'
......................................................................


restapi: Implement 'StorageDomainDisks' and 'AttachedStorageDomainDisks'

Currently we use the same 'Disks' service definitions fo the following
disk collections:

  /disks
  /storagedomain/{sd:id}/disks
  /datacenters/{dc:id}/storagedomains/{sd:id}/disks

This is wrong, because most operations on disk are then available in
multiple places, and it prevents addition of new operations that only
make sense for disks that aren't yet part of the system. A good example
of this is the operation to register an unregistered disk. That only
makes sense for disks that appear in /storagedomains/{sd:id}/disks. To
improve the situation this patch implements the new 'StorageDomainDisks'
and 'AttachedStorageDomainDisk' that have been introduced in the
specification of the API by the following patch:

  Add 'StorageDomainDisks' and 'AttachedStorageDomainDisks'
  https://gerrit.ovirt.org/69634

After this, each collection will have its own service:

  /disks
  DisksService

  /storagedomain/{sd:id}/disks
  StorageDomainDisksService

  /datacenters/{dc:id}/storagedomains/{sd:id}/disks
  AttachedStorageDomainDisksService

These services will initially preserve most of the duplicated
operations, for backwards compatibility. Those duplicated operations
will be marked as deprecated, and removed in a future version of the
API.

Change-Id: I1021d75609a7b07e6ebea279dd4e91ed37973725
Related-To: https://bugzilla.redhat.com/1366960
Related-To: https://gerrit.ovirt.org/69634
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendStorageDomainDiskResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendStorageDomainDisksResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAttachedStorageDomainDiskResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAttachedStorageDomainDisksResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAttachedStorageDomainResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDataCenterHelper.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDiskResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDiskResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3AttachedStorageDomainDiskServer.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3AttachedStorageDomainDisksServer.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3AttachedStorageDomainServer.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3StorageDomainDiskServer.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3StorageDomainDisksServer.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3StorageDomainServer.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDiskResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResourceTest.java
M pom.xml
19 files changed, 685 insertions(+), 160 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests
  Maor Lipchuk: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/70587
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1021d75609a7b07e6ebea279dd4e91ed37973725
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list