mirror of https://github.com/apache/cloudstack.git
set Objectname to CreateAffinityGroupResponse Object. Also the listAffinityGroups is missing the 'type' property
This commit is contained in:
parent
7182a939a8
commit
6dccf63a32
|
|
@ -3664,8 +3664,13 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
response.setName(group.getName());
|
||||
response.setType(group.getType());
|
||||
response.setDescription(group.getDescription());
|
||||
// response.setDomainId(account.)
|
||||
Domain domain = ApiDBUtils.findDomainById(account.getDomainId());
|
||||
if (domain != null) {
|
||||
response.setDomainId(domain.getUuid());
|
||||
response.setDomainName(domain.getName());
|
||||
}
|
||||
|
||||
response.setObjectName("affinitygroup");
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class AffinityGroupJoinDaoImpl extends GenericDaoBase<AffinityGroupJoinVO
|
|||
agResponse.setId(vag.getUuid());
|
||||
agResponse.setName(vag.getName());
|
||||
agResponse.setDescription(vag.getDescription());
|
||||
agResponse.setType(vag.getType());
|
||||
|
||||
ApiResponseHelper.populateOwner(agResponse, vag);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
|
|||
@Column(name="name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
|
|
@ -114,6 +117,14 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getAccountId() {
|
||||
return accountId;
|
||||
|
|
|
|||
|
|
@ -512,6 +512,7 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
|
|||
select
|
||||
affinity_group.id id,
|
||||
affinity_group.name name,
|
||||
affinity_group.type type,
|
||||
affinity_group.description description,
|
||||
affinity_group.uuid uuid,
|
||||
account.id account_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue