1818 */
1919package org .apache .cloudstack .storage .feign .client ;
2020
21+ import feign .QueryMap ;
2122import org .apache .cloudstack .storage .feign .model .Igroup ;
23+ import org .apache .cloudstack .storage .feign .model .IscsiService ;
2224import org .apache .cloudstack .storage .feign .model .Lun ;
2325import org .apache .cloudstack .storage .feign .model .LunMap ;
2426import org .apache .cloudstack .storage .feign .model .response .OntapResponse ;
2527import feign .Headers ;
2628import feign .Param ;
2729import feign .RequestLine ;
2830import java .net .URI ;
31+ import java .util .Map ;
2932
3033//TODO: Proper URLs should be added in the RequestLine annotations below
3134public interface SANFeignClient {
35+ // iSCSI Service APIs
36+ @ RequestLine ("GET /api/protocols/san/iscsi/services" )
37+ @ Headers ({"Authorization: {authHeader}" })
38+ OntapResponse <IscsiService > getIscsiServices (@ Param ("authHeader" ) String authHeader , @ QueryMap Map <String , Object > queryMap );
3239
3340 // LUN Operation APIs
34- @ RequestLine ("POST /" )
35- @ Headers ({"Authorization: {authHeader}" , "return_records: {returnRecords}" })
36- OntapResponse <Lun > createLun (@ Param ("authHeader" ) String authHeader ,
37- @ Param ("returnRecords" ) boolean returnRecords ,
38- Lun lun );
41+ @ RequestLine ("POST /api/storage/luns?return_records={returnRecords}" )
42+ @ Headers ({"Authorization: {authHeader}" })
43+ OntapResponse <Lun > createLun (@ Param ("authHeader" ) String authHeader , @ Param ("returnRecords" ) boolean returnRecords , Lun lun );
3944
40- @ RequestLine ("GET /" )
45+ @ RequestLine ("GET /api/storage/luns " )
4146 @ Headers ({"Authorization: {authHeader}" })
42- OntapResponse <Lun > getLunResponse (@ Param ("authHeader" ) String authHeader );
47+ OntapResponse <Lun > getLunResponse (@ Param ("authHeader" ) String authHeader , @ QueryMap Map < String , Object > queryMap );
4348
4449 @ RequestLine ("GET /{uuid}" )
4550 @ Headers ({"Authorization: {authHeader}" })
@@ -54,36 +59,35 @@ OntapResponse<Lun> createLun(@Param("authHeader") String authHeader,
5459 void deleteLun (@ Param ("authHeader" ) String authHeader , @ Param ("uuid" ) String uuid );
5560
5661 // iGroup Operation APIs
57- @ RequestLine ("POST /" )
58- @ Headers ({"Authorization: {authHeader}" , "return_records: {returnRecords}" })
59- OntapResponse <Igroup > createIgroup (@ Param ("authHeader" ) String authHeader ,
60- @ Param ("returnRecords" ) boolean returnRecords ,
61- Igroup igroupRequest );
62+ @ RequestLine ("POST /api/protocols/san/igroups?return_records={returnRecords}" )
63+ @ Headers ({"Authorization: {authHeader}" })
64+ OntapResponse <Igroup > createIgroup (@ Param ("authHeader" ) String authHeader , @ Param ("returnRecords" ) boolean returnRecords , Igroup igroupRequest );
6265
63- @ RequestLine ("GET /" )
64- @ Headers ({"Authorization: {authHeader}" }) // TODO: Check this again, uuid should be part of the path?
65- OntapResponse <Igroup > getIgroupResponse (@ Param ("authHeader" ) String authHeader , @ Param ( "uuid" ) String uuid );
66+ @ RequestLine ("GET /api/protocols/san/igroups " )
67+ @ Headers ({"Authorization: {authHeader}" })
68+ OntapResponse <Igroup > getIgroupResponse (@ Param ("authHeader" ) String authHeader , @ QueryMap Map < String , Object > queryMap );
6669
6770 @ RequestLine ("GET /{uuid}" )
6871 @ Headers ({"Authorization: {authHeader}" })
6972 Igroup getIgroupByUUID (@ Param ("authHeader" ) String authHeader , @ Param ("uuid" ) String uuid );
7073
71- @ RequestLine ("DELETE /{uuid}" )
74+ @ RequestLine ("DELETE /api/protocols/san/igroups/ {uuid}" )
7275 @ Headers ({"Authorization: {authHeader}" })
73- void deleteIgroup (@ Param ("baseUri" ) URI baseUri , @ Param ( " authHeader" ) String authHeader , @ Param ("uuid" ) String uuid );
76+ void deleteIgroup (@ Param ("authHeader" ) String authHeader , @ Param ("uuid" ) String uuid );
7477
7578 // LUN Maps Operation APIs
76- @ RequestLine ("POST /" )
77- @ Headers ({"Authorization: {authHeader}" })
78- OntapResponse <LunMap > createLunMap (@ Param ("authHeader" ) String authHeader , LunMap lunMap );
79+ @ RequestLine ("POST /api/protocols/san/lun-maps" )
80+ @ Headers ({"Authorization: {authHeader}" , "return_records: {returnRecords}" })
81+ OntapResponse <LunMap > createLunMap (@ Param ("authHeader" ) String authHeader , @ Param ("returnRecords" ) boolean returnRecords , LunMap lunMap );
82+
7983
80- @ RequestLine ("GET /" )
84+ @ RequestLine ("GET /api/protocols/san/lun-maps " )
8185 @ Headers ({"Authorization: {authHeader}" })
82- OntapResponse <LunMap > getLunMapResponse (@ Param ("authHeader" ) String authHeader );
86+ OntapResponse <LunMap > getLunMapResponse (@ Param ("authHeader" ) String authHeader , @ QueryMap Map < String , Object > queryMap );
8387
84- @ RequestLine ("DELETE /{lunUuid}/{igroupUuid}" )
88+ @ RequestLine ("DELETE /api/protocols/san/lun-maps/ {lunUuid}/{igroupUuid}" )
8589 @ Headers ({"Authorization: {authHeader}" })
8690 void deleteLunMap (@ Param ("authHeader" ) String authHeader ,
87- @ Param ("lunUuid" ) String lunUuid ,
88- @ Param ("igroupUuid" ) String igroupUuid );
91+ @ Param ("lunUuid" ) String lunUUID ,
92+ @ Param ("igroupUuid" ) String igroupUUID );
8993}
0 commit comments