API-refactoring -- Add pod annotation, needed for the deployVM flow test.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Fang Wang 2012-12-14 12:50:29 -08:00 committed by Rohit Yadav
parent a2a3ef63c2
commit efa034e821
4 changed files with 19 additions and 10 deletions

View File

@ -25,6 +25,8 @@ import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import com.cloud.dc.Pod;
import com.cloud.user.Account;
@ -40,8 +42,8 @@ public class CreatePodCmd extends BaseCmd {
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the Pod")
private String podName;
@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the Zone ID in which the Pod will be created ")
//@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the Zone ID in which the Pod will be created ", entityType=ZoneResponse.class)
private Long zoneId;
@Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the starting IP address for the Pod")

View File

@ -24,7 +24,10 @@ import org.apache.cloudstack.api.IdentityMapper;
import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import com.cloud.user.Account;
@Implementation(description="Deletes a Pod.", responseObject=SuccessResponse.class)
@ -37,8 +40,8 @@ public class DeletePodCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Pod")
//@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Pod", entityType=PodResponse.class)
private Long id;

View File

@ -28,6 +28,8 @@ import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import com.cloud.dc.Pod;
import com.cloud.utils.Pair;
@ -41,15 +43,15 @@ public class ListPodsByCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list Pods by ID")
//@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list Pods by ID", entityType=PodResponse.class)
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list Pods by name")
private String podName;
@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="list Pods by Zone ID")
//@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="list Pods by Zone ID", entityType=ZoneResponse.class)
private Long zoneId;
@Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="list pods by allocation state")

View File

@ -25,6 +25,8 @@ import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import com.cloud.dc.Pod;
import com.cloud.user.Account;
@ -38,8 +40,8 @@ public class UpdatePodCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Pod")
//@IdentityMapper(entityTableName="host_pod_ref")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Pod", entityType=PodResponse.class)
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the Pod")