cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sateesh-chodapuneedi <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1862: CLOUDSTACK-9704 Remove dependency on VmwareCo...
Date Fri, 30 Dec 2016 09:41:56 GMT
Github user sateesh-chodapuneedi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1862#discussion_r94214404
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
---
    @@ -5620,4 +5623,39 @@ private String getAbsoluteVmdkFile(VirtualDisk disk) {
             }
             return vmdkAbsFile;
         }
    +
    +    protected File getSystemVmKeyFile() {
    +        if (s_systemVmKeyFile == null) {
    +            syncFetchSystemVmKeyFile();
    +        }
    +        return s_systemVmKeyFile;
    +    }
    +
    +    private static void syncFetchSystemVmKeyFile() {
    +        synchronized (s_syncLockObjectFetchKeyFile) {
    +            if (s_systemVmKeyFile == null) {
    +                s_systemVmKeyFile = fetchSystemVmKeyFile();
    +            }
    +        }
    +    }
    +
    +    private static File fetchSystemVmKeyFile() {
    +        String filePath = s_relativePathSystemVmKeyFileInstallDir;
    +        s_logger.debug("Looking for file [" + filePath + "] in the classpath.");
    +        URL url = Script.class.getClassLoader().getResource(filePath);
    +        File keyFile = null;
    +        if (url != null) {
    +            keyFile = new File(url.getPath());
    +        }
    +        if (keyFile == null || !keyFile.exists()) {
    +            filePath = s_defaultPathSystemVmKeyFile;
    +            keyFile = new File(filePath);
    +            s_logger.debug("Looking for file [" + filePath + "] in the classpath.");
    +        }
    +        assert (keyFile != null);
    --- End diff --
    
    Thanks @sureshanaparti for review.
    I have addressed that now. Pushed the code changes, please check.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message