CLOUDSTACK-3155 [VMware] Deletion of zone should not be allowed if VMware DC is still associated with that zone.

Check if there exists any VMware DC already associated with this zone. Deny zone deletion if true.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2013-06-24 12:11:31 +05:30
parent bd5ad442d0
commit e9df9c29bd

View File

@ -1301,6 +1301,12 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
physicalNetworks.add(2, "there are physical networks in this zone");
tablesToCheck.add(physicalNetworks);
List<String> vmwareDcs = new ArrayList<String>();
vmwareDcs.add(0, "vmware_data_center_zone_map");
vmwareDcs.add(1, "zone_id");
vmwareDcs.add(2, "there are VMware datacenters associated with this zone. Remove VMware DC from this zone.");
tablesToCheck.add(vmwareDcs);
for (List<String> table : tablesToCheck) {
String tableName = table.get(0);
String column = table.get(1);