Skip to content

Commit 6f9bc00

Browse files
author
kishan
committed
bug 12481: Added account ID to listusers response
status 12481: resolved fixed reviewed-by: Nitin
1 parent bc32e0e commit 6f9bc00

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎api/src/com/cloud/api/response/UserResponse.java‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public class UserResponse extends BaseResponse {
6767
@SerializedName("secretkey") @Param(description="the secret key of the user")
6868
private String secretKey;
6969

70+
@SerializedName("accountid") @Param(description="the account ID of the user")
71+
private IdentityProxy accountId = new IdentityProxy("account");
72+
73+
7074
public Long getId() {
7175
return id.getValue();
7276
}
@@ -178,4 +182,11 @@ public String getSecretKey() {
178182
public void setSecretKey(String secretKey) {
179183
this.secretKey = secretKey;
180184
}
185+
public Long getAccountId() {
186+
return accountId.getValue();
187+
}
188+
189+
public void setAccountId(Long accountId) {
190+
this.accountId.setValue(accountId);
191+
}
181192
}

‎server/src/com/cloud/api/ApiResponseHelper.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ public UserResponse createUserResponse(UserAccount user) {
372372
userResponse.setUsername(user.getUsername());
373373
userResponse.setApiKey(user.getApiKey());
374374
userResponse.setSecretKey(user.getSecretKey());
375+
userResponse.setAccountId((user.getAccountId()));
375376
userResponse.setObjectName("user");
376377

377378
return userResponse;

0 commit comments

Comments
 (0)