api: Annotate offering

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2012-12-22 16:12:00 -08:00
parent 2140ff55ea
commit 97514a0693
6 changed files with 17 additions and 18 deletions

View File

@ -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.")

View File

@ -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.")

View File

@ -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;

View File

@ -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;

View File

@ -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")

View File

@ -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")