You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/04/24 01:51:01 UTC
[1/6] git commit: updated refs/heads/master to 04a2b2d
Updated Branches:
refs/heads/master ba4b8f170 -> 04a2b2d32
CLOUDSTACK-2120: mixed zone management - extend listTemplates API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f7f1279d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f7f1279d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f7f1279d
Branch: refs/heads/master
Commit: f7f1279d81f32a908b552f38f724e4d5ba4dab7e
Parents: 16ba999
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 13:01:09 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/response/TemplateResponse.java | 7 +++++++
server/src/com/cloud/api/ApiResponseHelper.java | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
index ed933ff..896154a 100644
--- a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
@@ -87,6 +87,9 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template")
private String zoneName;
+
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone for this template")
+ private String zoneType;
@SerializedName(ApiConstants.STATUS) @Param(description="the status of the template")
private String status;
@@ -156,6 +159,10 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
this.zoneName = zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setAccountId(String accountId) {
this.accountId = accountId;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 84dc46e..0b996c9 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1449,6 +1449,7 @@ public class ApiResponseHelper implements ResponseGenerator {
// Add the zone ID
templateResponse.setZoneId(datacenter.getUuid());
templateResponse.setZoneName(datacenter.getName());
+ templateResponse.setZoneType(datacenter.getNetworkType().toString());
}
boolean isAdmin = false;
[6/6] git commit: updated refs/heads/master to 04a2b2d
Posted by je...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listPods, listClusters, listHosts, listStoragePools, listSystemVms, listRouters API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04a2b2d3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04a2b2d3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04a2b2d3
Branch: refs/heads/master
Commit: 04a2b2d326c34e234e78852b28fa18a5f96fcc00
Parents: 15e2bc4
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 16:32:19 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 16:32:19 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/response/ClusterResponse.java | 9 +-
.../api/response/DomainRouterResponse.java | 11 +
.../cloudstack/api/response/HostResponse.java | 9 +-
.../cloudstack/api/response/PodResponse.java | 9 +-
.../api/response/StoragePoolResponse.java | 15 +-
.../cloudstack/api/response/SystemVmResponse.java | 11 +
server/src/com/cloud/api/ApiResponseHelper.java | 3 +
.../api/query/dao/DomainRouterJoinDaoImpl.java | 1 +
.../com/cloud/api/query/dao/HostJoinDaoImpl.java | 1 +
.../api/query/dao/StoragePoolJoinDaoImpl.java | 1 +
.../com/cloud/api/query/vo/DomainRouterJoinVO.java | 12 +
server/src/com/cloud/api/query/vo/HostJoinVO.java | 11 +
.../com/cloud/api/query/vo/StoragePoolJoinVO.java | 11 +
setup/db/db/schema-410to420.sql | 230 ++++++++++++++-
14 files changed, 328 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
index a90acde..cfd772d 100644
--- a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
@@ -46,7 +46,10 @@ public class ClusterResponse extends BaseResponse {
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the cluster")
private String zoneName;
-
+
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName("hypervisortype") @Param(description="the hypervisor type of the cluster")
private String hypervisorType;
@@ -116,6 +119,10 @@ public class ClusterResponse extends BaseResponse {
this.zoneName = zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public String getClusterType() {
return clusterType;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/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 b2bc02e..79c8596 100644
--- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
@@ -42,6 +42,9 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the router")
private String zoneName;
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName(ApiConstants.DNS1) @Param(description="the first DNS for the router")
private String dns1;
@@ -186,6 +189,14 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
this.zoneName = zoneName;
}
+ public String getZoneType() {
+ return zoneType;
+ }
+
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setDns1(String dns1) {
this.dns1 = dns1;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/HostResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/HostResponse.java b/api/src/org/apache/cloudstack/api/response/HostResponse.java
index 687687d..be1a4b4 100644
--- a/api/src/org/apache/cloudstack/api/response/HostResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/HostResponse.java
@@ -59,7 +59,10 @@ public class HostResponse extends BaseResponse {
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the host")
private String zoneName;
-
+
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName(ApiConstants.POD_ID) @Param(description="the Pod ID of the host")
private String podId;
@@ -209,6 +212,10 @@ public class HostResponse extends BaseResponse {
this.zoneName = zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setPodId(String podId) {
this.podId = podId;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/PodResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/PodResponse.java b/api/src/org/apache/cloudstack/api/response/PodResponse.java
index f31c289..471cac1 100644
--- a/api/src/org/apache/cloudstack/api/response/PodResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/PodResponse.java
@@ -36,10 +36,13 @@ public class PodResponse extends BaseResponse {
@SerializedName("zoneid") @Param(description="the Zone ID of the Pod")
private String zoneId;
-
+
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the Pod")
private String zoneName;
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName("gateway") @Param(description="the gateway of the Pod")
private String gateway;
@@ -86,6 +89,10 @@ public class PodResponse extends BaseResponse {
return zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
index e034b17..4411ddc 100644
--- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
@@ -38,12 +38,15 @@ public class StoragePoolResponse extends BaseResponse {
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the storage pool")
private String zoneName;
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName("podid") @Param(description="the Pod ID of the storage pool")
private String podId;
@SerializedName("podname") @Param(description="the Pod name of the storage pool")
- private String podName;
-
+ private String podName;
+
@SerializedName("name") @Param(description="the name of the storage pool")
private String name;
@@ -126,6 +129,14 @@ public class StoragePoolResponse extends BaseResponse {
this.zoneName = zoneName;
}
+ public String getZoneType() {
+ return zoneType;
+ }
+
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public String getPodId() {
return podId;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
index 8d2798a..3439dc0 100644
--- a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
@@ -46,6 +46,9 @@ public class SystemVmResponse extends BaseResponse {
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the system VM")
private String zoneName;
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName("dns1") @Param(description="the first DNS for the system VM")
private String dns1;
@@ -150,7 +153,15 @@ public class SystemVmResponse extends BaseResponse {
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
+
+ public String getZoneType() {
+ return zoneType;
+ }
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public String getDns1() {
return dns1;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index ba5322f..cd0158d 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -817,6 +817,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (zone != null) {
podResponse.setZoneId(zone.getUuid());
podResponse.setZoneName(zone.getName());
+ podResponse.setZoneType(zone.getNetworkType().toString());
}
podResponse.setNetmask(NetUtils.getCidrNetmask(pod.getCidrSize()));
podResponse.setStartIp(ipRange[0]);
@@ -961,6 +962,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (dc != null) {
clusterResponse.setZoneId(dc.getUuid());
clusterResponse.setZoneName(dc.getName());
+ clusterResponse.setZoneType(dc.getNetworkType().toString());
}
clusterResponse.setHypervisorType(cluster.getHypervisorType().toString());
clusterResponse.setClusterType(cluster.getClusterType().toString());
@@ -1165,6 +1167,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (zone != null) {
vmResponse.setZoneId(zone.getUuid());
vmResponse.setZoneName(zone.getName());
+ vmResponse.setZoneType(zone.getNetworkType().toString());
vmResponse.setDns1(zone.getDns1());
vmResponse.setDns2(zone.getDns2());
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
index 488c4e4..25cd62f 100644
--- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
@@ -148,6 +148,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO,
routerResponse.setDomainName(router.getDomainName());
routerResponse.setZoneName(router.getDataCenterName());
+ routerResponse.setZoneType(router.getDataCenterType());
routerResponse.setDns1(router.getDns1());
routerResponse.setDns2(router.getDns2());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
index 7796529..c678f2f 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -99,6 +99,7 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
hostResponse.setOsCategoryId(host.getOsCategoryUuid());
hostResponse.setOsCategoryName(host.getOsCategoryName());
hostResponse.setZoneName(host.getZoneName());
+ hostResponse.setZoneType(host.getZoneType().toString());
hostResponse.setPodName(host.getPodName());
if ( host.getClusterId() > 0) {
hostResponse.setClusterName(host.getClusterName());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
index 34b88ba..260ff4d 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -77,6 +77,7 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Lo
poolResponse.setIpAddress(pool.getHostAddress());
poolResponse.setZoneId(pool.getZoneUuid());
poolResponse.setZoneName(pool.getZoneName());
+ poolResponse.setZoneType(pool.getZoneType());
if (pool.getPoolType() != null) {
poolResponse.setType(pool.getPoolType().toString());
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
index b04120a..5f2b500 100644
--- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
@@ -101,6 +101,9 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
@Column(name="data_center_name")
private String dataCenterName = null;
+ @Column(name="data_center_type")
+ private String dataCenterType;
+
@Column(name="dns1")
private String dns1 = null;
@@ -447,6 +450,15 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
this.dataCenterName = zoneName;
}
+
+ public String getDataCenterType() {
+ return dataCenterType;
+ }
+
+ public void setDataCenterType(String dataCenterType) {
+ this.dataCenterType = dataCenterType;
+ }
+
public Long getHostId() {
return hostId;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/HostJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/HostJoinVO.java b/server/src/com/cloud/api/query/vo/HostJoinVO.java
index 0b8f672..4aa45e5 100644
--- a/server/src/com/cloud/api/query/vo/HostJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/HostJoinVO.java
@@ -130,6 +130,9 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
@Column(name="data_center_name")
private String zoneName;
+ @Column(name="data_center_type")
+ private String zoneType;
+
@Column(name="pod_id")
private long podId;
@@ -231,7 +234,15 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
+
+ public String getZoneType() {
+ return zoneType;
+ }
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public String getName() {
return name;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
index bab3990..da06227 100644
--- a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
@@ -97,6 +97,9 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
@Column(name="data_center_name")
private String zoneName;
+ @Column(name="data_center_type")
+ private String zoneType;
+
@Column(name="pod_id")
private long podId;
@@ -283,6 +286,14 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
this.zoneName = zoneName;
}
+ public String getZoneType() {
+ return zoneType;
+ }
+
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public long getPodId() {
return podId;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index ac52f53..cfce81f 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -544,6 +544,77 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
left join
`cloud`.`user_vm` ON user_vm.id = vm_instance.id;
+DROP VIEW IF EXISTS `cloud`.`host_view`;
+CREATE VIEW `cloud`.`host_view` AS
+ select
+ host.id,
+ host.uuid,
+ host.name,
+ host.status,
+ host.disconnected,
+ host.type,
+ host.private_ip_address,
+ host.version,
+ host.hypervisor_type,
+ host.hypervisor_version,
+ host.capabilities,
+ host.last_ping,
+ host.created,
+ host.removed,
+ host.resource_state,
+ host.mgmt_server_id,
+ host.cpus,
+ host.speed,
+ host.ram,
+ cluster.id cluster_id,
+ cluster.uuid cluster_uuid,
+ cluster.name cluster_name,
+ cluster.cluster_type,
+ data_center.id data_center_id,
+ data_center.uuid data_center_uuid,
+ data_center.name data_center_name,
+ data_center.networktype data_center_type,
+ host_pod_ref.id pod_id,
+ host_pod_ref.uuid pod_uuid,
+ host_pod_ref.name pod_name,
+ host_tags.tag,
+ guest_os_category.id guest_os_category_id,
+ guest_os_category.uuid guest_os_category_uuid,
+ guest_os_category.name guest_os_category_name,
+ mem_caps.used_capacity memory_used_capacity,
+ mem_caps.reserved_capacity memory_reserved_capacity,
+ cpu_caps.used_capacity cpu_used_capacity,
+ cpu_caps.reserved_capacity cpu_reserved_capacity,
+ async_job.id job_id,
+ async_job.uuid job_uuid,
+ async_job.job_status job_status,
+ async_job.account_id job_account_id
+ from
+ `cloud`.`host`
+ left join
+ `cloud`.`cluster` ON host.cluster_id = cluster.id
+ left join
+ `cloud`.`data_center` ON host.data_center_id = data_center.id
+ left join
+ `cloud`.`host_pod_ref` ON host.pod_id = host_pod_ref.id
+ left join
+ `cloud`.`host_details` ON host.id = host_details.id
+ and host_details.name = 'guest.os.category.id'
+ left join
+ `cloud`.`guest_os_category` ON guest_os_category.id = CONVERT( host_details.value , UNSIGNED)
+ left join
+ `cloud`.`host_tags` ON host_tags.host_id = host.id
+ left join
+ `cloud`.`op_host_capacity` mem_caps ON host.id = mem_caps.host_id
+ and mem_caps.capacity_type = 0
+ left join
+ `cloud`.`op_host_capacity` cpu_caps ON host.id = cpu_caps.host_id
+ and cpu_caps.capacity_type = 1
+ left join
+ `cloud`.`async_job` ON async_job.instance_id = host.id
+ and async_job.instance_type = 'Host'
+ and async_job.job_status = 0;
+
DROP VIEW IF EXISTS `cloud`.`volume_view`;
CREATE VIEW `cloud`.`volume_view` AS
select
@@ -645,7 +716,164 @@ CREATE VIEW `cloud`.`volume_view` AS
`cloud`.`async_job` ON async_job.instance_id = volumes.id
and async_job.instance_type = 'Volume'
and async_job.job_status = 0;
-
+
+DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
+CREATE VIEW `cloud`.`storage_pool_view` AS
+ select
+ storage_pool.id,
+ storage_pool.uuid,
+ storage_pool.name,
+ storage_pool.status,
+ storage_pool.path,
+ storage_pool.pool_type,
+ storage_pool.host_address,
+ storage_pool.created,
+ storage_pool.removed,
+ storage_pool.capacity_bytes,
+ storage_pool.scope,
+ cluster.id cluster_id,
+ cluster.uuid cluster_uuid,
+ cluster.name cluster_name,
+ cluster.cluster_type,
+ data_center.id data_center_id,
+ data_center.uuid data_center_uuid,
+ data_center.name data_center_name,
+ data_center.networktype data_center_type,
+ host_pod_ref.id pod_id,
+ host_pod_ref.uuid pod_uuid,
+ host_pod_ref.name pod_name,
+ storage_pool_details.name tag,
+ op_host_capacity.used_capacity disk_used_capacity,
+ op_host_capacity.reserved_capacity disk_reserved_capacity,
+ async_job.id job_id,
+ async_job.uuid job_uuid,
+ async_job.job_status job_status,
+ async_job.account_id job_account_id
+ from
+ `cloud`.`storage_pool`
+ left join
+ `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+ left join
+ `cloud`.`data_center` ON storage_pool.data_center_id = data_center.id
+ left join
+ `cloud`.`host_pod_ref` ON storage_pool.pod_id = host_pod_ref.id
+ left join
+ `cloud`.`storage_pool_details` ON storage_pool_details.pool_id = storage_pool.id
+ and storage_pool_details.value = 'true'
+ left join
+ `cloud`.`op_host_capacity` ON storage_pool.id = op_host_capacity.host_id
+ and op_host_capacity.capacity_type = 3
+ left join
+ `cloud`.`async_job` ON async_job.instance_id = storage_pool.id
+ and async_job.instance_type = 'StoragePool'
+ and async_job.job_status = 0;
+
+
+DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
+CREATE VIEW `cloud`.`domain_router_view` AS
+ select
+ vm_instance.id id,
+ vm_instance.name name,
+ account.id account_id,
+ account.uuid account_uuid,
+ account.account_name account_name,
+ account.type account_type,
+ domain.id domain_id,
+ domain.uuid domain_uuid,
+ domain.name domain_name,
+ domain.path domain_path,
+ projects.id project_id,
+ projects.uuid project_uuid,
+ projects.name project_name,
+ vm_instance.uuid uuid,
+ vm_instance.created created,
+ vm_instance.state state,
+ vm_instance.removed removed,
+ vm_instance.pod_id pod_id,
+ vm_instance.instance_name instance_name,
+ host_pod_ref.uuid pod_uuid,
+ data_center.id data_center_id,
+ data_center.uuid data_center_uuid,
+ data_center.name data_center_name,
+ data_center.networktype data_center_type,
+ data_center.dns1 dns1,
+ data_center.dns2 dns2,
+ data_center.ip6_dns1 ip6_dns1,
+ data_center.ip6_dns2 ip6_dns2,
+ host.id host_id,
+ host.uuid host_uuid,
+ host.name host_name,
+ vm_template.id template_id,
+ vm_template.uuid template_uuid,
+ service_offering.id service_offering_id,
+ disk_offering.uuid service_offering_uuid,
+ disk_offering.name service_offering_name,
+ nics.id nic_id,
+ nics.uuid nic_uuid,
+ nics.network_id network_id,
+ nics.ip4_address ip_address,
+ nics.ip6_address ip6_address,
+ nics.ip6_gateway ip6_gateway,
+ nics.ip6_cidr ip6_cidr,
+ nics.default_nic is_default_nic,
+ nics.gateway gateway,
+ nics.netmask netmask,
+ nics.mac_address mac_address,
+ nics.broadcast_uri broadcast_uri,
+ nics.isolation_uri isolation_uri,
+ vpc.id vpc_id,
+ vpc.uuid vpc_uuid,
+ networks.uuid network_uuid,
+ networks.name network_name,
+ networks.network_domain network_domain,
+ networks.traffic_type traffic_type,
+ networks.guest_type guest_type,
+ async_job.id job_id,
+ async_job.uuid job_uuid,
+ async_job.job_status job_status,
+ async_job.account_id job_account_id,
+ domain_router.template_version template_version,
+ domain_router.scripts_version scripts_version,
+ domain_router.is_redundant_router is_redundant_router,
+ domain_router.redundant_state redundant_state,
+ domain_router.stop_pending stop_pending
+ from
+ `cloud`.`domain_router`
+ inner join
+ `cloud`.`vm_instance` ON vm_instance.id = domain_router.id
+ inner join
+ `cloud`.`account` ON vm_instance.account_id = account.id
+ inner join
+ `cloud`.`domain` ON vm_instance.domain_id = domain.id
+ left join
+ `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+ left join
+ `cloud`.`projects` ON projects.project_account_id = account.id
+ left join
+ `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+ left join
+ `cloud`.`host` ON vm_instance.host_id = host.id
+ left join
+ `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+ left join
+ `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+ left join
+ `cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
+ left join
+ `cloud`.`volumes` ON vm_instance.id = volumes.instance_id
+ left join
+ `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+ left join
+ `cloud`.`nics` ON vm_instance.id = nics.instance_id
+ left join
+ `cloud`.`networks` ON nics.network_id = networks.id
+ left join
+ `cloud`.`vpc` ON domain_router.vpc_id = vpc.id
+ left join
+ `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+ and async_job.instance_type = 'DomainRouter'
+ and async_job.job_status = 0;
+
CREATE TABLE `cloud`.`external_cisco_vnmc_devices` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uuid` varchar(255) UNIQUE,
[2/6] git commit: updated refs/heads/master to 04a2b2d
Posted by je...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listVolumes API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35e20726
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35e20726
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35e20726
Branch: refs/heads/master
Commit: 35e2072660d20b538bf6929d9c68eecb16ac8318
Parents: ba4b8f1
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 11:23:49 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/response/VolumeResponse.java | 8 +
.../com/cloud/api/query/dao/VolumeJoinDaoImpl.java | 3 +-
.../src/com/cloud/api/query/vo/VolumeJoinVO.java | 15 ++
setup/db/db/schema-410to420.sql | 102 +++++++++++++++
4 files changed, 127 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/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 d5054f0..b928fcd 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -47,6 +47,10 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
@SerializedName(ApiConstants.ZONE_NAME)
@Param(description = "name of the availability zone")
private String zoneName;
+
+ @SerializedName(ApiConstants.ZONE_TYPE)
+ @Param(description = "network type of the availability zone")
+ private String zoneType;
@SerializedName(ApiConstants.TYPE)
@Param(description = "type of the disk volume (ROOT or DATADISK)")
@@ -198,6 +202,10 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
this.zoneName = zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setVolumeType(String volumeType) {
this.volumeType = volumeType;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index 495c0eb..a7a0bf0 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -86,7 +86,8 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
volResponse.setZoneId(volume.getDataCenterUuid());
volResponse.setZoneName(volume.getDataCenterName());
-
+ volResponse.setZoneType(volume.getDataCenterType());
+
volResponse.setVolumeType(volume.getVolumeType().toString());
volResponse.setDeviceId(volume.getDeviceId());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
index 4f6b35b..8a4bfe5 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -117,6 +117,9 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
@Column(name="data_center_name")
private String dataCenterName;
+
+ @Column(name="data_center_type")
+ private String dataCenterType;
@Column(name="vm_id")
private long vmId;
@@ -1004,8 +1007,20 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
this.dataCenterName = dataCenterName;
}
+
+
+ public String getDataCenterType() {
+ return dataCenterType;
+ }
+
+ public void setDataCenterType(String dataCenterType) {
+ this.dataCenterType = dataCenterType;
+ }
+
+
+
public long getPodId() {
return podId;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 10cdbba..ac52f53 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -544,6 +544,108 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
left join
`cloud`.`user_vm` ON user_vm.id = vm_instance.id;
+DROP VIEW IF EXISTS `cloud`.`volume_view`;
+CREATE VIEW `cloud`.`volume_view` AS
+ select
+ volumes.id,
+ volumes.uuid,
+ volumes.name,
+ volumes.device_id,
+ volumes.volume_type,
+ volumes.size,
+ volumes.created,
+ volumes.state,
+ volumes.attached,
+ volumes.removed,
+ volumes.pod_id,
+ account.id account_id,
+ account.uuid account_uuid,
+ account.account_name account_name,
+ account.type account_type,
+ domain.id domain_id,
+ domain.uuid domain_uuid,
+ domain.name domain_name,
+ domain.path domain_path,
+ projects.id project_id,
+ projects.uuid project_uuid,
+ projects.name project_name,
+ data_center.id data_center_id,
+ data_center.uuid data_center_uuid,
+ data_center.name data_center_name,
+ data_center.networktype data_center_type,
+ vm_instance.id vm_id,
+ vm_instance.uuid vm_uuid,
+ vm_instance.name vm_name,
+ vm_instance.state vm_state,
+ vm_instance.vm_type,
+ user_vm.display_name vm_display_name,
+ volume_host_ref.size volume_host_size,
+ volume_host_ref.created volume_host_created,
+ volume_host_ref.format,
+ volume_host_ref.download_pct,
+ volume_host_ref.download_state,
+ volume_host_ref.error_str,
+ disk_offering.id disk_offering_id,
+ disk_offering.uuid disk_offering_uuid,
+ disk_offering.name disk_offering_name,
+ disk_offering.display_text disk_offering_display_text,
+ disk_offering.use_local_storage,
+ disk_offering.system_use,
+ storage_pool.id pool_id,
+ storage_pool.uuid pool_uuid,
+ storage_pool.name pool_name,
+ cluster.hypervisor_type,
+ vm_template.id template_id,
+ vm_template.uuid template_uuid,
+ vm_template.extractable,
+ vm_template.type template_type,
+ resource_tags.id tag_id,
+ resource_tags.uuid tag_uuid,
+ resource_tags.key tag_key,
+ resource_tags.value tag_value,
+ resource_tags.domain_id tag_domain_id,
+ resource_tags.account_id tag_account_id,
+ resource_tags.resource_id tag_resource_id,
+ resource_tags.resource_uuid tag_resource_uuid,
+ resource_tags.resource_type tag_resource_type,
+ resource_tags.customer tag_customer,
+ async_job.id job_id,
+ async_job.uuid job_uuid,
+ async_job.job_status job_status,
+ async_job.account_id job_account_id
+ from
+ `cloud`.`volumes`
+ inner join
+ `cloud`.`account` ON volumes.account_id = account.id
+ inner join
+ `cloud`.`domain` ON volumes.domain_id = domain.id
+ left join
+ `cloud`.`projects` ON projects.project_account_id = account.id
+ left join
+ `cloud`.`data_center` ON volumes.data_center_id = data_center.id
+ left join
+ `cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id
+ left join
+ `cloud`.`user_vm` ON user_vm.id = vm_instance.id
+ left join
+ `cloud`.`volume_host_ref` ON volumes.id = volume_host_ref.volume_id
+ and volumes.data_center_id = volume_host_ref.zone_id
+ left join
+ `cloud`.`disk_offering` ON volumes.disk_offering_id = disk_offering.id
+ left join
+ `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+ left join
+ `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+ left join
+ `cloud`.`vm_template` ON volumes.template_id = vm_template.id
+ left join
+ `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id
+ and resource_tags.resource_type = 'Volume'
+ left join
+ `cloud`.`async_job` ON async_job.instance_id = volumes.id
+ and async_job.instance_type = 'Volume'
+ and async_job.job_status = 0;
+
CREATE TABLE `cloud`.`external_cisco_vnmc_devices` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uuid` varchar(255) UNIQUE,
[3/6] git commit: updated refs/heads/master to 04a2b2d
Posted by je...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listNetworks API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/16ba999b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/16ba999b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/16ba999b
Branch: refs/heads/master
Commit: 16ba999bf1102938779f0b773984695b75ccd77e
Parents: 35e2072
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 12:25:34 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/response/NetworkResponse.java | 7 +++++++
server/src/com/cloud/api/ApiResponseHelper.java | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16ba999b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
index cd32ded..3f366e2 100644
--- a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
@@ -66,6 +66,9 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
private String zoneName;
+
+ @SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone the network belongs to")
+ private String zoneType;
@SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
private String networkOfferingId;
@@ -291,6 +294,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
this.zoneName = zoneName;
}
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setCidr(String cidr) {
this.cidr = cidr;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16ba999b/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index a7d6165..84dc46e 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2354,6 +2354,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (zone != null) {
response.setZoneId(zone.getUuid());
response.setZoneName(zone.getName());
+ response.setZoneType(zone.getNetworkType().toString());
}
if (network.getPhysicalNetworkId() != null) {
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());
[5/6] git commit: updated refs/heads/master to 04a2b2d
Posted by je...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listSnapshots API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15e2bc46
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15e2bc46
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15e2bc46
Branch: refs/heads/master
Commit: 15e2bc463f05ff8b77f6b6a79bbcb391216778d8
Parents: 6230e5b
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 14:03:35 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 14:03:35 2013 -0700
----------------------------------------------------------------------
.../cloudstack/api/response/SnapshotResponse.java | 16 +++++++++++++++
server/src/com/cloud/api/ApiResponseHelper.java | 6 +++++
2 files changed, 22 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15e2bc46/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
index 5b77fb2..7484ac9 100644
--- a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
@@ -93,6 +93,14 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
@Param(description = "the state of the snapshot. BackedUp means that snapshot is ready to be used; Creating - the snapshot is being allocated on the primary storage; BackingUp - the snapshot is being backed up on secondary storage")
private Snapshot.State state;
+ @SerializedName(ApiConstants.ZONE_NAME)
+ @Param(description = "name of the availability zone")
+ private String zoneName;
+
+ @SerializedName(ApiConstants.ZONE_TYPE)
+ @Param(description = "network type of the availability zone")
+ private String zoneType;
+
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with snapshot", responseObject = ResourceTagResponse.class)
private List<ResourceTagResponse> tags;
@@ -173,6 +181,14 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
this.projectName = projectName;
}
+ public void setZoneName(String zoneName) {
+ this.zoneName = zoneName;
+ }
+
+ public void setZoneType(String zoneType) {
+ this.zoneType = zoneType;
+ }
+
public void setTags(List<ResourceTagResponse> tags) {
this.tags = tags;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15e2bc46/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index f4567c0..ba5322f 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -443,6 +443,12 @@ public class ApiResponseHelper implements ResponseGenerator {
snapshotResponse.setVolumeId(volume.getUuid());
snapshotResponse.setVolumeName(volume.getName());
snapshotResponse.setVolumeType(volume.getVolumeType().name());
+
+ DataCenter zone = ApiDBUtils.findZoneById(volume.getDataCenterId());
+ if (zone != null) {
+ snapshotResponse.setZoneName(zone.getName());
+ snapshotResponse.setZoneType(zone.getNetworkType().toString());
+ }
}
snapshotResponse.setCreated(snapshot.getCreated());
snapshotResponse.setName(snapshot.getName());
[4/6] git commit: updated refs/heads/master to 04a2b2d
Posted by je...@apache.org.
CLOUDSTACK-2120 - mixed zone management - extend listIsos API to return zone type.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6230e5b7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6230e5b7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6230e5b7
Branch: refs/heads/master
Commit: 6230e5b77bf701494e3b416a5b7cd04adacfcd24
Parents: f7f1279
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 13:46:36 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:46:36 2013 -0700
----------------------------------------------------------------------
server/src/com/cloud/api/ApiResponseHelper.java | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6230e5b7/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 0b996c9..f4567c0 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1738,6 +1738,7 @@ public class ApiResponseHelper implements ResponseGenerator {
if (datacenter != null) {
isoResponse.setZoneId(datacenter.getUuid());
isoResponse.setZoneName(datacenter.getName());
+ isoResponse.setZoneType(datacenter.getNetworkType().toString());
}
// If the user is an admin, add the template download status