mirror of https://github.com/apache/cloudstack.git
api: Annotate VPC apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
1931667243
commit
02efffa93e
|
|
@ -16,12 +16,13 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.command.user.vpc;
|
||||
|
||||
import org.apache.cloudstack.api.response.AccountResponse;
|
||||
import org.apache.cloudstack.api.response.StaticRouteResponse;
|
||||
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;
|
||||
|
|
@ -42,13 +43,13 @@ public class DeleteStaticRouteCmd extends BaseAsyncCmd{
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="static_routes")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the static route")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = StaticRouteResponse.class,
|
||||
required=true, description="the ID of the static route")
|
||||
private Long id;
|
||||
|
||||
// unexposed parameter needed for events logging
|
||||
@IdentityMapper(entityTableName="account")
|
||||
@Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.LONG, expose=false)
|
||||
@Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.UUID, entityType = AccountResponse.class,
|
||||
expose=false)
|
||||
private Long ownerId;
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.command.user.vpc;
|
||||
|
||||
import org.apache.cloudstack.api.response.VpcResponse;
|
||||
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;
|
||||
|
|
@ -32,7 +32,6 @@ import com.cloud.exception.ResourceUnavailableException;
|
|||
import com.cloud.network.vpc.Vpc;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
|
||||
@Implementation(description="Deletes a VPC", responseObject=SuccessResponse.class)
|
||||
public class DeleteVPCCmd extends BaseAsyncCmd{
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteVPCCmd.class.getName());
|
||||
|
|
@ -42,11 +41,10 @@ public class DeleteVPCCmd extends BaseAsyncCmd{
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vpc")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the VPC")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VpcResponse.class,
|
||||
required=true, description="the ID of the VPC")
|
||||
private Long id;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
@ -55,7 +53,6 @@ public class DeleteVPCCmd extends BaseAsyncCmd{
|
|||
return id;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class ListPrivateGatewaysCmd extends BaseListProjectAndAccountResourcesCm
|
|||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=PrivateGatewayResponse.class,
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=PrivateGatewayResponse.class,
|
||||
description="list private gateway by id")
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue