mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
api: Annotate start,stop router cmds
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
98b022a430
commit
eb2a7deddd
@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
@ -35,7 +34,6 @@ import com.cloud.network.router.VirtualRouter;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
|
||||
@Implementation(responseObject=DomainRouterResponse.class, description="Starts a router.")
|
||||
public class StartRouterCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(StartRouterCmd.class.getName());
|
||||
@ -46,8 +44,8 @@ public class StartRouterCmd extends BaseAsyncCmd {
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the router")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainRouterResponse.class,
|
||||
required=true, description="the ID of the router")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
@ -43,8 +42,8 @@ public class StopRouterCmd extends BaseAsyncCmd {
|
||||
// ////////////// API parameters /////////////////////
|
||||
// ///////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = true, description = "the ID of the router")
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class,
|
||||
required = true, description = "the ID of the router")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM. The caller knows the VM is stopped.")
|
||||
|
||||
@ -21,12 +21,15 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.vm.VirtualMachine.State;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.Entity;
|
||||
|
||||
@Entity(value=VirtualMachine.class)
|
||||
@SuppressWarnings("unused")
|
||||
public class DomainRouterResponse extends BaseResponse implements ControlledViewEntityResponse{
|
||||
@SerializedName(ApiConstants.ID) @Param(description="the id of the router")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user