Repository: cloudstack Updated Branches: refs/heads/4.4 d79251853 -> cda088470
CLOUDSTACK-7220: fixed building hyper-v agent is broken, commits were not applied in correct order while cherry picking from 4.4-forward to 4.4 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cda08847 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cda08847 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cda08847 Branch: refs/heads/4.4 Commit: cda088470b069b4361e87e12e96f2769305e96d9 Parents: d792518 Author: Anshul Gangwar <[email protected]> Authored: Fri Aug 1 10:45:14 2014 +0530 Committer: Devdeep Singh <[email protected]> Committed: Fri Aug 1 15:50:17 2014 +0530 ---------------------------------------------------------------------- .../HypervResource/HypervResourceController.cs | 16 ---------------- .../ServerResource/HypervResource/WmiCallsV2.cs | 5 +---- 2 files changed, 1 insertion(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cda08847/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs index 0ad95b8..6ccf8b0 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs @@ -236,7 +236,6 @@ namespace HypervResource { TemplateObjectTO dataStore = disk.templateObjectTO; NFSTO share = dataStore.nfsDataStoreTO; - Utils.ConnectToRemote(share.UncPath, share.Domain, share.User, share.Password); string diskPath = Utils.NormalizePath(Path.Combine(share.UncPath, dataStore.path)); wmiCallsV2.AttachIso(vmName, diskPath); result = true; @@ -244,11 +243,6 @@ namespace HypervResource else if (disk.type.Equals("DATADISK")) { VolumeObjectTO volume = disk.volumeObjectTO; - PrimaryDataStoreTO primary = volume.primaryDataStore; - if (!primary.isLocal) - { - Utils.ConnectToRemote(primary.UncPath, primary.Domain, primary.User, primary.Password); - } string diskPath = Utils.NormalizePath(volume.FullFileName); wmiCallsV2.AttachDisk(vmName, diskPath, disk.diskSequence); result = true; @@ -988,8 +982,6 @@ namespace HypervResource share.uri = new Uri(uriStr); hostPath = Utils.NormalizePath(share.UncPath); - // Check access to share. - Utils.ConnectToRemote(share.UncPath, share.Domain, share.User, share.Password); Utils.GetShareDetails(share.UncPath, out capacityBytes, out availableBytes); config.setPrimaryStorage((string)cmd.pool.uuid, hostPath); } @@ -1281,7 +1273,6 @@ namespace HypervResource { volumePath = @"\\" + primary.uri.Host + primary.uri.LocalPath + @"\" + volumeName; volumePath = Utils.NormalizePath(volumePath); - Utils.ConnectToRemote(primary.UncPath, primary.Domain, primary.User, primary.Password); } volume.path = volume.uuid; wmiCallsV2.CreateDynamicVirtualHardDisk(volumeSize, volumePath); @@ -1554,17 +1545,10 @@ namespace HypervResource if (destTemplateObjectTO.primaryDataStore != null) { destFile = destTemplateObjectTO.FullFileName; - if (!destTemplateObjectTO.primaryDataStore.isLocal) - { - PrimaryDataStoreTO primary = destTemplateObjectTO.primaryDataStore; - Utils.ConnectToRemote(primary.UncPath, primary.Domain, primary.User, primary.Password); - } } else if (destTemplateObjectTO.nfsDataStoreTO != null) { destFile = destTemplateObjectTO.FullFileName; - NFSTO store = destTemplateObjectTO.nfsDataStoreTO; - Utils.ConnectToRemote(store.UncPath, store.Domain, store.User, store.Password); } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cda08847/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs index 2f404ff..f8868f4 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs @@ -1,4 +1,4 @@ -// Licensed to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -333,7 +333,6 @@ namespace HypervResource else if (templateInfo != null && templateInfo.nfsDataStoreTO != null) { NFSTO share = templateInfo.nfsDataStoreTO; - Utils.ConnectToRemote(share.UncPath, share.Domain, share.User, share.Password); // The share is mapped, now attach the iso isoPath = Utils.NormalizePath(Path.Combine(share.UncPath, templateInfo.path)); } @@ -2445,8 +2444,6 @@ namespace HypervResource { return wmiObj; } - logger.InfoFormat("In progress... {0}% completed.", jobObj.PercentComplete); - System.Threading.Thread.Sleep(1000); } var errMsg = string.Format(
