mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
Clear System VM IP from NICs for PublicNetworkGuru
This commit is contained in:
parent
d160731b9f
commit
82a5e35709
@ -2326,7 +2326,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
for (final NetworkElement element : networkElements) {
|
||||
if (providersToImplement.contains(element.getProvider())) {
|
||||
if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) {
|
||||
throw new CloudRuntimeException(String.format("Service provider %s either doesn't exist or is not enabled in physical network: %s", element.getProvider().getName(), _physicalNetworkDao.findById(network.getPhysicalNetworkId())));
|
||||
throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + " either doesn't exist or is not enabled in physical network id: "
|
||||
+ network.getPhysicalNetworkId());
|
||||
}
|
||||
if (element instanceof NetworkMigrationResponder) {
|
||||
if (!((NetworkMigrationResponder) element).prepareMigration(profile, network, vm, dest, context)) {
|
||||
@ -2633,6 +2634,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
|
||||
final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
|
||||
guru.deallocate(network, profile, vm);
|
||||
if (nic.getReservationStrategy() == Nic.ReservationStrategy.Create) {
|
||||
applyProfileToNicForRelease(nic, profile);
|
||||
_nicDao.update(nic.getId(), nic);
|
||||
}
|
||||
if (BooleanUtils.isNotTrue(preserveNics)) {
|
||||
_nicDao.remove(nic.getId());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user