GitHub user sateesh-chodapuneedi opened a pull request: https://github.com/apache/cloudstack/pull/1862
CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch systemVM keyfile Jira === CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch system VM key file Description ======== While remote executing commands/scripts through SSH in VR, ACS uses system vm keyfile. ACS is fetching this key file using VMwareContext object which encapsulates vCenter connection handle. This is inefficient because of dependency on getServiceContext() which means a vCenter connection handle which is not required just to fetch a file in name space in management server. Fix === Implement a method to fetch system vm key file by using Script class instead of VmwareManagerImpl. Ensure this implementation is not present in VmwareManagerImpl itself because fetching the manager object from VmwareContext object unnecessarily adds dependency on session object just to search for keyfile in class path. Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com> You can merge this pull request into a Git repository by running: $ git pull https://github.com/sateesh-chodapuneedi/cloudstack pr-cloudstack-9704 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1862.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 #1862 ---- commit 02bd90c424966c81c57bed9b8fc9f530e0b97b7d Author: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com> Date: 2016-12-23T02:17:43Z CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch system VM key file While remote executing commands/scripts through SSH in VR, ACS uses system vm keyfile. ACS is fetching this key file using VMwareContext object which encapsulates vCenter connection handle. This is inefficient because of dependency on getServiceContext() which means a vCenter connection handle which is not required just to fetch a file in name space in management server. Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com> ---- --- 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. ---