From 431ea4988ccb03d341e8232667fc9cfebbea815c Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Wed, 14 Aug 2013 13:41:01 -0700 Subject: [PATCH] CLOUDSTACK-4302: Instance wizard UI: Support affinity groups for dedicated zones Changes: - Add affinityGroupUuid in the listzones response for dedicatedZones. --- .../cloudstack/api/response/ZoneResponse.java | 8 +++++ .../api/query/dao/DataCenterJoinDaoImpl.java | 1 + .../cloud/api/query/vo/DataCenterJoinVO.java | 12 +++++++ setup/db/db/schema-412to420.sql | 36 +++++++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java index 2ebb15a1ecf..2b3e4bec062 100644 --- a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java @@ -99,6 +99,10 @@ public class ZoneResponse extends BaseResponse { @SerializedName(ApiConstants.LOCAL_STORAGE_ENABLED) @Param(description="true if local storage offering enabled, false otherwise") private boolean localStorageEnabled; + @SerializedName(ApiConstants.AFFINITY_GROUP_ID) + @Param(description = "the UUID of the affinity group associated, null for public zones") + private String affinityGroupId; + public void setId(String id) { this.id = id; } @@ -198,4 +202,8 @@ public class ZoneResponse extends BaseResponse { public void setIp6Dns2(String ip6Dns2) { this.ip6Dns2 = ip6Dns2; } + + public void setAffinityGroupId(String affinityGroupId) { + this.affinityGroupId = affinityGroupId; + } } diff --git a/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java index 4c8b545f343..cf47b3a7333 100644 --- a/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java @@ -94,6 +94,7 @@ public class DataCenterJoinDaoImpl extends GenericDaoBase