CLOUDSTACK-2360: listnetscalerloadbalancerresponse is not including any

information about GSLB status

adds the infomration if NetScaler is provisioned as GSLB service
provider
This commit is contained in:
Murali Reddy 2013-05-22 16:25:02 +05:30
parent 53499c0858
commit 62d320454a
2 changed files with 25 additions and 0 deletions

View File

@ -60,6 +60,15 @@ public class NetscalerLoadBalancerResponse extends BaseResponse {
@SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the management IP address of the external load balancer")
private String ipAddress;
@SerializedName(ApiConstants.GSLB_PROVIDER) @Param(description="true if NetScaler device is provisioned to be a GSLB service provider")
private Boolean isGslbProvider;
@SerializedName(ApiConstants.GSLB_PROVIDER_PUBLIC_IP) @Param(description="public IP of the NetScaler representing GSLB site")
private String gslbSitePublicIp;
@SerializedName(ApiConstants.GSLB_PROVIDER_PRIVATE_IP) @Param(description="private IP of the NetScaler representing GSLB site")
private String gslbSitePrivateIp;
@SerializedName(ApiConstants.POD_IDS) @Param(description="Used when NetScaler device is provider of EIP service." +
" This parameter represents the list of pod's, for which there exists a policy based route on datacenter L3 router to " +
"route pod's subnet IP to a NetScaler device.")
@ -108,4 +117,16 @@ public class NetscalerLoadBalancerResponse extends BaseResponse {
public void setAssociatedPods(List<Long> pods) {
this.podIds = pods;
}
public void setGslbProvider(boolean isGslbProvider) {
this.isGslbProvider = isGslbProvider;
}
public void setGslbSitePublicIp(String publicIP) {
this.gslbSitePublicIp = publicIP;
}
public void setGslbSitePrivateIp(String privateIp) {
this.gslbSitePrivateIp = privateIp;
}
}

View File

@ -589,6 +589,10 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
response.setDeviceState(lbDeviceVO.getState().name());
response.setObjectName("netscalerloadbalancer");
response.setGslbProvider(lbDeviceVO.getGslbProvider());
response.setGslbSitePublicIp(lbDeviceVO.getGslbSitePublicIP());
response.setGslbSitePrivateIp(lbDeviceVO.getGslbSitePrivateIP());
List<Long> associatedPods = new ArrayList<Long>();
List<NetScalerPodVO> currentPodVOs = _netscalerPodDao.listByNetScalerDeviceId(lbDeviceVO.getId());
if (currentPodVOs != null && currentPodVOs.size() > 0) {