cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject git commit: updated refs/heads/master to d2bf5c9
Date Tue, 03 Dec 2013 10:21:04 GMT
Updated Branches:
  refs/heads/master cc86599c4 -> d2bf5c9d5


bug CLOUDSTACK-5339


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

Branch: refs/heads/master
Commit: d2bf5c9d5e5977120b3218707ee479d2c8f760ab
Parents: cc86599
Author: lafferty <dlafferty@gmail.com>
Authored: Tue Dec 3 01:29:26 2013 +0000
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Tue Dec 3 15:56:00 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java       | 6 ++++++
 server/src/com/cloud/template/HypervisorTemplateAdapter.java | 4 ++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2bf5c9d/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 0fd0ab0..e60d204 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -382,6 +382,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             userSpecifiedName = getRandomVolumeName();
         }
         if ((!url.toLowerCase().endsWith("vhd")) && (!url.toLowerCase().endsWith("vhd.zip"))
&& (!url.toLowerCase().endsWith("vhd.bz2")) &&
+            (!url.toLowerCase().endsWith("vhdx")) && (!url.toLowerCase().endsWith("vhdx.zip"))
&& 
+            (!url.toLowerCase().endsWith("vhdx.gz")) && (!url.toLowerCase().endsWith("vhdx.bz2"))
&& 
             (!url.toLowerCase().endsWith("vhd.gz")) && (!url.toLowerCase().endsWith("qcow2"))
&& (!url.toLowerCase().endsWith("qcow2.zip")) &&
             (!url.toLowerCase().endsWith("qcow2.bz2")) && (!url.toLowerCase().endsWith("qcow2.gz"))
&& (!url.toLowerCase().endsWith("ova")) &&
             (!url.toLowerCase().endsWith("ova.zip")) && (!url.toLowerCase().endsWith("ova.bz2"))
&& (!url.toLowerCase().endsWith("ova.gz")) &&
@@ -391,6 +393,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
 
         if ((format.equalsIgnoreCase("vhd") && (!url.toLowerCase().endsWith(".vhd")
&& !url.toLowerCase().endsWith("vhd.zip") && !url.toLowerCase().endsWith("vhd.bz2")
&& !url.toLowerCase()
             .endsWith("vhd.gz"))) ||
+            (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith(".vhdx")
&& !url.toLowerCase().endsWith("vhdx.zip") && !url.toLowerCase().endsWith("vhdx.bz2")
&& !url.toLowerCase()
+            .endsWith("vhdx.gz"))) ||
             (format.equalsIgnoreCase("qcow2") && (!url.toLowerCase().endsWith(".qcow2")
&& !url.toLowerCase().endsWith("qcow2.zip") &&
                 !url.toLowerCase().endsWith("qcow2.bz2") && !url.toLowerCase().endsWith("qcow2.gz")))
||
             (format.equalsIgnoreCase("ova") && (!url.toLowerCase().endsWith(".ova")
&& !url.toLowerCase().endsWith("ova.zip") && !url.toLowerCase().endsWith("ova.bz2")
&& !url.toLowerCase()
@@ -1565,6 +1569,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             return "vhd";
         } else if (cluster.getHypervisorType() == HypervisorType.KVM) {
             return "qcow2";
+        } else if (cluster.getHypervisorType() == HypervisorType.Hyperv) {
+            return "vhdx";
         } else if (cluster.getHypervisorType() == HypervisorType.VMware) {
             return "ova";
         } else if (cluster.getHypervisorType() == HypervisorType.Ovm) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2bf5c9d/server/src/com/cloud/template/HypervisorTemplateAdapter.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 32da823..542e675 100755
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -145,6 +145,8 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
 
     private void checkFormat(String format, String url) {
         if ((!url.toLowerCase().endsWith("vhd")) && (!url.toLowerCase().endsWith("vhd.zip"))
&& (!url.toLowerCase().endsWith("vhd.bz2")) &&
+            (!url.toLowerCase().endsWith("vhdx")) && (!url.toLowerCase().endsWith("vhdx.gz"))
&&
+            (!url.toLowerCase().endsWith("vhdx.bz2")) && (!url.toLowerCase().endsWith("vhdx.zip"))
&&
             (!url.toLowerCase().endsWith("vhd.gz")) && (!url.toLowerCase().endsWith("qcow2"))
&& (!url.toLowerCase().endsWith("qcow2.zip")) &&
             (!url.toLowerCase().endsWith("qcow2.bz2")) && (!url.toLowerCase().endsWith("qcow2.gz"))
&& (!url.toLowerCase().endsWith("ova")) &&
             (!url.toLowerCase().endsWith("ova.zip")) && (!url.toLowerCase().endsWith("ova.bz2"))
&& (!url.toLowerCase().endsWith("ova.gz")) &&
@@ -155,6 +157,8 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
 
         if ((format.equalsIgnoreCase("vhd") && (!url.toLowerCase().endsWith("vhd")
&& !url.toLowerCase().endsWith("vhd.zip") && !url.toLowerCase().endsWith("vhd.bz2")
&& !url.toLowerCase()
             .endsWith("vhd.gz"))) ||
+            (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith("vhdx")
&& !url.toLowerCase().endsWith("vhdx.zip") && !url.toLowerCase().endsWith("vhdx.bz2")
&& !url.toLowerCase()
+            .endsWith("vhdx.gz"))) ||
             (format.equalsIgnoreCase("qcow2") && (!url.toLowerCase().endsWith("qcow2")
&& !url.toLowerCase().endsWith("qcow2.zip") &&
                 !url.toLowerCase().endsWith("qcow2.bz2") && !url.toLowerCase().endsWith("qcow2.gz")))
||
             (format.equalsIgnoreCase("ova") && (!url.toLowerCase().endsWith("ova")
&& !url.toLowerCase().endsWith("ova.zip") && !url.toLowerCase().endsWith("ova.bz2")
&& !url.toLowerCase()


Mime
View raw message