api: Annotate iso related cmd and response classes Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0e1083ad Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0e1083ad Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0e1083ad Branch: refs/heads/api_refactoring Commit: 0e1083ad83d6e8b2fc6de69744449255e9cd450b Parents: 503db14 Author: Rohit Yadav <[email protected]> Authored: Sun Dec 23 02:40:14 2012 -0800 Committer: Rohit Yadav <[email protected]> Committed: Sun Dec 23 02:41:11 2012 -0800 ---------------------------------------------------------------------- .../commands/ListTemplateOrIsoPermissionsCmd.java | 3 +- .../cloud/api/commands/UpdateTemplateOrIsoCmd.java | 11 ++++--- .../UpdateTemplateOrIsoPermissionsCmd.java | 11 ++++--- .../api/command/user/iso/AttachIsoCmd.java | 10 +++--- .../api/command/user/iso/DeleteIsoCmd.java | 11 ++++--- .../api/command/user/iso/DetachIsoCmd.java | 6 ++-- .../api/command/user/iso/ExtractIsoCmd.java | 11 ++++--- .../api/command/user/iso/ListIsosCmd.java | 10 +++--- .../api/command/user/iso/RegisterIsoCmd.java | 21 ++++++++------ .../cloudstack/api/response/GuestOSResponse.java | 3 ++ .../api/response/TemplatePermissionsResponse.java | 3 ++ 11 files changed, 57 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/com/cloud/api/commands/ListTemplateOrIsoPermissionsCmd.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/api/commands/ListTemplateOrIsoPermissionsCmd.java b/api/src/com/cloud/api/commands/ListTemplateOrIsoPermissionsCmd.java index 031f243..c616cce 100644 --- a/api/src/com/cloud/api/commands/ListTemplateOrIsoPermissionsCmd.java +++ b/api/src/com/cloud/api/commands/ListTemplateOrIsoPermissionsCmd.java @@ -40,7 +40,8 @@ public class ListTemplateOrIsoPermissionsCmd extends BaseCmd { ///////////////////////////////////////////////////// @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the template ID") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplatePermissionsResponse.class, + required=true, description="the template ID") private Long id; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/com/cloud/api/commands/UpdateTemplateOrIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/api/commands/UpdateTemplateOrIsoCmd.java b/api/src/com/cloud/api/commands/UpdateTemplateOrIsoCmd.java index 407b4c9..57e8e55 100755 --- a/api/src/com/cloud/api/commands/UpdateTemplateOrIsoCmd.java +++ b/api/src/com/cloud/api/commands/UpdateTemplateOrIsoCmd.java @@ -17,11 +17,12 @@ package com.cloud.api.commands; import org.apache.cloudstack.api.command.user.iso.UpdateIsoCmd; +import org.apache.cloudstack.api.response.GuestOSResponse; +import org.apache.cloudstack.api.response.TemplateResponse; 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.Parameter; public abstract class UpdateTemplateOrIsoCmd extends BaseCmd { @@ -37,15 +38,15 @@ public abstract class UpdateTemplateOrIsoCmd extends BaseCmd { @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the image", length=4096) private String displayText; - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the image file") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="the ID of the image file") private Long id; @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the image file") private String templateName; - @IdentityMapper(entityTableName="guest_os") - @Parameter(name=ApiConstants.OS_TYPE_ID, type=CommandType.LONG, description="the ID of the OS type that best represents the OS of this image.") + @Parameter(name=ApiConstants.OS_TYPE_ID, type=CommandType.UUID, entityType = GuestOSResponse.class, + description="the ID of the OS type that best represents the OS of this image.") private Long osTypeId; @Parameter(name=ApiConstants.FORMAT, type=CommandType.STRING, description="the format for the image") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/com/cloud/api/commands/UpdateTemplateOrIsoPermissionsCmd.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/api/commands/UpdateTemplateOrIsoPermissionsCmd.java b/api/src/com/cloud/api/commands/UpdateTemplateOrIsoPermissionsCmd.java index f912300..5208e1d 100755 --- a/api/src/com/cloud/api/commands/UpdateTemplateOrIsoPermissionsCmd.java +++ b/api/src/com/cloud/api/commands/UpdateTemplateOrIsoPermissionsCmd.java @@ -18,11 +18,12 @@ package com.cloud.api.commands; import java.util.List; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.TemplateResponse; 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.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; @@ -39,8 +40,8 @@ public abstract class UpdateTemplateOrIsoPermissionsCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNTS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "a comma delimited list of accounts. If specified, \"op\" parameter has to be passed in.") private List<String> accountNames; - @IdentityMapper(entityTableName="vm_template") - @Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = true, description = "the template ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, + required = true, description = "the template ID") private Long id; @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true for featured template/iso, false otherwise") @@ -55,8 +56,8 @@ public abstract class UpdateTemplateOrIsoPermissionsCmd extends BaseCmd { @Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "permission operator (add, remove, reset)") private String operation; - @IdentityMapper(entityTableName="projects") - @Parameter(name = ApiConstants.PROJECT_IDS, type = CommandType.LIST, collectionType = CommandType.LONG, description = "a comma delimited list of projects. If specified, \"op\" parameter has to be passed in.") + @Parameter(name = ApiConstants.PROJECT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectResponse.class, + description = "a comma delimited list of projects. If specified, \"op\" parameter has to be passed in.") private List<Long> projectIds; // /////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java index d2026ea..755dbb6 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java @@ -17,12 +17,12 @@ package org.apache.cloudstack.api.command.user.iso; import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; +import org.apache.cloudstack.api.response.TemplateResponse; 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; @@ -42,12 +42,12 @@ public class AttachIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the ISO file") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="the ID of the ISO file") private Long id; - @IdentityMapper(entityTableName="vm_instance") - @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="the ID of the virtual machine") + @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="the ID of the virtual machine") private Long virtualMachineId; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java index 3d6122e..2f5a767 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java @@ -21,11 +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.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.template.VirtualMachineTemplate; @@ -41,12 +42,12 @@ public class DeleteIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the ISO file") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="the ID of the ISO file") private Long id; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the ID of the zone of the ISO file. If not specified, the ISO will be deleted from all the zones") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + description="the ID of the zone of the ISO file. If not specified, the ISO will be deleted from all the zones") private Long zoneId; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java index 36555f2..a79c700 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java @@ -17,12 +17,12 @@ package org.apache.cloudstack.api.command.user.iso; import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; +import org.apache.cloudstack.api.response.TemplateResponse; 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; @@ -41,8 +41,8 @@ public class DetachIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_instance") - @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine") + @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="The ID of the virtual machine") private Long virtualMachineId; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java index 1fbb7e8..d2d6859 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java @@ -16,12 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; +import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; 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,15 +44,15 @@ public class ExtractIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the ISO file") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, + required=true, description="the ID of the ISO file") private Long id; @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=false, description="the url to which the ISO would be extracted") private String url; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=false, description="the ID of the zone where the ISO is originally located") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required=false, description="the ID of the zone where the ISO is originally located") private Long zoneId; @Parameter(name=ApiConstants.MODE, type=CommandType.STRING, required=true, description="the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java index 8b641f2..7b5feae 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java @@ -20,11 +20,11 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; +import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.IdentityMapper; import org.apache.cloudstack.api.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; @@ -51,8 +51,8 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd { @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor for which to restrict the search") private String hypervisor; - @IdentityMapper(entityTableName="vm_template") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list all isos by id") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, + description="list all isos by id") private Long id; @Parameter(name=ApiConstants.IS_PUBLIC, type=CommandType.BOOLEAN, description="true if the ISO is publicly available to all users, false otherwise.") @@ -71,8 +71,8 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd { @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list all isos by name") private String isoName; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the ID of the zone") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + description="the ID of the zone") private Long zoneId; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java index 0961800..a380b13 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java @@ -22,12 +22,15 @@ 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; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.GuestOSResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.exception.ResourceAllocationException; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.UserContext; @@ -60,19 +63,19 @@ public class RegisterIsoCmd extends BaseCmd { @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the ISO") private String isoName; - @IdentityMapper(entityTableName="guest_os") - @Parameter(name=ApiConstants.OS_TYPE_ID, type=CommandType.LONG, description="the ID of the OS Type that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed") + @Parameter(name=ApiConstants.OS_TYPE_ID, type=CommandType.UUID, entityType = GuestOSResponse.class, + description="the ID of the OS Type that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed") private Long osTypeId; @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL to where the ISO is currently being hosted") private String url; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the ID of the zone you wish to register the ISO to.") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required=true, description="the ID of the zone you wish to register the ISO to.") private Long zoneId; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="an optional domainId. If the account parameter is used, domainId must also be used.") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, + description="an optional domainId. If the account parameter is used, domainId must also be used.") private Long domainId; @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional account name. Must be used with domainId.") @@ -81,8 +84,8 @@ public class RegisterIsoCmd extends BaseCmd { @Parameter(name=ApiConstants.CHECKSUM, type=CommandType.STRING, description="the MD5 checksum value of this ISO") private String checksum; - @IdentityMapper(entityTableName="projects") - @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, description="Register iso for the project") + @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, + description="Register iso for the project") private Long projectId; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java index a4f592e..c7efa4f 100644 --- a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java @@ -16,11 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; +import com.cloud.storage.GuestOS; 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=GuestOS.class) public class GuestOSResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the OS type") private String id; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0e1083ad/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java b/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java index 3291c34..3774347 100644 --- a/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java @@ -18,11 +18,14 @@ package org.apache.cloudstack.api.response; import java.util.List; +import com.cloud.template.VirtualMachineTemplate; 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=VirtualMachineTemplate.class) @SuppressWarnings("unused") public class TemplatePermissionsResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the template ID")
