mirror of https://github.com/apache/cloudstack.git
srx: Annotate api classes, remove IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
4dd5f14e76
commit
65a1284e83
|
|
@ -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.APICommand;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.PlugService;
|
||||
|
|
@ -49,8 +48,8 @@ public class ConfigureSrxFirewallCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_load_balancer_devices")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.LONG, required=true, description="SRX firewall device ID")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.UUID, entityType = SrxFirewallResponse.class,
|
||||
required=true, description="SRX firewall device ID")
|
||||
private Long fwDeviceId;
|
||||
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_CAPACITY, type=CommandType.LONG, required=false, description="capacity of the firewall device, Capacity will be interpreted as number of networks device can handle")
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ 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.APICommand;
|
||||
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.SrxFirewallResponse;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
|
|
@ -47,8 +47,8 @@ public class DeleteSrxFirewallCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_firewall_devices")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.LONG, required=true, description="srx firewall device ID")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.UUID, entityType = SrxFirewallResponse.class,
|
||||
required=true, description="srx firewall device ID")
|
||||
private Long fwDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.cloudstack.api.response.NetworkResponse;
|
||||
import com.cloud.api.response.SrxFirewallResponse;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
|
|
@ -45,8 +46,8 @@ public class ListSrxFirewallNetworksCmd extends BaseListCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="external_firewall_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 = SrxFirewallResponse.class,
|
||||
required = true, description="netscaler load balancer device ID")
|
||||
private Long fwDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public class ListSrxFirewallsCmd extends BaseListCmd {
|
|||
description="the Physical Network ID")
|
||||
private Long physicalNetworkId;
|
||||
|
||||
@IdentityMapper(entityTableName="external_firewall_devices")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.LONG, description="SRX firewall device ID")
|
||||
@Parameter(name=ApiConstants.FIREWALL_DEVICE_ID, type=CommandType.UUID, entityType = SrxFirewallResponse.class,
|
||||
description="SRX firewall device ID")
|
||||
private Long fwDeviceId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -17,10 +17,13 @@
|
|||
package com.cloud.api.response;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.EntityReference;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import com.cloud.network.ExternalFirewallDeviceVO;
|
||||
|
||||
@EntityReference(value=ExternalFirewallDeviceVO.class)
|
||||
@SuppressWarnings("unused")
|
||||
public class SrxFirewallResponse extends BaseResponse {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
// under the License.
|
||||
package com.cloud.network;
|
||||
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -35,7 +36,7 @@ import javax.persistence.Table;
|
|||
|
||||
@Entity
|
||||
@Table(name="external_firewall_devices")
|
||||
public class ExternalFirewallDeviceVO implements InternalIdentity {
|
||||
public class ExternalFirewallDeviceVO implements InternalIdentity, Identity {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
|
|
|
|||
Loading…
Reference in New Issue