You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/20 00:20:41 UTC
git commit: api: Annotate start,stop router cmds
Updated Branches:
refs/heads/api_refactoring 98b022a43 -> eb2a7dedd
api: Annotate start,stop router cmds
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/eb2a7ded
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/eb2a7ded
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/eb2a7ded
Branch: refs/heads/api_refactoring
Commit: eb2a7deddd29bad9ab1cb63aff319f25cbcaeac5
Parents: 98b022a
Author: Rohit Yadav <bh...@apache.org>
Authored: Wed Dec 19 15:19:46 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Dec 19 15:19:46 2012 -0800
----------------------------------------------------------------------
.../api/command/admin/router/StartRouterCmd.java | 6 ++----
.../api/command/admin/router/StopRouterCmd.java | 5 ++---
.../api/response/DomainRouterResponse.java | 3 +++
3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/eb2a7ded/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
index 37ee331..3d323c9 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
@@ -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;
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/eb2a7ded/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
index 823453a..fe282f7 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
@@ -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.")
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/eb2a7ded/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
index b899a1d..7db014e 100644
--- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
@@ -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")