Change in ovirt-engine[master]: restapi: Add REST API support for iSCSI multipathing

mlipchuk at redhat.com mlipchuk at redhat.com
Wed Aug 20 21:58:57 UTC 2014


Maor Lipchuk has submitted this change and it was merged.

Change subject: restapi: Add REST API support for iSCSI multipathing
......................................................................


restapi: Add REST API support for iSCSI multipathing

Enable getting, creating, updating and removing iSCSI Bonds through REST
API including adding/removing a storage target (Engine term is storage
connection is a little bit misleading) and adding/removing a logical
network.
In case of storage target and network the "add" acts more like
"attach" because its adding an already existing target or/and network to
the iscsi bond.
Usages:
Creating a new iSCSI Bond:
POST /api/datacenters/{datacenter_id}/iscsibonds HTTP/1.1
Accept: application/xml
Content-type: application/xml
<iscsi_bond>
  <name>fromRest</name>
  <storage_connections>
    <storage_connection id={storageconnection_id} />
    ....
  </storage_connections>
  <networks>
    <network id={network_id} />
    ....
  </networks>
</iscsi_bond>
Updating an iSCSI Bond, only name and description can be editing that
way:
PUT /api/datacenters/{datacenter_id}/iscsibonds/{iscsibond_id}  HTTP/1.1
Accept: application/xml
Content-type: application/xml
<iscsi_bond>
        <name>{name}</name>
        <description>{description}</description>
</iscsi_bond>
Removing an iSCSI Bond:
DELETE /api/datacenters/{datacenter_id}/iscsibonds/{iscsibond_id}
HTTP/1.1
Getting all iSCSI Bonds for the specified datacenter:
GET /api/datacenters/{datacenter_id}/iscsibonds HTTP/1.1
Accept: application/xml
Content-type: application/xml

Change-Id: Id8881110cbeb163e9fc09e98bf4497d894f40490
Signed-off-by: Maor Lipchuk <mlipchuk at redhat.com>
Signed-off-by: Sergey Gotliv <sgotliv at redhat.com>
---
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNetworksByIscsiBondIdQuery.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetStorageServerConnectionByIscsiBondIdQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddIscsiBondCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddIscsiBondParameters.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/interfaces/SearchType.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/DataCenterResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/IscsiBondResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/IscsiBondsResource.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/LinkHelper.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDataCenterResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDataCentersResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondNetworkResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondNetworksResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondStorageConnectionsResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondStorageServerConnection.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/FeaturesHelper.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondNetworkResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondNetworksResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendIscsiBondsResourceTest.java
A backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/IscsiBondMapper.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/IscsiBondMapperTest.java
27 files changed, 1,139 insertions(+), 1 deletion(-)

Approvals:
  Maor Lipchuk: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8881110cbeb163e9fc09e98bf4497d894f40490
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list