GitHub user nvazquez opened a pull request: https://github.com/apache/cloudstack/pull/1615
CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS version changeable in UI JIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9438 ### Introduction From #1361 it was possible to configure NFS version for secondary storage mount. However, changing NFS version requires inserting an new detail on `image_store_details` table, with `name = 'nfs.version'` and `value = X` where X is desired NFS version, and then restarting management server for changes to take effect. Our improvement aims to make NFS version changeable from UI, instead of previously described workflow. ### Proposed solution Basically, NFS version is defined as an image store ConfigKey, this implied: * Adding a new Config scope: **ImageStore** * Make `ImageStoreDetailsDao` class to extend `ResourceDetailsDaoBase` and `ImageStoreDetailVO` implement `ResourceDetail` * Insert `'display'` column on `image_store_details` table * Extending `ListCfgsCmd` and `UpdateCfgCmd` to support **ImageStore** scope, which implied: ** Injecting `ImageStoreDetailsDao` and `ImageStoreDao` on `ConfigurationManagerImpl` class, on `cloud-server` module. ### Important It is important to mention that `ImageStoreDaoImpl` and `ImageStoreDetailsDaoImpl` classes were moved from `cloud-engine-storage` to `cloud-engine-schema` module in order to Spring find those beans to inject on `ConfigurationManagerImpl` in `cloud-server` module. We had this maven dependencies between modules: * `cloud-server --> cloud-engine-schema` * `cloud-engine-storage --> cloud-secondary-storage --> cloud-server` As `ImageStoreDaoImpl` and `ImageStoreDetailsDao` were defined in `cloud-engine-storage`, and they needed in `cloud-server` module, to be injected on `ConfigurationManagerImpl`, if we added dependency from `cloud-server` to `cloud-engine-storage` we would introduce a dependency cycle. To avoid this cycle, we moved those classes to `cloud-engine-schema` module You can merge this pull request into a Git repository by running: $ git pull https://github.com/nvazquez/cloudstack nfsConfigKey Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1615.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1615 ---- commit c35d9e6dfc6a886890ce2c1c864ec201884cb84c Author: nvazquez <nicovazque...@gmail.com> Date: 2016-07-12T14:41:52Z CLOUDSTACK-9438: NFS version as ConfigKey commit 0e44c8571072f67fc53c2851dc06cd0ced2a6755 Author: nvazquez <nicovazque...@gmail.com> Date: 2016-07-19T21:33:25Z CLOUDSTACK-9438: Move ImageStoreDaoImpl and ImageStoreDetailsDaoImpl to engine-schema module commit 8383a36b703b9d5166cb1269f8400ca193f20ea1 Author: nvazquez <nicolas.m.vazq...@gmail.com> Date: 2016-07-21T19:14:07Z CLOUDSTACK-9438: Add display to ImageStoreDetailVO ---- --- 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. ---