From 2f70032972e1f1b9ae711091d4b33baf89dcde3b Mon Sep 17 00:00:00 2001 From: NIKITA Date: Thu, 21 Oct 2010 17:57:38 -0700 Subject: [PATCH] conflict --- .../com/cloud/api/commands/DeployVMCmd.java | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) mode change 100755 => 100644 server/src/com/cloud/api/commands/DeployVMCmd.java diff --git a/server/src/com/cloud/api/commands/DeployVMCmd.java b/server/src/com/cloud/api/commands/DeployVMCmd.java old mode 100755 new mode 100644 index 29623d41282..b65d8ae6d5f --- a/server/src/com/cloud/api/commands/DeployVMCmd.java +++ b/server/src/com/cloud/api/commands/DeployVMCmd.java @@ -16,8 +16,8 @@ * */ -package com.cloud.api.commands; - +package com.cloud.api.commands; + import java.util.List; import org.apache.log4j.Logger; @@ -25,6 +25,7 @@ import org.apache.log4j.Logger; import com.cloud.api.ApiDBUtils; import com.cloud.api.BaseAsyncCmd; import com.cloud.api.BaseCmd; +import com.cloud.api.BaseCmd.Manager; import com.cloud.api.Implementation; import com.cloud.api.Parameter; import com.cloud.api.response.UserVmResponse; @@ -37,12 +38,12 @@ import com.cloud.user.UserContext; import com.cloud.uservm.UserVm; import com.cloud.vm.InstanceGroupVO; -@Implementation(method="deployVirtualMachine", description="Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.") -public class DeployVMCmd extends BaseAsyncCmd { - public static final Logger s_logger = Logger.getLogger(DeployVMCmd.class.getName()); - +@Implementation(createMethod="createVirtualMachine", method="startVirtualMachine", manager=Manager.UserVmManager, description="Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.") +public class DeployVmCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(DeployVMCmd.class.getName()); + private static final String s_name = "deployvirtualmachineresponse"; - + ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @@ -153,17 +154,17 @@ public class DeployVMCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Override - public String getName() { - return s_name; - } - - public static String getResultObjectName() { - return "virtualmachine"; - } - + public String getName() { + return s_name; + } + + public static String getResultObjectName() { + return "virtualmachine"; + } + @Override public long getAccountId() { - Account account = (Account)UserContext.current().getAccount(); + Account account = UserContext.current().getAccount(); if ((account == null) || isAdmin(account.getType())) { if ((domainId != null) && (accountName != null)) { Account userAccount = ApiDBUtils.findAccountByNameDomain(accountName, domainId); @@ -195,7 +196,6 @@ public class DeployVMCmd extends BaseAsyncCmd { UserVm userVm = (UserVm)getResponseObject(); UserVmResponse response = new UserVmResponse(); - response.setResponseName(getResultObjectName()); response.setId(userVm.getId()); response.setName(userVm.getName()); response.setCreated(userVm.getCreated()); @@ -293,6 +293,7 @@ public class DeployVMCmd extends BaseAsyncCmd { response.setNetworkGroupList(ApiDBUtils.getNetworkGroupsNamesForVm(userVm.getId())); + response.setResponseName(getName()); return response; - } -} + } +}