You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/07/29 09:05:09 UTC

git commit: updated refs/heads/4.2 to 11e3a43

Updated Branches:
  refs/heads/4.2 43396e900 -> 11e3a43eb


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 <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11e3a43e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11e3a43e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11e3a43e

Branch: refs/heads/4.2
Commit: 11e3a43ebe1e3e2397aed859350266e40f4e67d5
Parents: 43396e9
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jul 29 12:21:21 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jul 29 12:34:56 2013 +0530

----------------------------------------------------------------------
 .../admin/systemvm/MigrateSystemVMCmd.java      | 24 +++++++++-----------
 1 file changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11e3a43e/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
index 31871b9..7da7dc3 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
@@ -16,17 +16,6 @@
 // under the License.
 package org.apache.cloudstack.api.command.admin.systemvm;
 
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
-import org.apache.cloudstack.api.response.SystemVmResponse;
-import org.apache.log4j.Logger;
-
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -37,8 +26,17 @@ import com.cloud.host.Host;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
 import com.cloud.vm.VirtualMachine;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.HostResponse;
+import org.apache.cloudstack.api.response.SystemVmResponse;
+import org.apache.log4j.Logger;
 
-@APICommand(name = "migrateSystemVm", description="Attempts Migration of a system virtual machine to the host specified.", responseObject=SystemVmInstanceResponse.class)
+@APICommand(name = "migrateSystemVm", description="Attempts Migration of a system virtual machine to the host specified.", responseObject=SystemVmResponse.class)
 public class MigrateSystemVMCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(MigrateSystemVMCmd.class.getName());
 
@@ -112,7 +110,7 @@ public class MigrateSystemVMCmd extends BaseAsyncCmd {
             VirtualMachine migratedVm = _userVmService.migrateVirtualMachine(getVirtualMachineId(), destinationHost);
             if (migratedVm != null) {
                 // return the generic system VM instance response
-                SystemVmInstanceResponse response = _responseGenerator.createSystemVmInstanceResponse(migratedVm);
+                SystemVmResponse response = _responseGenerator.createSystemVmResponse(migratedVm);
                 response.setResponseName(getCommandName());
                 this.setResponseObject(response);
             } else {