Updated Branches: refs/heads/4.1 2323d1a73 -> 48fdbd4ea
CLOUDSTACK-1656: NicResponses in a UserVmResponse are not preseving the natural order. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/48fdbd4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/48fdbd4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/48fdbd4e Branch: refs/heads/4.1 Commit: 48fdbd4ea850e85aa3a8e7a5a649f3798635e2ec Parents: 2323d1a Author: Min Chen <[email protected]> Authored: Tue Mar 12 17:36:13 2013 -0700 Committer: Chip Childers <[email protected]> Committed: Tue Mar 12 21:50:16 2013 -0400 ---------------------------------------------------------------------- .../api/response/DomainRouterResponse.java | 5 +++-- .../api/response/SecurityGroupResponse.java | 7 ++++--- .../cloudstack/api/response/UserVmResponse.java | 7 ++++--- .../cloudstack/api/response/VolumeResponse.java | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/48fdbd4e/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java index 274e7a5..b2bc02e 100644 --- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java @@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response; import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.cloudstack.api.ApiConstants; @@ -157,7 +158,7 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView private Set<NicResponse> nics; public DomainRouterResponse(){ - nics = new HashSet<NicResponse>(); + nics = new LinkedHashSet<NicResponse>(); } @@ -344,7 +345,7 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView public void addNic(NicResponse nic) { this.nics.add(nic); } - + public String getIp6Dns1() { return ip6Dns1; } http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/48fdbd4e/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java index 1130ec0..96a8bc2 100644 --- a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java @@ -17,6 +17,7 @@ package org.apache.cloudstack.api.response; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.cloudstack.api.ApiConstants; @@ -65,9 +66,9 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledVie private Set<ResourceTagResponse> tags; public SecurityGroupResponse(){ - this.ingressRules = new HashSet<SecurityGroupRuleResponse>(); - this.egressRules = new HashSet<SecurityGroupRuleResponse>(); - this.tags = new HashSet<ResourceTagResponse>(); + this.ingressRules = new LinkedHashSet<SecurityGroupRuleResponse>(); + this.egressRules = new LinkedHashSet<SecurityGroupRuleResponse>(); + this.tags = new LinkedHashSet<ResourceTagResponse>(); } http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/48fdbd4e/api/src/org/apache/cloudstack/api/response/UserVmResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java index cb2113e..71d1b82 100644 --- a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java @@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response; import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.cloudstack.api.ApiConstants; @@ -169,9 +170,9 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp private String keyPairName; public UserVmResponse(){ - securityGroupList = new HashSet<SecurityGroupResponse>(); - nics = new HashSet<NicResponse>(); - tags = new HashSet<ResourceTagResponse>(); + securityGroupList = new LinkedHashSet<SecurityGroupResponse>(); + nics = new LinkedHashSet<NicResponse>(); + tags = new LinkedHashSet<ResourceTagResponse>(); } public void setHypervisor(String hypervisor) { http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/48fdbd4e/api/src/org/apache/cloudstack/api/response/VolumeResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java index b10da0c..d5054f0 100644 --- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java @@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response; import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.cloudstack.api.ApiConstants; @@ -161,7 +162,7 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity private Set<ResourceTagResponse> tags; public VolumeResponse(){ - tags = new HashSet<ResourceTagResponse>(); + tags = new LinkedHashSet<ResourceTagResponse>(); } @Override
