mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
api: Annotate phy network apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
9624a59d8e
commit
275208e175
@ -23,10 +23,10 @@ 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.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
|
||||
import org.apache.cloudstack.api.response.ProviderResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
@ -45,12 +45,12 @@ public class AddNetworkServiceProviderCmd extends BaseAsyncCreateCmd {
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="physical_network")
|
||||
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true, description="the Physical Network ID to add the provider to")
|
||||
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class,
|
||||
required=true, description="the Physical Network ID to add the provider to")
|
||||
private Long physicalNetworkId;
|
||||
|
||||
@IdentityMapper(entityTableName="physical_network")
|
||||
@Parameter(name=ApiConstants.DEST_PHYSICAL_NETWORK_ID, type=CommandType.LONG, description="the destination Physical Network ID to bridge to")
|
||||
@Parameter(name=ApiConstants.DEST_PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class,
|
||||
description="the destination Physical Network ID to bridge to")
|
||||
private Long destinationPhysicalNetworkId;
|
||||
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name for the physical network service provider")
|
||||
|
||||
@ -23,11 +23,11 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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;
|
||||
@ -72,8 +72,8 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
|
||||
@Parameter(name=ApiConstants.CONSERVE_MODE, type=CommandType.BOOLEAN, description="true if the network offering is IP conserve mode enabled")
|
||||
private Boolean conserveMode;
|
||||
|
||||
@IdentityMapper(entityTableName="disk_offering")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, description="the service offering ID used by virtual router provider")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=DiskOfferingResponse.class,
|
||||
description="the service offering ID used by virtual router provider")
|
||||
private Long serviceOfferingId;
|
||||
|
||||
@Parameter(name=ApiConstants.GUEST_IP_TYPE, type=CommandType.STRING, required=true, description="guest type of the network offering: Shared or Isolated")
|
||||
|
||||
@ -23,11 +23,12 @@ 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.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
|
||||
import org.apache.cloudstack.api.response.DomainResponse;
|
||||
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
@ -45,8 +46,8 @@ public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd {
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="data_center")
|
||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the Zone ID for the physical network")
|
||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType= ZoneResponse.class,
|
||||
required=true, description="the Zone ID for the physical network")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, description="the VLAN for the physical network")
|
||||
@ -55,8 +56,8 @@ public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd {
|
||||
@Parameter(name=ApiConstants.NETWORK_SPEED, type=CommandType.STRING, description="the speed for the physical network[1G/10G]")
|
||||
private String speed;
|
||||
|
||||
@IdentityMapper(entityTableName="domain")
|
||||
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="domain ID of the account owning a physical network")
|
||||
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
|
||||
description="domain ID of the account owning a physical network")
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name=ApiConstants.BROADCAST_DOMAIN_RANGE, type=CommandType.STRING, description="the broadcast domain range for the physical network[Pod or Zone]. In Acton release it can be Zone only in Advance zone, and Pod in Basic")
|
||||
|
||||
@ -21,10 +21,10 @@ 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;
|
||||
import org.apache.cloudstack.api.response.PodResponse;
|
||||
import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
|
||||
import com.cloud.dc.StorageNetworkIpRange;
|
||||
import com.cloud.event.EventTypes;
|
||||
@ -43,8 +43,8 @@ public class CreateStorageNetworkIpRangeCmd extends BaseAsyncCmd {
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@IdentityMapper(entityTableName="host_pod_ref")
|
||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, required=true, description="UUID of pod where the ip range belongs to")
|
||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class,
|
||||
required=true, description="UUID of pod where the ip range belongs to")
|
||||
private Long podId;
|
||||
|
||||
@Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the beginning IP address")
|
||||
|
||||
@ -18,11 +18,14 @@ package org.apache.cloudstack.api.response;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.offering.DiskOffering;
|
||||
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=DiskOffering.class)
|
||||
public class DiskOfferingResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.ID) @Param(description="unique ID of the disk offering")
|
||||
private String id;
|
||||
|
||||
@ -18,12 +18,15 @@ package org.apache.cloudstack.api.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.network.PhysicalNetwork;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.utils.IdentityProxy;
|
||||
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=PhysicalNetwork.class)
|
||||
@SuppressWarnings("unused")
|
||||
public class PhysicalNetworkResponse extends BaseResponse {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user