mirror of https://github.com/apache/cloudstack.git
api: Annotate admin.router apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
7e3c0ec002
commit
a7e6172d8c
|
|
@ -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.PlugService;
|
||||
|
|
@ -49,11 +48,10 @@ public class ConfigureVirtualRouterElementCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName = "virtual_router_providers")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the virtual router provider")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VirtualRouterProviderResponse.class,
|
||||
required=true, description="the ID of the virtual router provider")
|
||||
private Long id;
|
||||
|
||||
@IdentityMapper(entityTableName = "physical_network_service_providers")
|
||||
@Parameter(name=ApiConstants.ENABLED, type=CommandType.BOOLEAN, required=true, description="Enabled/Disabled the service provider")
|
||||
private Boolean enabled;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.command.admin.router;
|
||||
|
||||
import org.apache.cloudstack.api.response.ProviderResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCreateCmd;
|
||||
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.PlugService;
|
||||
|
|
@ -47,8 +47,7 @@ public class CreateVirtualRouterElementCmd extends BaseAsyncCreateCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name=ApiConstants.NETWORK_SERVICE_PROVIDER_ID, type=CommandType.LONG, required=true, description="the network service provider ID of the virtual router element")
|
||||
@IdentityMapper(entityTableName="physical_network_service_providers")
|
||||
@Parameter(name=ApiConstants.NETWORK_SERVICE_PROVIDER_ID, type=CommandType.UUID, entityType = ProviderResponse.class, required=true, description="the network service provider ID of the virtual router element")
|
||||
private Long nspId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -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 DestroyRouterCmd 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;
|
||||
|
||||
// ///////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd;
|
||||
import org.apache.cloudstack.api.response.ProviderResponse;
|
||||
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.PlugService;
|
||||
|
|
@ -49,12 +49,12 @@ public class ListVirtualRouterElementsCmd extends BaseListCmd {
|
|||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@IdentityMapper(entityTableName = "virtual_router_providers")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list virtual router elements by id")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VirtualRouterProviderResponse.class,
|
||||
description="list virtual router elements by id")
|
||||
private Long id;
|
||||
|
||||
@IdentityMapper(entityTableName = "physical_network_service_providers")
|
||||
@Parameter(name=ApiConstants.NSP_ID, type=CommandType.LONG, description="list virtual router elements by network service provider id")
|
||||
@Parameter(name=ApiConstants.NSP_ID, type=CommandType.UUID, entityType = ProviderResponse.class,
|
||||
description="list virtual router elements by network service provider id")
|
||||
private Long nspId;
|
||||
|
||||
@Parameter(name=ApiConstants.ENABLED, type=CommandType.BOOLEAN, description="list network offerings by enabled state")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -44,8 +43,8 @@ public class RebootRouterCmd 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;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.command.admin.router;
|
||||
|
||||
import org.apache.cloudstack.api.response.DiskOfferingResponse;
|
||||
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;
|
||||
|
|
@ -37,12 +37,12 @@ public class UpgradeRouterCmd extends BaseCmd {
|
|||
//////////////// 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;
|
||||
|
||||
@IdentityMapper(entityTableName="disk_offering")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the service offering ID to apply to the domain router")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType = DiskOfferingResponse.class,
|
||||
required=true, description="the service offering ID to apply to the domain router")
|
||||
private Long serviceOfferingId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,11 +16,14 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import com.cloud.network.VirtualRouterProvider;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.Entity;
|
||||
|
||||
@Entity(value=VirtualRouterProvider.class)
|
||||
public class VirtualRouterProviderResponse extends BaseResponse implements ControlledEntityResponse {
|
||||
@SerializedName(ApiConstants.ID) @Param(description="the id of the router")
|
||||
private String id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue