Updated Branches: refs/heads/vmwaresdk-to-vijava 01c9492d9 -> 02ae858d6
Convert VmwareStorageManagerImp.java from Vmware SDK to vijava Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cc12a584 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cc12a584 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cc12a584 Branch: refs/heads/vmwaresdk-to-vijava Commit: cc12a58449835f0c3a3cf6c7109c9919d10494be Parents: 01c9492 Author: Hugo Trippaers <[email protected]> Authored: Sun Sep 22 19:16:40 2013 +0800 Committer: Hugo Trippaers <[email protected]> Committed: Sun Sep 22 19:16:40 2013 +0800 ---------------------------------------------------------------------- .../hypervisor/vmware/manager/VmwareStorageManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc12a584/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java index e11e766..17b2ac4 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java @@ -270,7 +270,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager { try { VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd); - String templateUuidName = UUID.nameUUIDFromBytes((templateName + "@" + cmd.getPoolUuid() + "-" + hyperHost.getMor().getValue()).getBytes()).toString(); + String templateUuidName = UUID.nameUUIDFromBytes((templateName + "@" + cmd.getPoolUuid() + "-" + hyperHost.getMor().getVal()).getBytes()).toString(); // truncate template name to 32 chars to ensure they work well with vSphere API's. templateUuidName = templateUuidName.replace("-", ""); @@ -1239,12 +1239,12 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager { fqf.setModification(true); searchSpec.setDetails(fqf); searchSpec.setSearchCaseInsensitive(false); - searchSpec.getMatchPattern().add(fileName); + searchSpec.setMatchPattern(new String[] {fileName}); ArrayList<HostDatastoreBrowserSearchResults> results = browserMo. searchDatastoreSubFolders(datastorePath, searchSpec); for(HostDatastoreBrowserSearchResults result : results){ if (result != null) { - List<FileInfo> info = result.getFile(); + FileInfo[] info = result.getFile(); for (FileInfo fi : info) { if(exceptFileName != null && fi.getPath().contains(exceptFileName)) { continue;
