Updated Branches: refs/heads/object_store 7d2565c49 -> bbd5d1321
Fix bugs in refactored listTemplates and listIsos API. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bbd5d132 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bbd5d132 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bbd5d132 Branch: refs/heads/object_store Commit: bbd5d132138ac26283da1c30bf11825354227907 Parents: 7d2565c Author: Min Chen <[email protected]> Authored: Tue Apr 30 11:31:45 2013 -0700 Committer: Min Chen <[email protected]> Committed: Tue Apr 30 11:31:45 2013 -0700 ---------------------------------------------------------------------- client/tomcatconf/applicationContext.xml.in | 1 + .../storage/image/db/SnapshotDataStoreDaoImpl.java | 4 ++-- .../src/com/cloud/api/query/QueryManagerImpl.java | 4 ++-- .../cloud/api/query/dao/ImageStoreJoinDaoImpl.java | 2 +- .../com/cloud/api/query/vo/ImageStoreJoinVO.java | 2 +- setup/db/db/schema-410to420.sql | 2 ++ 6 files changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/client/tomcatconf/applicationContext.xml.in ---------------------------------------------------------------------- diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in index 9dcee8b..194b763 100644 --- a/client/tomcatconf/applicationContext.xml.in +++ b/client/tomcatconf/applicationContext.xml.in @@ -720,6 +720,7 @@ <bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" /> <bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl" /> <bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator" /> + <bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy" /> <bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" /> <bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" /> <bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" /> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java index 11babcb..05a0da0 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java @@ -65,13 +65,13 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO snapshotSearch = createSearchBuilder(); snapshotSearch.and("snapshot_id", snapshotSearch.entity().getSnapshotId(), SearchCriteria.Op.EQ); - snapshotSearch.and("store_role", storeSearch.entity().getRole(), SearchCriteria.Op.EQ); + snapshotSearch.and("store_role", snapshotSearch.entity().getRole(), SearchCriteria.Op.EQ); snapshotSearch.done(); storeSnapshotSearch = createSearchBuilder(); storeSnapshotSearch.and("snapshot_id", storeSnapshotSearch.entity().getSnapshotId(), SearchCriteria.Op.EQ); storeSnapshotSearch.and("store_id", storeSnapshotSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ); - storeSnapshotSearch.and("store_role", storeSearch.entity().getRole(), SearchCriteria.Op.EQ); + storeSnapshotSearch.and("store_role", storeSnapshotSearch.entity().getRole(), SearchCriteria.Op.EQ); storeSnapshotSearch.done(); return true; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/server/src/com/cloud/api/query/QueryManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 71a0f29..4328e2a 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -2535,7 +2535,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { Boolean isAscending = Boolean.parseBoolean(_configDao.getValue("sortkey.algorithm")); isAscending = (isAscending == null ? true : isAscending); - Filter searchFilter = new Filter(TemplateJoinVO.class, "sort_key", isAscending, startIndex, pageSize); + Filter searchFilter = new Filter(TemplateJoinVO.class, "sortKey", isAscending, startIndex, pageSize); SearchCriteria<TemplateJoinVO> sc = _templateJoinDao.createSearchCriteria(); // add criteria for project or not @@ -2577,7 +2577,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { } // add hypervisor criteria - if ( !hypers.isEmpty()){ + if ( hypers != null && !hypers.isEmpty()){ String[] relatedHypers = new String[hypers.size()]; for (int i = 0; i < hypers.size(); i++){ relatedHypers[i] = hypers.get(i).toString(); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/server/src/com/cloud/api/query/dao/ImageStoreJoinDaoImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/dao/ImageStoreJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ImageStoreJoinDaoImpl.java index 72446f4..7810ffc 100644 --- a/server/src/com/cloud/api/query/dao/ImageStoreJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/ImageStoreJoinDaoImpl.java @@ -58,7 +58,7 @@ public class ImageStoreJoinDaoImpl extends GenericDaoBase<ImageStoreJoinVO, Long dsIdSearch.and("id", dsIdSearch.entity().getId(), SearchCriteria.Op.EQ); dsIdSearch.done(); - this._count = "select count(distinct id) from image_data_store_view WHERE "; + this._count = "select count(distinct id) from image_store_view WHERE "; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/server/src/com/cloud/api/query/vo/ImageStoreJoinVO.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/vo/ImageStoreJoinVO.java b/server/src/com/cloud/api/query/vo/ImageStoreJoinVO.java index ce56860..a5ee007 100644 --- a/server/src/com/cloud/api/query/vo/ImageStoreJoinVO.java +++ b/server/src/com/cloud/api/query/vo/ImageStoreJoinVO.java @@ -52,7 +52,7 @@ public class ImageStoreJoinVO extends BaseViewVO implements InternalIdentity, Id @Column(name = "protocol") private String protocol; - @Column(name = "provider_name", nullable = false) + @Column(name = "image_provider_name", nullable = false) private String providerName; @Column(name="scope") http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbd5d132/setup/db/db/schema-410to420.sql ---------------------------------------------------------------------- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 379c3fd..9d9016e 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -553,6 +553,8 @@ CREATE VIEW `cloud`.`template_view` AS vm_template.extractable, vm_template.template_tag, vm_template.sort_key, + vm_template.removed, + vm_template.enable_sshkey, source_template.id source_template_id, source_template.uuid source_template_uuid, account.id account_id,
