mirror of https://github.com/apache/cloudstack.git
bug 7448: add domain parameter in returned objects from listNetworks API. (changed by Alena)
This commit is contained in:
parent
2f39796392
commit
d2bd6e522e
|
|
@ -95,7 +95,8 @@ public class NetworkResponse extends BaseResponse{
|
|||
@SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain id associated with the network")
|
||||
private Long domainId;
|
||||
|
||||
|
||||
@SerializedName(ApiConstants.DOMAIN) @Param(description="the domain associated with the network")
|
||||
private String domain;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
|
|
@ -288,4 +289,14 @@ public class NetworkResponse extends BaseResponse{
|
|||
public void setIsSystem(Boolean isSystem) {
|
||||
this.isSystem = isSystem;
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2412,7 +2412,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
Account account = ApiDBUtils.findAccountById(network.getAccountId());
|
||||
if (account != null) {
|
||||
response.setAccountName(account.getAccountName());
|
||||
response.setDomainId(account.getDomainId());
|
||||
Domain domain = ApiDBUtils.findDomainById(account.getDomainId());
|
||||
response.setDomainId(domain.getId());
|
||||
response.setDomain(domain.getName());
|
||||
}
|
||||
response.setObjectName("network");
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Reference in New Issue