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 876a7b3
Date Thu, 18 Jul 2013 13:35:31 GMT
Updated Branches:
  refs/heads/master 0c5b698ac -> 876a7b336


Add VHDX image support, which is missing from DiskFormat class, revised ImageFormat interface,
StorageManager implementation, and the application component spec.


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

Branch: refs/heads/master
Commit: 876a7b3361a17bc16b1342fdebbff0f0306674a6
Parents: 0c5b698
Author: Devdeep Singh <devdeep@gmail.com>
Authored: Thu Jul 18 18:58:05 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Thu Jul 18 18:58:05 2013 +0530

----------------------------------------------------------------------
 client/tomcatconf/applicationContext.xml.in     |  4 +--
 .../api/storage/disktype/DiskFormat.java        |  4 ++-
 .../subsystem/api/storage/disktype/VHDX.java    | 16 ++++++++++
 .../cloudstack/storage/image/format/VHDX.java   | 32 ++++++++++++++++++++
 .../com/cloud/storage/StorageManagerImpl.java   |  2 ++
 5 files changed, 55 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/876a7b33/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index d490d9a..48ef7a4a 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -529,7 +529,7 @@
   <bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
     <property name="name" value="Ovm Discover"/>
   </bean>
-  
+
   <bean id="dummyHostDiscoverer" class="com.cloud.resource.DummyHostDiscoverer">
     <property name="name" value="dummyHostDiscoverer" />
   </bean>
@@ -603,7 +603,6 @@
     <property name="name" value="OvmGuru"/>
   </bean>
 
-
   <!--=====================================================================================================-->
   <!--                                                                               
                     -->
   <!--                           Storage Subsystem Components and Helpers            
                     -->
@@ -619,6 +618,7 @@
   <bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
   <bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
   <bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
+  <bean id="VHDX" class="org.apache.cloudstack.storage.image.format.VHDX" />
   <bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
 
   <!--Data Store Services -->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/876a7b33/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java
b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java
index 6be7a6b..743f7d3 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java
@@ -19,12 +19,14 @@ package org.apache.cloudstack.engine.subsystem.api.storage.disktype;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 public enum DiskFormat {
-    VMDK, VHD, ISO, QCOW2;
+    VMDK, VHD, VHDX, ISO, QCOW2;
     public static DiskFormat getFormat(String format) {
         if (VMDK.toString().equalsIgnoreCase(format)) {
             return VMDK;
         } else if (VHD.toString().equalsIgnoreCase(format)) {
             return VHD;
+        } else if (VHDX.toString().equalsIgnoreCase(format)) {
+            return VHDX;
         } else if (QCOW2.toString().equalsIgnoreCase(format)) {
             return QCOW2;
         } else if (ISO.toString().equalsIgnoreCase(format)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/876a7b33/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHDX.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHDX.java
b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHDX.java
new file mode 100644
index 0000000..b248758
--- /dev/null
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHDX.java
@@ -0,0 +1,16 @@
+// 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
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/876a7b33/engine/storage/src/org/apache/cloudstack/storage/image/format/VHDX.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/VHDX.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/VHDX.java
new file mode 100644
index 0000000..b17707f
--- /dev/null
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/VHDX.java
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.storage.image.format;
+
+import org.apache.cloudstack.storage.BaseType;
+import org.springframework.stereotype.Component;
+
+@Component("image_format_vhdx")
+public class VHDX extends BaseType implements ImageFormat {
+    private final String type = "VHDX";
+
+    @Override
+    public String toString() {
+        return type;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/876a7b33/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 2b57bae..8a5085e 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -1463,6 +1463,8 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
             return HypervisorType.KVM;
         } else if (format == ImageFormat.RAW) {
             return HypervisorType.Ovm;
+        } else if (format == ImageFormat.VHDX) {
+            return HypervisorType.Hyperv;
         } else {
             return HypervisorType.None;
         }


Mime
View raw message