cloudstack/engine
Wido den Hollander a0f8f56a5d 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 <wido@widodh.nl>
2015-09-23 14:00:04 +02:00
..
api CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +02:00
components-api CLOUDSTACK-8324: Config drive changes for xenserver 2015-05-28 15:51:50 +05:30
network Updating pom.xml version numbers for release 4.5.2-SNAPSHOT 2015-05-07 15:33:01 +02:00
orchestration CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available 2015-09-15 14:24:13 +05:30
schema Updated Dao classes with correct field names. 2015-09-17 15:54:29 +02:00
service Updating pom.xml version numbers for release 4.5.2-SNAPSHOT 2015-05-07 15:33:01 +02:00
storage Merge pull request #808 from karuturi/CLOUDSTACK-8835 2015-09-14 09:47:46 +05:30
pom.xml Updating pom.xml version numbers for release 4.5.2-SNAPSHOT 2015-05-07 15:33:01 +02:00