api: Annotate pod,zone admin apis

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2012-12-21 17:06:22 -08:00
parent 08892c51a3
commit 3209a3a858
8 changed files with 22 additions and 29 deletions

View File

@ -20,7 +20,6 @@ import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
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;
@ -42,8 +41,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 ", entityType=ZoneResponse.class)
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
required=true, description="the Zone ID in which the Pod will be created")
private Long zoneId;
@Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the starting IP address for the Pod")

View File

@ -20,13 +20,11 @@ import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
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;
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;
@ -40,11 +38,10 @@ 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", entityType=PodResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=PodResponse.class,
required=true, description="the ID of the Pod")
private Long id;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////

View File

@ -23,7 +23,6 @@ import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
import org.apache.cloudstack.api.IdentityMapper;
import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ListResponse;
@ -43,15 +42,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", entityType=PodResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=PodResponse.class,
description="list Pods by ID")
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", entityType=ZoneResponse.class)
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
description="list Pods by Zone ID")
private Long zoneId;
@Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="list pods by allocation state")

View File

@ -20,12 +20,10 @@ import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
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;
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 +38,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", entityType=PodResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=PodResponse.class,
required=true, description="the ID of the Pod")
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the Pod")

View File

@ -61,8 +61,8 @@ public class CreateZoneCmd extends BaseCmd {
@Parameter(name=ApiConstants.DOMAIN, type=CommandType.STRING, description="Network domain name for the networks in the zone")
private String domain;
//@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public zones", entityType=DomainResponse.class)
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
description="the ID of the containing domain, null for public zones")
private Long domainId;
@Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, required=true, description="network type of the zone, can be Basic or Advanced")

View File

@ -38,8 +38,8 @@ public class DeleteZoneCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
//@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ZoneResponse.class,
required=true, description="the ID of the Zone")
private Long id;

View File

@ -43,16 +43,16 @@ public class MarkDefaultZoneForAccountCmd extends BaseAsyncCmd {
////////////////API parameters //////////////////////
/////////////////////////////////////////////////////
//@IdentityMapper(entityTableName="account")
@Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="Name of the account that is to be marked.", entityType=AccountResponse.class)
@Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, entityType=AccountResponse.class,
required=true, description="Name of the account that is to be marked.")
private String accountName;
//@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="Marks the account that belongs to the specified domain.", entityType=DomainResponse.class)
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
required=true, description="Marks the account that belongs to the specified domain.")
private Long domainId;
//@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="The Zone ID with which the account is to be marked.", entityType=ZoneResponse.class)
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
required=true, description="The Zone ID with which the account is to be marked.")
private Long defaultZoneId;
/////////////////////////////////////////////////////

View File

@ -50,8 +50,8 @@ public class UpdateZoneCmd extends BaseCmd {
@Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone")
private String guestCidrAddress;
//@IdentityMapper(entityTableName="data_center")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ZoneResponse.class,
required=true, description="the ID of the Zone")
private Long id;
@Parameter(name=ApiConstants.INTERNAL_DNS1, type=CommandType.STRING, description="the first internal DNS for the Zone")