Github user nvazquez commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1615#discussion_r74068727 --- Diff: server/src/com/cloud/storage/ImageStoreDetailsUtil.java --- @@ -20,48 +20,68 @@ import javax.inject.Inject; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.framework.config.impl.ConfigurationVO; import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao; import org.apache.cloudstack.storage.datastore.db.ImageStoreVO; +import com.cloud.capacity.CapacityManager; + public class ImageStoreDetailsUtil { @Inject protected ImageStoreDao imageStoreDao; @Inject protected ImageStoreDetailsDao imageStoreDetailsDao; + @Inject + protected ConfigurationDao configurationDao; /** - * Obtain NFS protocol version (if provided) for a store id.<br/> - * It can be set by adding an entry in {@code image_store_details} table, providing {@code name=nfs.version} and {@code value=X} (e.g. 3) + * Retrieve global secondary storage NFS version default value + * @return global default value + */ + protected Integer getGlobalDefaultNfsVersion(){ + ConfigurationVO globalNfsVersion = configurationDao.findByName(CapacityManager.ImageStoreNFSVersion.key()); + String value = globalNfsVersion.getValue(); --- End diff -- @jburwell I didn't consider it because configuration will be added and it will be present unless it is explicitly deleted from db. Anyways, I can add `Preconditions.checkState(globalNfsVersion != null)` do you agree?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---