cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/4.2 to 31c4252
Date Mon, 29 Jul 2013 18:18:24 GMT
Updated Branches:
  refs/heads/4.2 5fb06ad37 -> 31c425208


CLOUDSTACK-3909: deployVM API - validate hypervisorType parameter when the vm is being deployed
from ISO


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

Branch: refs/heads/4.2
Commit: 31c425208ad353b3d273420ec4dc44e65f1c233f
Parents: 5fb06ad
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Mon Jul 29 11:13:52 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Mon Jul 29 11:16:05 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31c42520/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 0ec296e..280f7e9 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2377,16 +2377,14 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
                                 "Can't create vm from template with hypervisor "
                                         + template.getHypervisorType()
                                         + " in vpc network " + network);
-                    }
-
-                    // Only XenServer, KVM, and VMware hypervisors are supported
-                    // for vpc networks
-                    if (!vpcSupportedHTypes.contains(hypervisor)) {
+                    } else if (template.getFormat() == ImageFormat.ISO && !vpcSupportedHTypes.contains(hypervisor))
{
+                        // Only XenServer, KVM, and VMware hypervisors are supported
+                        // for vpc networks
                         throw new InvalidParameterValueException(
                                 "Can't create vm of hypervisor type "
                                         + hypervisor + " in vpc network");
+                        
                     }
-
                 }
 
                 _networkModel.checkNetworkPermissions(owner, network);


Mime
View raw message