//delete the domain shared networks
boolean networksDeleted = true;
s_logger.debug("Deleting networks for domain id=" + domainId);
List<Long> networkIds = _networkDomainDao.listNetworkIdsByDomain(domainId);
UserContext ctx = UserContext.current();
ReservationContext context = new ReservationContextImpl(null, null, _accountMgr.getActiveUser(ctx.getCallerUserId()), ctx.getCaller());
for (Long networkId : networkIds) {
s_logger.debug("Deleting network id=" + networkId + " as a part of domain id=" + domainId + " cleanup");
if (!_networkMgr.destroyNetwork(networkId, context)) {
s_logger.warn("Unable to destroy network id=" + networkId + " as a part of domain id=" + domainId + " cleanup.");