diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java index e8496288aee..a2967bdf6e5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; +import org.apache.cloudstack.api.response.DomainResponse; 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; @@ -54,8 +54,8 @@ public class CreateDiskOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.CUSTOMIZED, type=CommandType.BOOLEAN, description="whether disk offering is custom or not") private Boolean customized; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public offerings") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class, + description="the ID of the containing domain, null for public offerings") private Long domainId; @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.") diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index 020eee4f713..dc3f619c095 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; +import org.apache.cloudstack.api.response.DomainResponse; 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; @@ -64,8 +64,8 @@ public class CreateServiceOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for this service offering.") private String tags; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public offerings") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class, + description="the ID of the containing domain, null for public offerings") private Long domainId; @Parameter(name=ApiConstants.HOST_TAGS, type=CommandType.STRING, description="the host tag for this service offering.") diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java index 7640928aa2d..848d58a9acf 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; +import com.cloud.offering.DiskOffering; 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; @@ -36,8 +36,8 @@ public class DeleteDiskOfferingCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="disk_offering") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of the disk offering") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DiskOffering.class, + required=true, description="ID of the disk offering") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java index e58e6316173..b96ab6053b4 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; +import org.apache.cloudstack.api.response.DomainResponse; 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; @@ -36,8 +36,8 @@ public class DeleteServiceOfferingCmd extends BaseCmd{ //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="disk_offering") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the service offering") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType= DomainResponse.class, + required=true, description="the ID of the service offering") private Long id; diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java index fbcda617e11..d565091a009 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java @@ -19,7 +19,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; @@ -39,8 +38,8 @@ public class UpdateDiskOfferingCmd extends BaseCmd{ @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="updates alternate display text of the disk offering with this value", length=4096) private String displayText; - @IdentityMapper(entityTableName="disk_offering") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of the disk offering") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DiskOffering.class, + required=true, description="ID of the disk offering") private Long id; @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="updates name of the disk offering with this value") diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java index fb5d47e7600..3cea4232c43 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; +import com.cloud.offering.DiskOffering; 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; @@ -36,8 +36,8 @@ public class UpdateServiceOfferingCmd extends BaseCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="disk_offering") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the service offering to be updated") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType= DiskOffering.class, + required=true, description="the ID of the service offering to be updated") private Long id; @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the service offering to be updated")