incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: bug CS-15285: preserving order of network ids so that first network is taken as the default network
Date Wed, 20 Jun 2012 10:34:30 GMT
Updated Branches:
  refs/heads/3.0.x e20e60aa1 -> f88227700


bug CS-15285: preserving order of network ids so that first network is taken as the default
network


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

Branch: refs/heads/3.0.x
Commit: f882277007275c1822849df680399c5453afcc04
Parents: e20e60a
Author: Abhinandan Prateek <aprateek@apache.org>
Authored: Wed Jun 20 11:30:03 2012 +0100
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Wed Jun 20 11:30:03 2012 +0100

----------------------------------------------------------------------
 api/src/com/cloud/api/commands/DeployVMCmd.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f8822770/api/src/com/cloud/api/commands/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DeployVMCmd.java b/api/src/com/cloud/api/commands/DeployVMCmd.java
index 85914cb..f2f83d5 100644
--- a/api/src/com/cloud/api/commands/DeployVMCmd.java
+++ b/api/src/com/cloud/api/commands/DeployVMCmd.java
@@ -16,6 +16,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -248,9 +249,9 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
         if ((networkIds != null || ipAddress != null) && ipToNetworkList != null)
{
             throw new InvalidParameterValueException("NetworkIds and ipAddress can't be specified
along with ipToNetworkMap parameter");
         }
-        Map<Long, String> ipToNetworkMap = null;
+        LinkedHashMap<Long, String> ipToNetworkMap = null;
         if (ipToNetworkList != null && !ipToNetworkList.isEmpty()) {
-            ipToNetworkMap = new HashMap<Long, String>();
+            ipToNetworkMap = new LinkedHashMap<Long, String>();
             Collection ipsCollection = ipToNetworkList.values();
             Iterator iter = ipsCollection.iterator();
             while (iter.hasNext()) {


Mime
View raw message