bug 7366 : Removing the bootable field from "createTemplate","registerTemplate","listTemplate" and "updateTemplate" commands.

Making some db changes for a successful ant deploydb
status 7366: resolved fixed
This commit is contained in:
nit 2010-12-03 18:31:08 +05:30
parent d7b8e93f22
commit b543faeeee
4 changed files with 9 additions and 6 deletions

View File

@ -54,7 +54,7 @@ public class TemplateResponse extends BaseResponse {
private ImageFormat format;
@SerializedName("bootable") @Param(description="true if the ISO is bootable, false otherwise")
private boolean bootable;
private Boolean bootable;
@SerializedName("isfeatured") @Param(description="true if this template is a featured template, false otherwise")
private boolean featured;
@ -231,11 +231,11 @@ public class TemplateResponse extends BaseResponse {
this.format = format;
}
public boolean isBootable() {
public Boolean isBootable() {
return bootable;
}
public void setBootable(boolean bootable) {
public void setBootable(Boolean bootable) {
this.bootable = bootable;
}

View File

@ -117,6 +117,7 @@ import com.cloud.storage.GuestOS;
import com.cloud.storage.GuestOSCategoryVO;
import com.cloud.storage.Snapshot;
import com.cloud.storage.Snapshot.Type;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.storage.Storage.StoragePoolType;
import com.cloud.storage.Storage.TemplateType;
import com.cloud.storage.StoragePool;
@ -1436,7 +1437,9 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setFormat(result.getFormat());
response.setOsTypeId(result.getGuestOSId());
response.setOsTypeName(ApiDBUtils.findGuestOSById(result.getGuestOSId()).getDisplayName());
response.setBootable(result.isBootable());
if(result.getFormat() == ImageFormat.ISO){ // Templates are always bootable
response.setBootable(result.isBootable());
}
response.setObjectName("iso");
return response;
}

View File

@ -266,4 +266,4 @@ ALTER TABLE `cloud`.`vpn_users` ADD CONSTRAINT `fk_vpn_users___account_id` FOREI
ALTER TABLE `cloud`.`vpn_users` ADD INDEX `i_vpn_users_username`(`username`);
ALTER TABLE `cloud`.`vpn_users` ADD UNIQUE `i_vpn_users__account_id__username`(`account_id`, `username`);
ALTER TABLE `cloud`.`vlan` ADD CONSTRAINT `fk_vlan__network_offering_id` FOREIGN KEY `fk_vlan__network_offering_id` (`network_offering_id`) REFERENCES `networks` (`id`) ON DELETE CASCADE;
ALTER TABLE `cloud`.`vlan` ADD CONSTRAINT `fk_vlan__network_id` FOREIGN KEY `fk_vlan__network_id` (`network_id`) REFERENCES `networks` (`id`) ON DELETE CASCADE;

View File

@ -320,7 +320,7 @@ CREATE TABLE `cloud`.`volumes` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`snapshots` (
`id` bigint unsigned UNIQUE NOT NULL 'Primary Key',
`id` bigint unsigned NOT NULL COMMENT 'Primary Key',
`account_id` bigint unsigned NOT NULL COMMENT 'owner. foreign key to account table',
`volume_id` bigint unsigned NOT NULL COMMENT 'volume it belongs to. foreign key to volume table',
`status` varchar(32) COMMENT 'snapshot creation status',