cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devd...@apache.org
Subject git commit: updated refs/heads/4.3 to 7fc3c4f
Date Mon, 06 Jan 2014 11:04:29 GMT
Updated Branches:
  refs/heads/4.3 96823d3a6 -> 7fc3c4fd1


CLOUDSTACK-5788, CLOUDSTACK-5789: Attaching upload volume and download
volume was failing for hyper-v. Copy command answer was failing while
creating the answer object. Fixing the issue.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7fc3c4fd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7fc3c4fd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7fc3c4fd

Branch: refs/heads/4.3
Commit: 7fc3c4fd1531e9399031d71010fcc1a097aa2e02
Parents: 96823d3
Author: Devdeep Singh <devdeep@gmail.com>
Authored: Mon Jan 6 23:33:55 2014 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Mon Jan 6 16:34:46 2014 +0530

----------------------------------------------------------------------
 .../ServerResource/HypervResource/CloudStackTypes.cs  |  2 +-
 .../HypervResource/HypervResourceController.cs        | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fc3c4fd/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index 314c26b..226610b 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -187,7 +187,7 @@ namespace HypervResource
                     throw new InvalidDataException(errMsg);
                 }
 
-                if (!Path.HasExtension(fileName) && this.format != null)
+                if (fileName != null && !Path.HasExtension(fileName) && this.format
!= null)
                 {
                     fileName = fileName + "." + this.format.ToLowerInvariant();
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fc3c4fd/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 c5545e2..c678c01 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1321,14 +1321,16 @@ namespace HypervResource
                 object newData = null;
                 TemplateObjectTO destTemplateObjectTO = null;
                 VolumeObjectTO destVolumeObjectTO = null;
+                VolumeObjectTO srcVolumeObjectTO = null;
+                TemplateObjectTO srcTemplateObjectTO = null;
 
                 try
                 {
                     dynamic timeout = cmd.wait;  // TODO: Useful?
 
-                    TemplateObjectTO srcTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.srcTO);
+                    srcTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.srcTO);
                     destTemplateObjectTO = TemplateObjectTO.ParseJson(cmd.destTO);
-                    VolumeObjectTO srcVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.srcTO);
+                    srcVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.srcTO);
                     destVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.destTO);
 
                     string destFile = null;
@@ -1512,11 +1514,9 @@ namespace HypervResource
                                 // doesn't do anything if the directory is already present.
                                 Directory.CreateDirectory(Path.GetDirectoryName(destFile));
                                 File.Copy(srcFile, destFile);
-                                // create volumeto object deserialize and send it 
-                                VolumeObjectTO volume = new VolumeObjectTO();
-                                volume.path = destFile;
-                                volume.size = ulong.Parse(destVolumeObjectTO.size.ToString());
-                                JObject ansObj = Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO,
volume);
+                                // Create volumeto object deserialize and send it
+                                destVolumeObjectTO.path = destFile;
+                                JObject ansObj = Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO,
destVolumeObjectTO);
                                 newData = ansObj;
                                 result = true;
                             }


Mime
View raw message