Alissa Bonas has uploaded a new change for review.

Change subject: restapi: allow storage conn deletion with no host
......................................................................

restapi: allow storage conn deletion with no host

Allow deletion of storage connection without specifying the host.
Before this change, deletion of storage connection required host id/name
in order to perform a disconnect operation as part of the connection
deletion.
This change allows deleting the connection from db without the need to
disconnect the host from it, since the connection could have been
created without connecting the host to it.
The option to delete connection and disconnect it via the host remains
supported as well.

Change-Id: I7cd9dcea95028e12872beb2496c4338654cfbdb4
Signed-off-by: Alissa Bonas <[email protected]>
---
M 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageServerConnectionsResource.java
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/17568/1

diff --git 
a/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageServerConnectionsResource.java
 
b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageServerConnectionsResource.java
index 14d48bf..fe6fc86 100644
--- 
a/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageServerConnectionsResource.java
+++ 
b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageServerConnectionsResource.java
@@ -31,12 +31,27 @@
     @Consumes({ ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, 
ApiMediaType.APPLICATION_X_YAML })
     public Response add(StorageConnection storageConnection);
 
+    /**
+     * Deletes the connection from db, and disconnects the specified host from 
it
+     * @param id
+     * @param host
+     * @return
+     */
     @DELETE
     @Consumes({ ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, 
ApiMediaType.APPLICATION_X_YAML })
     @Path("{id}")
     public Response remove(@PathParam("id") String id, Host host);
 
     /**
+     * Deletes the connection from db
+     * @param id
+     * @return
+     */
+    @DELETE
+    @Path("{id}")
+    public Response remove(@PathParam("id") String id);
+
+    /**
      * Sub-resource locator method, returns individual DataCenterResource on 
which the remainder of the URI is
      * dispatched.
      * @param id  the StorageDomain ID


-- 
To view, visit http://gerrit.ovirt.org/17568
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cd9dcea95028e12872beb2496c4338654cfbdb4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to