|
16 | 16 | // under the License. |
17 | 17 | package org.apache.cloudstack.api.command.admin.account; |
18 | 18 |
|
19 | | -import com.cloud.user.Account; |
20 | | -import com.cloud.user.UserAccount; |
| 19 | +import java.util.Collection; |
| 20 | +import java.util.Map; |
| 21 | + |
| 22 | +import org.apache.log4j.Logger; |
21 | 23 |
|
22 | 24 | import org.apache.cloudstack.api.APICommand; |
23 | 25 | import org.apache.cloudstack.api.ApiConstants; |
24 | 26 | import org.apache.cloudstack.api.ApiErrorCode; |
25 | 27 | import org.apache.cloudstack.api.BaseCmd; |
26 | 28 | import org.apache.cloudstack.api.Parameter; |
| 29 | +import org.apache.cloudstack.api.ResponseObject.ResponseView; |
27 | 30 | import org.apache.cloudstack.api.ServerApiException; |
28 | 31 | import org.apache.cloudstack.api.response.AccountResponse; |
29 | 32 | import org.apache.cloudstack.api.response.DomainResponse; |
30 | 33 | import org.apache.cloudstack.context.CallContext; |
31 | 34 |
|
32 | | -import org.apache.log4j.Logger; |
33 | | - |
34 | | -import java.util.Collection; |
35 | | -import java.util.Map; |
| 35 | +import com.cloud.user.Account; |
| 36 | +import com.cloud.user.UserAccount; |
36 | 37 |
|
37 | 38 | @APICommand(name = "createAccount", description="Creates an account", responseObject=AccountResponse.class) |
38 | 39 | public class CreateAccountCmd extends BaseCmd { |
@@ -166,9 +167,9 @@ public void execute(){ |
166 | 167 | UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), |
167 | 168 | getDomainId(), getNetworkDomain(), getDetails(), getAccountUUID(), getUserUUID()); |
168 | 169 | if (userAccount != null) { |
169 | | - AccountResponse response = _responseGenerator.createUserAccountResponse(userAccount); |
| 170 | + AccountResponse response = _responseGenerator.createUserAccountResponse(ResponseView.Full, userAccount); |
170 | 171 | response.setResponseName(getCommandName()); |
171 | | - this.setResponseObject(response); |
| 172 | + setResponseObject(response); |
172 | 173 | } else { |
173 | 174 | throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a user account"); |
174 | 175 | } |
|
0 commit comments