You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/09/23 14:00:19 UTC

[9/9] git commit: updated refs/heads/master to a0f8f56

Merge pull request #845 from borisroman/CLOUDSTACK-8763

[4.6][BLOCKER]CLOUDSTACK-8763: Resolved POD/ZONE deletion failure.Instead of having both checkIfPodIsDeletable() and checkIfZoneIsDeletable have there own SQL query, I've refactored them so they use DAO SQL Queries.

This resolves the SQL Exception thrown by both classes.

Test to confirm working order:
- deploy ACS
- Add zones / pods. -> Try to delete without resources. -> Direct success.
- Add resources to zones / pods. -> Try to delete with resources in the pod / zone. -> Correct exception thrown. (Error message is why it cannot remove the zone / pod. IE: There is still a hosts or vm or .... )

* pr/845:
  Added unit tests for checkIfPodIsDeletable() and checkIfZoneIsDeletable().
  Updated Dao classes with correct field names.
  Refactored checkIfZoneIsDeletable().
  Added findByDc(long dcId) to VolumeDao and VolumeDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to IPAddressDao and IPAddressDaoImpl.
  Added countIPs(long dcId, boolean onlyCountAllocated) to DataCenterIpAddressDao and DataCenterIpAddressDaoImpl.
  Refactored checkIfPodIsDeletable().
  Added findByPodId(Long podId) to HostDao and HostDaoImpl.

Signed-off-by: Wido den Hollander <wi...@widodh.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a0f8f56a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a0f8f56a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a0f8f56a

Branch: refs/heads/master
Commit: a0f8f56a5dd3a323a72eb2a145d64cb1b5abea49
Parents: a601ae4 5a3a3d6
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Wed Sep 23 14:00:04 2015 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Sep 23 14:00:04 2015 +0200

----------------------------------------------------------------------
 .../cloud/dc/dao/DataCenterIpAddressDao.java    |   2 +
 .../dc/dao/DataCenterIpAddressDaoImpl.java      |  27 ++
 .../src/com/cloud/network/dao/IPAddressDao.java |   2 +
 .../com/cloud/network/dao/IPAddressDaoImpl.java |  21 ++
 .../src/com/cloud/storage/dao/VolumeDao.java    |   4 +
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |  17 ++
 .../src/com/cloud/vm/dao/VMInstanceDaoImpl.java |   1 +
 .../configuration/ConfigurationManagerImpl.java | 217 +++++----------
 .../configuration/ConfigurationManagerTest.java | 266 ++++++++++++++++++-
 9 files changed, 400 insertions(+), 157 deletions(-)
----------------------------------------------------------------------