@Override
public boolean deleteCiscoAsa1000vResource(
DeleteCiscoAsa1000vResourceCmd cmd) {
Long asaResourceId = cmd.getCiscoAsa1000vResourceId();
CiscoAsa1000vDeviceVO asaResource = _ciscoAsa1000vDao.findById(asaResourceId);
if (asaResource == null) {
throw new InvalidParameterValueException(
"Could not find a Cisco ASA 1000v appliance with id " + asaResourceId);
}
NetworkAsa1000vMapVO networkAsaMap = _networkAsa1000vMapDao.findByAsa1000vId(asaResource.getId());
if (networkAsaMap != null) {
throw new CloudRuntimeException(
"Cisco ASA 1000v appliance with id " + asaResourceId +
" cannot be deleted as it is associated with guest network");
}