Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2326,7 +2326,8 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep
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(String.format("Service provider %s either doesn't exist or is not enabled in physical network: %s",
element.getProvider().getName(), _physicalNetworkDao.findById(network.getPhysicalNetworkId())));
}
if (element instanceof NetworkMigrationResponder) {
if (!((NetworkMigrationResponder) element).prepareMigration(profile, network, vm, dest, context)) {
Expand Down Expand Up @@ -2633,6 +2634,10 @@ && isDhcpAccrossMultipleSubnetsSupported(dhcpServiceProvider)) {

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());
}
Expand Down
Loading