mirror of https://github.com/apache/cloudstack.git
api: Annotate cfg and hypervisorcapabilities apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
fb9db2b1b1
commit
855ba0439f
|
|
@ -23,7 +23,6 @@ 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.response.HypervisorCapabilitiesResponse;
|
||||
|
|
@ -42,14 +41,13 @@ public class ListHypervisorCapabilitiesCmd extends BaseListCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="hypervisor_capabilities")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=HypervisorCapabilitiesResponse.class,
|
||||
description="ID of the hypervisor capability")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor for which to restrict the search")
|
||||
private String hypervisor;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ 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;
|
||||
|
|
@ -29,7 +28,6 @@ import org.apache.cloudstack.api.response.ServiceOfferingResponse;
|
|||
import com.cloud.hypervisor.HypervisorCapabilities;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
|
||||
@Implementation(description="Updates a hypervisor capabilities.", responseObject=ServiceOfferingResponse.class, since="3.0.0")
|
||||
public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(UpdateHypervisorCapabilitiesCmd.class.getName());
|
||||
|
|
@ -39,8 +37,8 @@ public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="hypervisor_capabilities")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="ID of the hypervisor capability")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=HypervisorCapabilitiesResponse.class,
|
||||
description="ID of the hypervisor capability")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.SECURITY_GROUP_EANBLED, type=CommandType.BOOLEAN, description="set true to enable security group for this hypervisor.")
|
||||
|
|
@ -65,8 +63,6 @@ public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
|
|||
return maxGuestsLimit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,12 +16,15 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.response;
|
||||
|
||||
import com.cloud.hypervisor.HypervisorCapabilities;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
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=HypervisorCapabilities.class)
|
||||
public class HypervisorCapabilitiesResponse extends BaseResponse {
|
||||
@SerializedName(ApiConstants.ID) @Param(description="the ID of the hypervisor capabilities row")
|
||||
private String id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue