Bug 12649: Added new param path to listDomains respone

Status 12649: resolved fixed
Reviewed-By: Nitin

Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
This commit is contained in:
kishan 2012-01-27 17:52:50 +05:30
parent 5e2f02fdd5
commit cdbf85e3e6
2 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,9 @@ public class DomainResponse extends BaseResponse {
@SerializedName(ApiConstants.NETWORK_DOMAIN) @Param(description="the network domain")
private String networkDomain;
@SerializedName(ApiConstants.PATH) @Param(description="the path of the domain")
private String path;
public Long getId() {
return id.getValue();
}
@ -95,5 +98,13 @@ public class DomainResponse extends BaseResponse {
public void setNetworkDomain(String networkDomain) {
this.networkDomain = networkDomain;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
}

View File

@ -386,6 +386,7 @@ public class ApiResponseHelper implements ResponseGenerator {
domainResponse.setLevel(domain.getLevel());
domainResponse.setNetworkDomain(domain.getNetworkDomain());
domainResponse.setParentDomainId(domain.getParent());
domainResponse.setPath(domain.getPath());
if (domain.getParent() != null) {
domainResponse.setParentDomainName(ApiDBUtils.findDomainById(domain.getParent()).getName());
}