5252 * Supported platform: Unified and Disaggregated
5353 */
5454public abstract class StorageStrategy {
55- @ Inject
56- private Utility utils ;
5755
5856 @ Inject
5957 private VolumeFeignClient volumeFeignClient ;
@@ -82,7 +80,7 @@ public StorageStrategy(OntapStorage ontapStorage) {
8280 public boolean connect () {
8381 s_logger .info ("Attempting to connect to ONTAP cluster at " + storage .getManagementLIF ());
8482 //Get AuthHeader
85- String authHeader = utils .generateAuthHeader (storage .getUsername (), storage .getPassword ());
83+ String authHeader = Utility .generateAuthHeader (storage .getUsername (), storage .getPassword ());
8684 String svmName = storage .getSvmName ();
8785 try {
8886 // Call the SVM API to check if the SVM exists
@@ -139,7 +137,7 @@ public Volume createStorageVolume(String volumeName, Long size) {
139137 throw new CloudRuntimeException ("No aggregates available to create volume on SVM " + svmName );
140138 }
141139 // Get the AuthHeader
142- String authHeader = utils .generateAuthHeader (storage .getUsername (), storage .getPassword ());
140+ String authHeader = Utility .generateAuthHeader (storage .getUsername (), storage .getPassword ());
143141
144142 // Generate the Create Volume Request
145143 Volume volumeRequest = new Volume ();
@@ -153,7 +151,7 @@ public Volume createStorageVolume(String volumeName, Long size) {
153151 // Make the POST API call to create the volume
154152 try {
155153 // Create URI for POST CreateVolume API
156- URI url = utils .generateURI (Constants .CREATE_VOLUME );
154+ URI url = Utility .generateURI (Constants .CREATE_VOLUME );
157155 // Call the VolumeFeignClient to create the volume
158156 JobResponse jobResponse = volumeFeignClient .createVolumeWithJob (url , authHeader , volumeRequest );
159157 if (jobResponse == null || jobResponse .getJob () == null ) {
@@ -162,7 +160,7 @@ public Volume createStorageVolume(String volumeName, Long size) {
162160 String jobUUID = jobResponse .getJob ().getUuid ();
163161
164162 //Create URI for GET Job API
165- url = utils .generateURI (Constants .GET_JOB_BY_UUID );
163+ url = Utility .generateURI (Constants .GET_JOB_BY_UUID );
166164 int jobRetryCount = 0 ;
167165 Job createVolumeJob = null ;
168166 while (createVolumeJob == null || !createVolumeJob .getState ().equals (Constants .JOB_SUCCESS )) {
@@ -199,7 +197,7 @@ public Volume createStorageVolume(String volumeName, Long size) {
199197 * Eligible only for Unified ONTAP storage
200198 * throw exception in case of disaggregated ONTAP storage
201199 *
202- * @param values
200+ * @param volume
203201 */
204202 public Volume updateStorageVolume (Volume volume )
205203 {
@@ -212,7 +210,7 @@ public Volume updateStorageVolume(Volume volume)
212210 * Eligible only for Unified ONTAP storage
213211 * throw exception in case of disaggregated ONTAP storage
214212 *
215- * @param values
213+ * @param volume
216214 */
217215 public void deleteStorageVolume (Volume volume )
218216 {
@@ -224,7 +222,7 @@ public void deleteStorageVolume(Volume volume)
224222 * Eligible only for Unified ONTAP storage
225223 * throw exception in case of disaggregated ONTAP storage
226224 *
227- * @param values
225+ * @param volume
228226 */
229227 public Volume getStorageVolume (Volume volume )
230228 {
@@ -238,7 +236,7 @@ public Volume getStorageVolume(Volume volume)
238236 * createLun for iSCSI, FC protocols
239237 * createFile for NFS3.0 and NFS4.1 protocols
240238 * createNameSpace for Nvme/TCP and Nvme/FC protocol
241- * @param values
239+ * @param cloudstackVolume
242240 */
243241 abstract public CloudStackVolume createCloudStackVolume (CloudStackVolume cloudstackVolume );
244242
@@ -248,7 +246,7 @@ public Volume getStorageVolume(Volume volume)
248246 * updateLun for iSCSI, FC protocols
249247 * updateFile for NFS3.0 and NFS4.1 protocols
250248 * updateNameSpace for Nvme/TCP and Nvme/FC protocol
251- * @param values
249+ * @param cloudstackVolume
252250 */
253251 abstract CloudStackVolume updateCloudStackVolume (CloudStackVolume cloudstackVolume );
254252
@@ -258,7 +256,7 @@ public Volume getStorageVolume(Volume volume)
258256 * deleteLun for iSCSI, FC protocols
259257 * deleteFile for NFS3.0 and NFS4.1 protocols
260258 * deleteNameSpace for Nvme/TCP and Nvme/FC protocol
261- * @param values
259+ * @param cloudstackVolume
262260 */
263261 abstract void deleteCloudStackVolume (CloudStackVolume cloudstackVolume );
264262
@@ -268,7 +266,7 @@ public Volume getStorageVolume(Volume volume)
268266 * getLun for iSCSI, FC protocols
269267 * getFile for NFS3.0 and NFS4.1 protocols
270268 * getNameSpace for Nvme/TCP and Nvme/FC protocol
271- * @param values
269+ * @param cloudstackVolume
272270 */
273271 abstract CloudStackVolume getCloudStackVolume (CloudStackVolume cloudstackVolume );
274272
@@ -277,7 +275,7 @@ public Volume getStorageVolume(Volume volume)
277275 * createiGroup for iSCSI and FC protocols
278276 * createExportPolicy for NFS 3.0 and NFS 4.1 protocols
279277 * createSubsystem for Nvme/TCP and Nvme/FC protocols
280- * @param values
278+ * @param accessGroup
281279 */
282280 abstract AccessGroup createAccessGroup (AccessGroup accessGroup );
283281
@@ -286,7 +284,7 @@ public Volume getStorageVolume(Volume volume)
286284 * deleteiGroup for iSCSI and FC protocols
287285 * deleteExportPolicy for NFS 3.0 and NFS 4.1 protocols
288286 * deleteSubsystem for Nvme/TCP and Nvme/FC protocols
289- * @param values
287+ * @param accessGroup
290288 */
291289 abstract void deleteAccessGroup (AccessGroup accessGroup );
292290
@@ -295,7 +293,7 @@ public Volume getStorageVolume(Volume volume)
295293 * updateiGroup example add/remove-Iqn for iSCSI and FC protocols
296294 * updateExportPolicy example add/remove-Rule for NFS 3.0 and NFS 4.1 protocols
297295 * //TODO for Nvme/TCP and Nvme/FC protocols
298- * @param values
296+ * @param accessGroup
299297 */
300298 abstract AccessGroup updateAccessGroup (AccessGroup accessGroup );
301299
@@ -304,7 +302,7 @@ public Volume getStorageVolume(Volume volume)
304302 * getiGroup for iSCSI and FC protocols
305303 * getExportPolicy for NFS 3.0 and NFS 4.1 protocols
306304 * getNameSpace for Nvme/TCP and Nvme/FC protocols
307- * @param values
305+ * @param accessGroup
308306 */
309307 abstract AccessGroup getAccessGroup (AccessGroup accessGroup );
310308
0 commit comments