if (s_logger.isDebugEnabled()) {
s_logger.debug("Network id=" + networkId + " is shutdown successfully, cleaning up corresponding resources now.");
}
NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, networkFinal.getGuruName());
NetworkProfile profile = convertNetworkToNetworkProfile(networkFinal.getId());
guru.shutdown(profile, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId()));
applyProfileToNetwork(networkFinal, profile);
DataCenterVO zone = _dcDao.findById(networkFinal.getDataCenterId());
if (isSharedNetworkOfferingWithServices(networkFinal.getNetworkOfferingId()) && (zone.getNetworkType() == NetworkType.Advanced)) {
networkFinal.setState(Network.State.Setup);