bug 13207: check providers/services combination before performing actual network offering upgrade

status 13207: resolved fixed
This commit is contained in:
Alena Prokharchyk 2012-01-23 14:52:07 -08:00
parent fbba0dbbf0
commit c125496691
1 changed files with 5 additions and 1 deletions

View File

@ -3837,6 +3837,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
networkOfferingChanged = true;
}
}
Map<String, String> newSvcProviders = new HashMap<String, String>();
if (networkOfferingChanged) {
newSvcProviders = finalizeServicesAndProvidersForNetwork(_configMgr.getNetworkOffering(networkOfferingId), network.getPhysicalNetworkId());
}
//don't allow to modify network domain if the service is not supported
if (domainSuffix != null) {
@ -3892,7 +3896,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
Transaction txn = Transaction.currentTxn();
txn.start();
network.setNetworkOfferingId(networkOfferingId);
_networksDao.update(networkId, network, finalizeServicesAndProvidersForNetwork(_configMgr.getNetworkOffering(networkOfferingId), network.getPhysicalNetworkId()));
_networksDao.update(networkId, network, newSvcProviders);
//get all nics using this network
//log remove usage events for old offering
//log assign usage events for new offering