Updated Branches: refs/heads/master 01ea1fba2 -> 27e504cb1
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/27e504cb Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/27e504cb Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/27e504cb Branch: refs/heads/master Commit: 27e504cb18ab5856d7590910db312e766fabb9e3 Parents: 01ea1fb Author: Abhinandan Prateek <[email protected]> Authored: Wed Jun 20 11:30:03 2012 +0100 Committer: Abhinandan Prateek <[email protected]> Committed: Wed Jun 20 11:32:43 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/27e504cb/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 4949cf0..9e2bc24 100644 --- a/api/src/com/cloud/api/commands/DeployVMCmd.java +++ b/api/src/com/cloud/api/commands/DeployVMCmd.java @@ -20,6 +20,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; @@ -252,9 +253,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()) {
