-
Notifications
You must be signed in to change notification settings - Fork 0
NFS Cloudstack volume and file and export policy utils #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5f71168
c88483a
e3c44ae
09caf90
aa14ab5
f89bb1b
fe19c55
e27fad2
e8062fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,65 +19,68 @@ | |||||
|
|
||||||
| package org.apache.cloudstack.storage.feign.client; | ||||||
|
|
||||||
| import feign.QueryMap; | ||||||
| import org.apache.cloudstack.storage.feign.model.ExportPolicy; | ||||||
| import org.apache.cloudstack.storage.feign.model.FileInfo; | ||||||
| import org.apache.cloudstack.storage.feign.model.response.OntapResponse; | ||||||
| import feign.Headers; | ||||||
| import feign.Param; | ||||||
| import feign.RequestLine; | ||||||
|
|
||||||
| //TODO: Proper URLs should be added in the RequestLine annotations below | ||||||
| import java.util.Map; | ||||||
|
|
||||||
| public interface NASFeignClient { | ||||||
|
|
||||||
| // File Operations | ||||||
| @RequestLine("GET /{volumeUuid}/files/{path}") | ||||||
| @RequestLine("GET /api/storage/volumes/{volumeUuid}/files/{path}") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| OntapResponse<FileInfo> getFileResponse(@Param("authHeader") String authHeader, | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath); | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath); | ||||||
|
|
||||||
| @RequestLine("DELETE /{volumeUuid}/files/{path}") | ||||||
| @RequestLine("DELETE /api/storage/volumes/{volumeUuid}/files/{path}") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| void deleteFile(@Param("authHeader") String authHeader, | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath); | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath); | ||||||
|
|
||||||
| @RequestLine("PATCH /{volumeUuid}/files/{path}") | ||||||
| @RequestLine("PATCH /api/storage/volumes/{volumeUuid}/files/{path}") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| void updateFile(@Param("authHeader") String authHeader, | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath, FileInfo fileInfo); | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath, | ||||||
| FileInfo fileInfo); | ||||||
|
|
||||||
| @RequestLine("POST /{volumeUuid}/files/{path}") | ||||||
| @RequestLine("POST /api/storage/volumes/{volumeUuid}/files/{path}") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| void createFile(@Param("authHeader") String authHeader, | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath, FileInfo file); | ||||||
| @Param("volumeUuid") String volumeUUID, | ||||||
| @Param("path") String filePath, | ||||||
| FileInfo file); | ||||||
|
|
||||||
| // Export Policy Operations | ||||||
| @RequestLine("POST /") | ||||||
| @Headers({"Authorization: {authHeader}", "return_records: {returnRecords}"}) | ||||||
| ExportPolicy createExportPolicy(@Param("authHeader") String authHeader, | ||||||
| @Param("returnRecords") boolean returnRecords, | ||||||
| @RequestLine("POST /api/protocols/nfs/export-policies") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| void createExportPolicy(@Param("authHeader") String authHeader, | ||||||
| ExportPolicy exportPolicy); | ||||||
|
|
||||||
| @RequestLine("GET /") | ||||||
| @RequestLine("GET /api/protocols/nfs/export-policies") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| OntapResponse<ExportPolicy> getExportPolicyResponse(@Param("authHeader") String authHeader); | ||||||
| OntapResponse<ExportPolicy> getExportPolicyResponse(@Param("authHeader") String authHeader, @QueryMap Map<String, Object> queryMap); | ||||||
|
|
||||||
| @RequestLine("GET /{id}") | ||||||
| @RequestLine("GET /api/protocols/nfs/export-policies/{id}") | ||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||
| OntapResponse<ExportPolicy> getExportPolicyById(@Param("authHeader") String authHeader, | ||||||
| @Param("id") String id); | ||||||
| ExportPolicy getExportPolicyById(@Param("authHeader") String authHeader, | ||||||
|
||||||
| ExportPolicy getExportPolicyById(@Param("authHeader") String authHeader, | |
| OntapResponse<ExportPolicy> getExportPolicyById(@Param("authHeader") String authHeader, |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,11 +18,15 @@ | |||||||||
| */ | ||||||||||
| package org.apache.cloudstack.storage.feign.client; | ||||||||||
|
|
||||||||||
| import feign.QueryMap; | ||||||||||
| import org.apache.cloudstack.storage.feign.model.Volume; | ||||||||||
| import org.apache.cloudstack.storage.feign.model.response.JobResponse; | ||||||||||
| import feign.Headers; | ||||||||||
| import feign.Param; | ||||||||||
| import feign.RequestLine; | ||||||||||
| import org.apache.cloudstack.storage.feign.model.response.OntapResponse; | ||||||||||
|
|
||||||||||
| import java.util.Map; | ||||||||||
|
|
||||||||||
| public interface VolumeFeignClient { | ||||||||||
|
|
||||||||||
|
|
@@ -38,8 +42,12 @@ public interface VolumeFeignClient { | |||||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||||||
| Volume getVolumeByUUID(@Param("authHeader") String authHeader, @Param("uuid") String uuid); | ||||||||||
|
|
||||||||||
| @RequestLine("GET /api/storage/volumes") | ||||||||||
| @Headers({"Authorization: {authHeader}"}) | ||||||||||
| OntapResponse<Volume> getVolume(@Param("authHeader") String authHeader, @QueryMap Map<String, Object> queryMap); | ||||||||||
|
|
||||||||||
| @RequestLine("PATCH /api/storage/volumes/{uuid}") | ||||||||||
| @Headers({"Accept: {acceptHeader}", "Authorization: {authHeader}"}) | ||||||||||
| JobResponse updateVolumeRebalancing(@Param("acceptHeader") String acceptHeader, @Param("uuid") String uuid, Volume volumeRequest); | ||||||||||
| @Headers({ "Authorization: {authHeader}"}) | ||||||||||
| JobResponse updateVolumeRebalancing(@Param("authHeader") String authHeader, @Param("uuid") String uuid, Volume volumeRequest); | ||||||||||
|
Comment on lines
+50
to
+51
|
||||||||||
| @Headers({ "Authorization: {authHeader}"}) | |
| JobResponse updateVolumeRebalancing(@Param("authHeader") String authHeader, @Param("uuid") String uuid, Volume volumeRequest); | |
| @Headers({ "Authorization: {authHeader}", "Accept: {acceptHeader}" }) | |
| JobResponse updateVolumeRebalancing(@Param("authHeader") String authHeader, @Param("acceptHeader") String acceptHeader, @Param("uuid") String uuid, Volume volumeRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excessive debug logging added throughout the decoder (lines 140-169). This level of verbose logging should be removed or converted to trace level before merging to production to avoid log pollution.