Skip to content

Commit bcf239d

Browse files
author
Prasanna Santhanam
committed
CLOUDSTACK-2715: Making MigrateSysteVm response uniform
with responses on other systemVm apis. All systemVM apis return SystemVmResponse - rebootSystemVm, stopSystemVm etc. MigrateSystemVm is now made uniform. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent 9c24be4 commit bcf239d

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

‎api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,27 @@
1616
// under the License.
1717
package org.apache.cloudstack.api.command.admin.systemvm;
1818

19+
import com.cloud.event.EventTypes;
20+
import com.cloud.exception.ConcurrentOperationException;
21+
import com.cloud.exception.InvalidParameterValueException;
22+
import com.cloud.exception.ManagementServerException;
23+
import com.cloud.exception.ResourceUnavailableException;
24+
import com.cloud.exception.VirtualMachineMigrationException;
25+
import com.cloud.host.Host;
26+
import com.cloud.user.Account;
27+
import com.cloud.vm.VirtualMachine;
1928
import org.apache.cloudstack.api.APICommand;
2029
import org.apache.cloudstack.api.ApiConstants;
2130
import org.apache.cloudstack.api.ApiErrorCode;
2231
import org.apache.cloudstack.api.BaseAsyncCmd;
2332
import org.apache.cloudstack.api.Parameter;
2433
import org.apache.cloudstack.api.ServerApiException;
2534
import org.apache.cloudstack.api.response.HostResponse;
26-
import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
2735
import org.apache.cloudstack.api.response.SystemVmResponse;
2836
import org.apache.cloudstack.context.CallContext;
29-
3037
import org.apache.log4j.Logger;
3138

32-
import com.cloud.event.EventTypes;
33-
import com.cloud.exception.ConcurrentOperationException;
34-
import com.cloud.exception.InvalidParameterValueException;
35-
import com.cloud.exception.ManagementServerException;
36-
import com.cloud.exception.ResourceUnavailableException;
37-
import com.cloud.exception.VirtualMachineMigrationException;
38-
import com.cloud.host.Host;
39-
import com.cloud.user.Account;
40-
import com.cloud.vm.VirtualMachine;
41-
42-
@APICommand(name = "migrateSystemVm", description="Attempts Migration of a system virtual machine to the host specified.", responseObject=SystemVmInstanceResponse.class)
39+
@APICommand(name = "migrateSystemVm", description="Attempts Migration of a system virtual machine to the host specified.", responseObject=SystemVmResponse.class)
4340
public class MigrateSystemVMCmd extends BaseAsyncCmd {
4441
public static final Logger s_logger = Logger.getLogger(MigrateSystemVMCmd.class.getName());
4542

@@ -113,7 +110,7 @@ public void execute(){
113110
VirtualMachine migratedVm = _userVmService.migrateVirtualMachine(getVirtualMachineId(), destinationHost);
114111
if (migratedVm != null) {
115112
// return the generic system VM instance response
116-
SystemVmInstanceResponse response = _responseGenerator.createSystemVmInstanceResponse(migratedVm);
113+
SystemVmResponse response = _responseGenerator.createSystemVmResponse(migratedVm);
117114
response.setResponseName(getCommandName());
118115
this.setResponseObject(response);
119116
} else {

0 commit comments

Comments
 (0)