nvazquez commented on a change in pull request #5886:
URL: https://github.com/apache/cloudstack/pull/5886#discussion_r793713541



##########
File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/image/NfsImageStoreDriverImpl.java
##########
@@ -18,31 +18,15 @@
  */
 package org.apache.cloudstack.storage.image;
 
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
-
 import com.cloud.capacity.CapacityManager;
 
 public abstract class NfsImageStoreDriverImpl extends BaseImageStoreDriverImpl 
{
 
-    @Inject
-    ImageStoreDetailsDao _imageStoreDetailsDao;
-
     /**
-     * Retrieve NFS version to be used for imgStoreId store, if provided in 
image_store_details table
-     * @param imgStoreId store id
-     * @return "secstorage.nfs.version" associated value for imgStoreId in 
image_store_details table if exists, null if not
+     * Retrieve the NFS version to be used for the imgStoreId store
      */
-    protected String getNfsVersion(long imgStoreId){
-        Map<String, String> imgStoreDetails = 
_imageStoreDetailsDao.getDetails(imgStoreId);
-        String nfsVersionKey = CapacityManager.ImageStoreNFSVersion.key();
-        if (imgStoreDetails != null && 
imgStoreDetails.containsKey(nfsVersionKey)){

Review comment:
       Yes, as the scope of the configuration is ImageStore. I have verified 
after setting versions to different stores in the UI:
   
   ````
   MariaDB [cloud]> select * from image_store_details;
   +----+----------+------------------------+-------+---------+
   | id | store_id | name                   | value | display |
   +----+----------+------------------------+-------+---------+
   |  1 |        3 | secstorage.nfs.version | 4     |       1 |
   |  2 |        1 | secstorage.nfs.version | 3     |       1 |
   +----+----------+------------------------+-------+---------+
   2 rows in set (0.01 sec)
   ````




-- 
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