mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/4.13'
This commit is contained in:
		
						commit
						294813e8fe
					
				| @ -2014,6 +2014,15 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra | |||||||
| 
 | 
 | ||||||
|         final List<NicVO> nics = _nicDao.listByVmId(vm.getId()); |         final List<NicVO> nics = _nicDao.listByVmId(vm.getId()); | ||||||
|         for (final NicVO nic : nics) { |         for (final NicVO nic : nics) { | ||||||
|  |             final NetworkVO network = _networksDao.findById(nic.getNetworkId()); | ||||||
|  |             if (network != null && network.getTrafficType() == TrafficType.Guest) { | ||||||
|  |                 final String nicIp = Strings.isNullOrEmpty(nic.getIPv4Address()) ? nic.getIPv6Address() : nic.getIPv4Address(); | ||||||
|  |                 if (!Strings.isNullOrEmpty(nicIp)) { | ||||||
|  |                     NicProfile nicProfile = new NicProfile(nic.getIPv4Address(), nic.getIPv6Address(), nic.getMacAddress()); | ||||||
|  |                     nicProfile.setId(nic.getId()); | ||||||
|  |                     cleanupNicDhcpDnsEntry(network, vm, nicProfile); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|             removeNic(vm, nic); |             removeNic(vm, nic); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -896,7 +896,6 @@ NetworkMigrationResponder, AggregatedCommandExecutor, RedundantResource, DnsServ | |||||||
|     @Override |     @Override | ||||||
|     public boolean release(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final ReservationContext context) throws ConcurrentOperationException, |     public boolean release(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final ReservationContext context) throws ConcurrentOperationException, | ||||||
|     ResourceUnavailableException { |     ResourceUnavailableException { | ||||||
|         removeDhcpEntry(network, nic, vm); |  | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -312,7 +312,6 @@ import com.cloud.vm.dao.VMInstanceDao; | |||||||
| import com.cloud.vm.snapshot.VMSnapshotManager; | import com.cloud.vm.snapshot.VMSnapshotManager; | ||||||
| import com.cloud.vm.snapshot.VMSnapshotVO; | import com.cloud.vm.snapshot.VMSnapshotVO; | ||||||
| import com.cloud.vm.snapshot.dao.VMSnapshotDao; | import com.cloud.vm.snapshot.dao.VMSnapshotDao; | ||||||
| import com.google.common.base.Strings; |  | ||||||
| 
 | 
 | ||||||
| public class UserVmManagerImpl extends ManagerBase implements UserVmManager, VirtualMachineGuru, UserVmService, Configurable { | public class UserVmManagerImpl extends ManagerBase implements UserVmManager, VirtualMachineGuru, UserVmService, Configurable { | ||||||
|     private static final Logger s_logger = Logger.getLogger(UserVmManagerImpl.class); |     private static final Logger s_logger = Logger.getLogger(UserVmManagerImpl.class); | ||||||
| @ -4479,19 +4478,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir | |||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|     public void finalizeExpunge(VirtualMachine vm) { |     public void finalizeExpunge(VirtualMachine vm) { | ||||||
|         final VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm); |  | ||||||
|         final List<NicVO> nics = _nicDao.listByVmId(vm.getId()); |  | ||||||
|         for (final NicVO nic : nics) { |  | ||||||
|             final NetworkVO network = _networkDao.findById(nic.getNetworkId()); |  | ||||||
|             if (network != null && network.getTrafficType() == TrafficType.Guest) { |  | ||||||
|                 final String nicIp = Strings.isNullOrEmpty(nic.getIPv4Address()) ? nic.getIPv6Address() : nic.getIPv4Address(); |  | ||||||
|                 if (!Strings.isNullOrEmpty(nicIp)) { |  | ||||||
|                     NicProfile nicProfile = new NicProfile(nic.getIPv4Address(), nic.getIPv6Address(), nic.getMacAddress()); |  | ||||||
|                     nicProfile.setId(nic.getId()); |  | ||||||
|                     _networkMgr.cleanupNicDhcpDnsEntry(network, profile, nicProfile); |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user