server: remove resource tags for disassociated public ip (#6642)

Fixes #6620
Remove resource tags when public IP is disassociated
This commit is contained in:
Abhishek Kumar 2022-08-19 18:28:51 +05:30 committed by GitHub
parent 1fd1f0626a
commit 44e600e2fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1101,6 +1101,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
boolean success = _ipAddrMgr.disassociatePublicIpAddress(ipAddressId, userId, caller);
if (success) {
_resourceTagDao.removeByIdAndType(ipAddressId, ResourceObjectType.PublicIpAddress);
if (guestNetwork != null) {
NetworkOffering offering = _entityMgr.findById(NetworkOffering.class, guestNetwork.getNetworkOfferingId());
Long vmId = ipVO.getAssociatedWithVmId();