cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devd...@apache.org
Subject [2/3] git commit: updated refs/heads/master to 1b398aa
Date Mon, 29 Jul 2013 13:24:00 GMT
CLOUDSTACK-3877 Unable to Resize Volume (kvm, vmware)


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

Branch: refs/heads/master
Commit: 63fea5e94e50c0bd9f01045f67befa9673ad7dc5
Parents: 8edf6b3
Author: Rajesh Battala <rajesh.battala@citrix.com>
Authored: Sat Jul 27 20:28:03 2013 +0530
Committer: Devdeep Singh <devdeep@gmail.com>
Committed: Mon Jul 29 18:50:41 2013 +0530

----------------------------------------------------------------------
 engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63fea5e9/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 7696bcc..e6595b2 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -241,7 +241,12 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long>
implements Vol
             pstmt.setLong(1, volumeId);
             ResultSet rs = pstmt.executeQuery();
             if (rs.next()) {
-                return HypervisorType.getType(rs.getString(1));
+                String hypervisor;
+                if (rs.getString(1) != null)
+                    hypervisor = rs.getString(1);
+                else
+                    hypervisor = rs.getString(2);
+                return HypervisorType.getType(hypervisor);
             }
             return HypervisorType.None;
         } catch (SQLException e) {


Mime
View raw message