rajiv-jain-netapp commented on code in PR #13053:
URL: https://github.com/apache/cloudstack/pull/13053#discussion_r3136144002


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/utils/OntapStorageUtils.java:
##########
@@ -19,58 +19,137 @@
 
 package org.apache.cloudstack.storage.utils;
 
-import com.cloud.storage.ScopeType;
+import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.utils.StringUtils;
 import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import org.apache.cloudstack.storage.feign.model.Lun;
+import org.apache.cloudstack.storage.feign.model.LunSpace;
 import org.apache.cloudstack.storage.feign.model.OntapStorage;
+import org.apache.cloudstack.storage.feign.model.Svm;
 import org.apache.cloudstack.storage.provider.StorageProviderFactory;
 import org.apache.cloudstack.storage.service.StorageStrategy;
+import org.apache.cloudstack.storage.service.model.CloudStackVolume;
 import org.apache.cloudstack.storage.service.model.ProtocolType;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.springframework.util.Base64Utils;
-
-import java.nio.charset.StandardCharsets;
 import java.util.Map;
 
 public class OntapStorageUtils {
 
     private static final Logger logger = 
LogManager.getLogger(OntapStorageUtils.class);
-
     private static final String BASIC = "Basic";
     private static final String AUTH_HEADER_COLON = ":";
 
+    /**
+     * Method generates authentication headers using storage backend 
credentials passed as normal string
+     *
+     * @param username -->> username of the storage backend
+     * @param password -->> normal decoded password of the storage backend
+     * @return
+     */
     public static String generateAuthHeader (String username, String password) 
{
-        byte[] encodedBytes = Base64Utils.encode((username + AUTH_HEADER_COLON 
+ password).getBytes(StandardCharsets.UTF_8));
+        byte[] encodedBytes = Base64Utils.encode((username + AUTH_HEADER_COLON 
+ password).getBytes());
         return BASIC + StringUtils.SPACE + new String(encodedBytes);

Review Comment:
   added the changes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to