cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/4.2 to 431ea49
Date Wed, 14 Aug 2013 21:03:44 GMT
Updated Branches:
  refs/heads/4.2 cb609d24d -> 431ea4988


CLOUDSTACK-4302: Instance wizard UI: Support affinity groups for dedicated zones

Changes:
- Add affinityGroupUuid in the listzones response for dedicatedZones.


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

Branch: refs/heads/4.2
Commit: 431ea4988ccb03d341e8232667fc9cfebbea815c
Parents: cb609d2
Author: Prachi Damle <prachi@cloud.com>
Authored: Wed Aug 14 13:41:01 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Wed Aug 14 13:42:32 2013 -0700

----------------------------------------------------------------------
 .../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(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/431ea498/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java
index 2ebb15a..2b3e4be 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;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/431ea498/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
index 4c8b545..cf47b3a 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<DataCenterJoinVO,
Long
         zoneResponse.setAllocationState(dataCenter.getAllocationState().toString());
         zoneResponse.setZoneToken(dataCenter.getZoneToken());
         zoneResponse.setDhcpProvider(dataCenter.getDhcpProvider());
+        zoneResponse.setAffinityGroupId(dataCenter.getAffinityGroupUuid());
         zoneResponse.setObjectName("zone");
         return zoneResponse;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/431ea498/server/src/com/cloud/api/query/vo/DataCenterJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DataCenterJoinVO.java b/server/src/com/cloud/api/query/vo/DataCenterJoinVO.java
index 84becf2..081bc31 100644
--- a/server/src/com/cloud/api/query/vo/DataCenterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DataCenterJoinVO.java
@@ -108,6 +108,12 @@ public class DataCenterJoinVO extends BaseViewVO implements InternalIdentity,
Id
     @Column(name="domain_path")
     private String domainPath;
 
+    @Column(name = "affinity_group_id")
+    private long affinityGroupId;
+
+    @Column(name = "affinity_group_uuid")
+    private String affinityGroupUuid;
+
 
     public DataCenterJoinVO() {
     }
@@ -302,5 +308,11 @@ public class DataCenterJoinVO extends BaseViewVO implements InternalIdentity,
Id
 		this.ip6Dns2 = ip6Dns2;
 	}
 
+    public long getAffinityGroupId() {
+        return affinityGroupId;
+    }
 
+    public String getAffinityGroupUuid() {
+        return affinityGroupUuid;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/431ea498/setup/db/db/schema-412to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-412to420.sql b/setup/db/db/schema-412to420.sql
index fa2988e..ac3fae9 100644
--- a/setup/db/db/schema-412to420.sql
+++ b/setup/db/db/schema-412to420.sql
@@ -2321,3 +2321,39 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT',
'manage
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'management-server',
'storage.cache.replacement.enabled', 'true', 'enable or disable cache storage replacement
algorithm.');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'management-server',
'storage.cache.replacement.interval', '86400', 'time interval between cache replacement threads
(in seconds).');
 
+DROP VIEW IF EXISTS `cloud`.`data_center_view`;
+CREATE VIEW `cloud`.`data_center_view` AS
+    select 
+        data_center.id,
+        data_center.uuid,
+        data_center.name,
+        data_center.is_security_group_enabled,
+        data_center.is_local_storage_enabled,
+        data_center.description,
+        data_center.dns1,
+        data_center.dns2,
+        data_center.ip6_dns1,
+        data_center.ip6_dns2,
+        data_center.internal_dns1,
+        data_center.internal_dns2,
+        data_center.guest_network_cidr,
+        data_center.domain,
+        data_center.networktype,
+        data_center.allocation_state,
+        data_center.zone_token,
+        data_center.dhcp_provider,
+        data_center.removed,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+		dedicated_resources.affinity_group_id,
+		affinity_group.uuid affinity_group_uuid
+    from
+        `cloud`.`data_center`
+            left join
+        `cloud`.`domain` ON data_center.domain_id = domain.id
+			left join
+        `cloud`.`dedicated_resources` ON data_center.id = dedicated_resources.data_center_id
+			left join
+        `cloud`.`affinity_group` ON dedicated_resources.affinity_group_id = affinity_group.id;
\ No newline at end of file


Mime
View raw message