cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.5 to d2bf210
Date Fri, 06 Feb 2015 08:51:19 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 82eebab0b -> d2bf21065


DeployVmCmd: Fix NPE case

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: d2bf21065eb650ae2b58c5ab548c8c72a97b76b9
Parents: 82eebab
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Fri Feb 6 14:20:32 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Fri Feb 6 14:20:57 2015 +0530

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2bf2106/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
index bb7b13c..e1916cb 100755
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
@@ -300,8 +300,8 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd {
     }
 
     public List<Long> getNetworkIds() {
-       if (ipToNetworkList != null) {
-           if (networkIds != null || ipAddress != null || getIp6Address() != null) {
+       if (ipToNetworkList != null && !ipToNetworkList.isEmpty()) {
+           if ((networkIds != null && !newtworkIds.isEmpty()) || ipAddress != null
|| getIp6Address() != null) {
                throw new InvalidParameterValueException("ipToNetworkMap can't be specified
along with networkIds or ipAddress");
            } else {
                List<Long> networks = new ArrayList<Long>();


Mime
View raw message