mirror of https://github.com/apache/cloudstack.git
api_refactoring: Add parameter annotation for admin zone group.
Add the entityType to the parameter annotation. modified: api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java modified: api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java modified: api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java modified: api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
da6e81aa21
commit
3d04bfcadc
|
|
@ -24,6 +24,8 @@ 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 com.cloud.api.response.DomainResponse;
|
||||
import com.cloud.api.response.ZoneResponse;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -60,8 +62,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")
|
||||
//@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)
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, required=true, description="network type of the zone, can be Basic or Advanced")
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import org.apache.cloudstack.api.Implementation;
|
|||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import com.cloud.api.response.SuccessResponse;
|
||||
import com.cloud.api.response.ZoneResponse;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
|
|
@ -38,8 +39,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")
|
||||
//@IdentityMapper(entityTableName="data_center")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
|
||||
private Long id;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ import com.cloud.user.Account;
|
|||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.api.response.AccountResponse;
|
||||
import com.cloud.api.response.DomainResponse;
|
||||
import com.cloud.api.response.ZoneResponse;
|
||||
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
|
||||
|
|
@ -41,16 +44,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.")
|
||||
//@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)
|
||||
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.")
|
||||
//@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)
|
||||
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.")
|
||||
//@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)
|
||||
private Long defaultZoneId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -51,8 +51,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")
|
||||
//@IdentityMapper(entityTableName="data_center")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.INTERNAL_DNS1, type=CommandType.STRING, description="the first internal DNS for the Zone")
|
||||
|
|
|
|||
Loading…
Reference in New Issue