Repository: cloudstack
Updated Branches:
  refs/heads/hotfix/broken-simulator 08978c348 -> 437a15827


It's the template that has the simulator type, not the deploy target.

Remove extra logging to prevent a potential NPE

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

Branch: refs/heads/hotfix/broken-simulator
Commit: 437a158276cfd46735f5cefd75cbede195df2093
Parents: 08978c3
Author: Hugo Trippaers <htrippa...@schubergphilis.com>
Authored: Tue Aug 5 12:31:14 2014 +0200
Committer: Hugo Trippaers <htrippa...@schubergphilis.com>
Committed: Tue Aug 5 12:31:14 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/437a1582/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 d559050..8e3bd04 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2719,12 +2719,11 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Vir
 
         // Special case for simulator as we need to be able to simulator other 
types of hypervisors
         HypervisorType hypervisorType = null;
-        if (template.getHypervisorType() == null || 
template.getHypervisorType() == HypervisorType.None || hypervisor == 
HypervisorType.Simulator) {
+        if (template.getHypervisorType() == null || 
template.getHypervisorType() == HypervisorType.None || 
template.getHypervisorType() == HypervisorType.Simulator) {
             hypervisorType = hypervisor;
         } else {
             if (hypervisor != null && hypervisor != HypervisorType.None && 
hypervisor != template.getHypervisorType()) {
-                throw new InvalidParameterValueException("Hypervisor passed to 
the deployVm call ( " + hypervisor.toString()
-                        + " ), is different from the hypervisor type of the 
template ( " + template.getHypervisorType().toString() + " )");
+                throw new InvalidParameterValueException("Hypervisor type 
passed to the deployVm call is different from the hypervisor type of the 
template");
             }
             hypervisorType = template.getHypervisorType();
         }

Reply via email to