Updated Branches: refs/heads/api_refactoring 16be94e9d -> 9624a59d8
api: Annotate host apis 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/9624a59d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9624a59d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9624a59d Branch: refs/heads/api_refactoring Commit: 9624a59d8e4d29caf6185f78cf2d5c0d917d387a Parents: 855ba04 Author: Rohit Yadav <[email protected]> Authored: Tue Dec 18 14:32:30 2012 -0800 Committer: Rohit Yadav <[email protected]> Committed: Tue Dec 18 14:32:30 2012 -0800 ---------------------------------------------------------------------- .../api/command/admin/host/AddHostCmd.java | 16 +++++---- .../command/admin/host/AddSecondaryStorageCmd.java | 6 ++-- .../command/admin/host/CancelMaintenanceCmd.java | 7 +--- .../api/command/admin/host/DeleteHostCmd.java | 6 ++-- .../api/command/admin/host/ListHostsCmd.java | 25 ++++++++------ .../admin/host/PrepareForMaintenanceCmd.java | 5 +-- .../api/command/admin/host/ReconnectHostCmd.java | 5 +-- .../api/command/admin/host/UpdateHostCmd.java | 10 +++--- .../command/admin/host/UpdateHostPasswordCmd.java | 13 +++---- .../api/response/GuestOSCategoryResponse.java | 4 ++- .../cloudstack/api/response/GuestOSResponse.java | 1 - .../cloudstack/api/response/HostResponse.java | 2 + 12 files changed, 51 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java index 9b06bdd..76832e0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java @@ -23,12 +23,14 @@ 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.ClusterResponse; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.exception.DiscoveryException; import com.cloud.host.Host; import com.cloud.user.Account; @@ -43,8 +45,8 @@ public class AddHostCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.LONG, description="the cluster ID for the host") + @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.UUID, entityType=ClusterResponse.class, + description="the cluster ID for the host") private Long clusterId; @Parameter(name=ApiConstants.CLUSTER_NAME, type=CommandType.STRING, description="the cluster name for the host") @@ -53,8 +55,8 @@ public class AddHostCmd extends BaseCmd { @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="the password for the host") private String password; - @IdentityMapper(entityTableName="host_pod_ref") - @Parameter(name=ApiConstants.POD_ID, required=true, type=CommandType.LONG, description="the Pod ID for the host") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, + required=true, description="the Pod ID for the host") private Long podId; @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the host URL") @@ -63,8 +65,8 @@ public class AddHostCmd extends BaseCmd { @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required=true, description="the username for the host") private String username; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the Zone ID for the host") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, + required=true, description="the Zone ID for the host") private Long zoneId; @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, required=true, description="hypervisor type of the host") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java index 39162e9..01ca392 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java @@ -22,11 +22,11 @@ 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.HostResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.exception.DiscoveryException; import com.cloud.host.Host; import com.cloud.user.Account; @@ -43,8 +43,8 @@ public class AddSecondaryStorageCmd extends BaseCmd { @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL for the secondary storage") private String url; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID for the secondary storage") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, + description="the Zone ID for the secondary storage") private Long zoneId; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java index 354e9a9..35b7789 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java @@ -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.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; @@ -42,11 +41,10 @@ public class CancelMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the host ID") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=HostResponse.class, + required=true, description="the host ID") private Long id; - ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -55,7 +53,6 @@ public class CancelMaintenanceCmd extends BaseAsyncCmd { return id; } - ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java index 168dcb8..c11bbcf 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; +import org.apache.cloudstack.api.response.HostResponse; 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; @@ -37,8 +37,8 @@ public class DeleteHostCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, + required = true, description = "the host ID") private Long id; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, description = "Force delete the host. All HA enabled vms running on the host will be put to HA; HA disabled ones will be stopped") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java index 7c33c52..32395e7 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java @@ -25,11 +25,14 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiConstants.HostDetails; 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.ClusterResponse; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.async.AsyncJob; import com.cloud.exception.InvalidParameterValueException; import com.cloud.host.Host; @@ -45,19 +48,19 @@ public class ListHostsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.LONG, description="lists hosts existing in particular cluster") + @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.UUID, entityType = ClusterResponse.class, + description="lists hosts existing in particular cluster") private Long clusterId; - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the id of the host") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = HostResponse.class, + description="the id of the host") private Long id; @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the host") private String hostName; - @IdentityMapper(entityTableName="host_pod_ref") - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="the Pod ID for the host") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType = PodResponse.class, + description="the Pod ID for the host") private Long podId; @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="the state of the host") @@ -66,12 +69,12 @@ public class ListHostsCmd extends BaseListCmd { @Parameter(name=ApiConstants.TYPE, type=CommandType.STRING, description="the host type") private String type; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID for the host") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + description="the Zone ID for the host") private Long zoneId; - @IdentityMapper(entityTableName="vm_instance") - @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=false, description="lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM") + @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class, + required=false, description="lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM") private Long virtualMachineId; @Parameter(name=ApiConstants.RESOURCE_STATE, type=CommandType.STRING, description="list hosts by resource state. Resource state represents current state determined by admin of host, valule can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java index cb72827..6eacba5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java @@ -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.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; @@ -42,8 +41,8 @@ public class PrepareForMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the host ID") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = HostResponse.class, + required=true, description="the host ID") private Long id; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java index b1a9588..1cabc20 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java @@ -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.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; @@ -42,8 +41,8 @@ public class ReconnectHostCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the host ID") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = HostResponse.class, + required=true, description="the host ID") private Long id; ///////////////////////////////////////////////////// http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java index 5e0f125..9de6107 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java @@ -22,10 +22,10 @@ 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.GuestOSCategoryResponse; import org.apache.cloudstack.api.response.HostResponse; import com.cloud.host.Host; import com.cloud.user.Account; @@ -39,12 +39,12 @@ public class UpdateHostCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the host to update") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = HostResponse.class, + required=true, description="the ID of the host to update") private Long id; - @IdentityMapper(entityTableName="guest_os_category") - @Parameter(name=ApiConstants.OS_CATEGORY_ID, type=CommandType.LONG, description="the id of Os category to update the host with") + @Parameter(name=ApiConstants.OS_CATEGORY_ID, type=CommandType.UUID, entityType = GuestOSCategoryResponse.class, + description="the id of Os category to update the host with") private Long osCategoryId; @Parameter(name=ApiConstants.ALLOCATION_STATE, type=CommandType.STRING, description="Change resource state of host, valid values are [Enable, Disable]. Operation may failed if host in states not allowing Enable/Disable") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java index c305923..e0f2f5d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java @@ -18,12 +18,12 @@ package org.apache.cloudstack.api.command.admin.host; 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.response.ClusterResponse; +import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.user.Account; @@ -37,13 +37,12 @@ public class UpdateHostPasswordCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - // TO DO - this is of no use currently. Probably need to remove it. - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, description="the host ID") + @Parameter(name=ApiConstants.HOST_ID, type=CommandType.UUID, entityType=HostResponse.class, + description="the host ID") private Long hostId; - @IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.LONG, description="the cluster ID") + @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.UUID, entityType=ClusterResponse.class, + description="the cluster ID") private Long clusterId; @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required=true, description="the username for the host/cluster") http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java b/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java index 62537d9..f7f0b8d 100644 --- a/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java @@ -16,12 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; +import com.cloud.storage.GuestOsCategory; 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=GuestOsCategory.class) public class GuestOSCategoryResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the OS category") private String id; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/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 469c310..a4f592e 100644 --- a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java @@ -17,7 +17,6 @@ package org.apache.cloudstack.api.response; 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; http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9624a59d/api/src/org/apache/cloudstack/api/response/HostResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/HostResponse.java b/api/src/org/apache/cloudstack/api/response/HostResponse.java index 6b74b48..e4aae57 100644 --- a/api/src/org/apache/cloudstack/api/response/HostResponse.java +++ b/api/src/org/apache/cloudstack/api/response/HostResponse.java @@ -26,7 +26,9 @@ 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=Host.class) public class HostResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the host") private String id;
