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/master to 3116f51
Date Mon, 06 Jan 2014 11:19:51 GMT
Updated Branches:
  refs/heads/master 1069f56f8 -> 3116f51a2


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/3116f51a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3116f51a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3116f51a

Branch: refs/heads/master
Commit: 3116f51a26e1673715e678ec327ba5089ff76c6d
Parents: 1069f56
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:36:03 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/3116f51a/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/3116f51a/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 1725169..7f3befa 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