mirror of https://github.com/apache/cloudstack.git
f5: Annotate f5 cmd classes, remove IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
4cf0b05a0b
commit
4dd5f14e76
|
|
@ -44,8 +44,8 @@ public class ConfigureF5LoadBalancerCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_load_balancer_devices")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required=true, description="F5 load balancer device ID")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType = F5LoadBalancerResponse.class,
|
||||
required=true, description="F5 load balancer device ID")
|
||||
private Long lbDeviceId;
|
||||
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_CAPACITY, type=CommandType.LONG, required=false, description="capacity of the device, Capacity will be interpreted as number of networks device can handle")
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import org.apache.cloudstack.api.Parameter;
|
|||
import org.apache.cloudstack.api.PlugService;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.SuccessResponse;
|
||||
import com.cloud.api.response.F5LoadBalancerResponse;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
|
|
@ -49,8 +50,8 @@ public class DeleteF5LoadBalancerCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_load_balancer_devices")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required=true, description="netscaler load balancer device ID")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType = F5LoadBalancerResponse.class,
|
||||
required=true, description="netscaler load balancer device ID")
|
||||
private Long lbDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.BaseListCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.PlugService;
|
||||
|
|
@ -52,8 +51,8 @@ public class ListF5LoadBalancerNetworksCmd extends BaseListCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_load_balancer_devices")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required = true, description="f5 load balancer device ID")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType = F5LoadBalancerResponse.class,
|
||||
required = true, description="f5 load balancer device ID")
|
||||
private Long lbDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public class ListF5LoadBalancersCmd extends BaseListCmd {
|
|||
description="the Physical Network ID")
|
||||
private Long physicalNetworkId;
|
||||
|
||||
@IdentityMapper(entityTableName="external_load_balancer_devices")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, description="f5 load balancer device ID")
|
||||
@Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType = F5LoadBalancerResponse.class,
|
||||
description="f5 load balancer device ID")
|
||||
private Long lbDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,11 +16,14 @@
|
|||
// under the License.
|
||||
package com.cloud.api.response;
|
||||
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import com.cloud.network.ExternalLoadBalancerDeviceVO;
|
||||
|
||||
@EntityReference(value=ExternalLoadBalancerDeviceVO.class)
|
||||
public class F5LoadBalancerResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.LOAD_BALANCER_DEVICE_ID) @Param(description="device id of the F5 load balancer")
|
||||
private String id;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
// under the License.
|
||||
package com.cloud.network;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ import javax.persistence.Table;
|
|||
|
||||
@Entity
|
||||
@Table(name="external_load_balancer_devices")
|
||||
public class ExternalLoadBalancerDeviceVO implements InternalIdentity {
|
||||
public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
|
|
|||
Loading…
Reference in New Issue