diff --git a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java index 0476278f7d0..0cde5cd0fea 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java @@ -22,7 +22,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 DeleteCounterCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @IdentityMapper(entityTableName = "counter") - @Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = true, description = "the ID of the counter", entityType=CounterResponse.class) + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=CounterResponse.class, + required=true, description="the ID of the counter") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java index 0728d665d4d..77846ee3295 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java @@ -24,7 +24,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; @@ -51,8 +50,8 @@ public class AddClusterCmd extends BaseCmd { @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=false, description="the password for the host") private String password; - //@IdentityMapper(entityTableName="host_pod_ref") - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, required=true, description="the Pod ID for the host", entityType=PodResponse.class) + @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=false, description="the URL") @@ -61,8 +60,8 @@ public class AddClusterCmd extends BaseCmd { @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required=false, description="the username for the cluster") private String username; - //@IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="the Zone ID for the cluster", entityType=ZoneResponse.class) + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, + required=true, description="the Zone ID for the cluster") private Long zoneId; @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, required=true, description="hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator") diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java index 1b4136064bd..23a80faecd3 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java @@ -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; @@ -28,7 +27,6 @@ import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.user.Account; - @Implementation(description="Deletes a cluster.", responseObject=SuccessResponse.class) public class DeleteClusterCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(DeleteClusterCmd.class.getName()); @@ -39,11 +37,10 @@ public class DeleteClusterCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - //@IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the cluster ID", entityType=ClusterResponse.class) + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ClusterResponse.class, + required=true, description="the cluster ID") private Long id; - ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -52,7 +49,6 @@ public class DeleteClusterCmd extends BaseCmd { return id; } - ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java index 1a3934e0ec7..4ff55acfcd6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java @@ -20,11 +20,11 @@ import java.util.ArrayList; import java.util.List; import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; +import org.apache.cloudstack.api.response.PodResponse; 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.ClusterResponse; @@ -44,19 +44,19 @@ public class ListClustersCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="lists clusters by the cluster ID") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ClusterResponse.class, + description="lists clusters by the cluster ID") private Long id; @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="lists clusters by the cluster name") private String clusterName; - @IdentityMapper(entityTableName="host_pod_ref") - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="lists clusters by Pod ID") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, + description="lists clusters by Pod ID") private Long podId; - //@IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="lists clusters by Zone ID", entityType=ZoneResponse.class) + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, + description="lists clusters by Zone ID") private Long zoneId; @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="lists clusters by hypervisor type") diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java index 1c9898031d0..fe1800abaa0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java @@ -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; @@ -35,8 +34,8 @@ public class UpdateClusterCmd extends BaseCmd { private static final String s_name = "updateclusterresponse"; - //@IdentityMapper(entityTableName="cluster") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Cluster", entityType=ClusterResponse.class) + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ClusterResponse.class, + required=true, description="the ID of the Cluster") private Long id; @Parameter(name=ApiConstants.CLUSTER_NAME, type=CommandType.STRING, description="the cluster name")