Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: Add V3 creation server
......................................................................
restapi: Add V3 creation server
In version 3 of the API there is a `creation_status` resource that
reports the status of asynchronously created resources. For example,
when creating a snapshot the result is looks like this:
<snapshot id="456" href="/vms/123/snapshots/456">
...
<link rel="creation_status"
href="/vms/123/snapshots/456/creation_status/789"/>
...
</snapshot>
The link points to a resource that can be used to check the creation of
the snapshot, for example:
GET /vms/123/snapshots/456/creation_status/789
The result should be something like this:
<creation id="789"
href="vms/123/snapshots/456/creation_status/789">
<status>
<state>complete</state>
</status>
</creation>
The use of this is unreliable, as the operation may be synchronous or
asynchronous and return or not the status, depending on the
implementation details of the server.
The recommended way to check the status of the creation is to repeatedly
retrieve the snapshot and check its `snapshot_status` attribute.
However, we need to preserve the current behaviour in V3 of the API, and
currently this doesn't work, so we need to restore it.
Change-Id: Ife91560633294eae498522d19a189bfb11903028
Bug-Url:
https://bugzilla.redhat.com/1359139
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendResource.java
A
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/adapters/V3CreationInAdapter.java
A
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/adapters/V3CreationOutAdapter.java
A
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3CreationServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3DiskServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3InstanceTypeNicServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3InstanceTypeServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3InstanceTypeWatchdogServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3SnapshotServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3StorageDomainContentDiskServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3TemplateCdromServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3TemplateDiskServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3TemplateNicServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3TemplateServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3TemplateWatchdogServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmCdromServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmDiskServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmNicServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmPoolServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmServer.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmWatchdogServer.java
21 files changed, 234 insertions(+), 1 deletion(-)
Approvals:
Ori Liel: Looks good to me, approved
Juan Hernandez: Verified
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/61235
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ife91560633294eae498522d19a189bfb11903028
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ori Liel <oliel(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>