diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java index 30d288b88c8..64dfbeec88b 100755 --- a/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java @@ -24,6 +24,8 @@ 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 com.cloud.api.response.DomainResponse; import com.cloud.api.response.ZoneResponse; import com.cloud.dc.DataCenter; import com.cloud.user.Account; @@ -60,8 +62,8 @@ public class CreateZoneCmd extends BaseCmd { @Parameter(name=ApiConstants.DOMAIN, type=CommandType.STRING, description="Network domain name for the networks in the zone") private String domain; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public zones") + //@IdentityMapper(entityTableName="domain") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public zones", entityType=DomainResponse.class) private Long domainId; @Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, required=true, description="network type of the zone, can be Basic or Advanced") diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java index 1144cb358e6..75770673588 100644 --- a/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java @@ -25,6 +25,7 @@ import org.apache.cloudstack.api.Implementation; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import com.cloud.api.response.SuccessResponse; +import com.cloud.api.response.ZoneResponse; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -38,8 +39,8 @@ public class DeleteZoneCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone") + //@IdentityMapper(entityTableName="data_center") + @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class) private Long id; diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java index fe130f7f219..fdb1d9cbbe6 100644 --- a/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java @@ -28,6 +28,9 @@ import com.cloud.user.Account; import com.cloud.event.EventTypes; import com.cloud.async.AsyncJob; import com.cloud.api.response.AccountResponse; +import com.cloud.api.response.DomainResponse; +import com.cloud.api.response.ZoneResponse; + import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.BaseCmd; @@ -41,16 +44,16 @@ public class MarkDefaultZoneForAccountCmd extends BaseAsyncCmd { ////////////////API parameters ////////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="account") - @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="Name of the account that is to be marked.") + //@IdentityMapper(entityTableName="account") + @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="Name of the account that is to be marked.", entityType=AccountResponse.class) private String accountName; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="Marks the account that belongs to the specified domain.") + //@IdentityMapper(entityTableName="domain") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="Marks the account that belongs to the specified domain.", entityType=DomainResponse.class) private Long domainId; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="The Zone ID with which the account is to be marked.") + //@IdentityMapper(entityTableName="data_center") + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="The Zone ID with which the account is to be marked.", entityType=ZoneResponse.class) private Long defaultZoneId; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java index 59e715db297..f1e9f738f61 100755 --- a/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java @@ -51,8 +51,8 @@ public class UpdateZoneCmd extends BaseCmd { @Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone") private String guestCidrAddress; - @IdentityMapper(entityTableName="data_center") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone") + //@IdentityMapper(entityTableName="data_center") + @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class) private Long id; @Parameter(name=ApiConstants.INTERNAL_DNS1, type=CommandType.STRING, description="the first internal DNS for the Zone")