mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Resource tags: CS-15647 - delete resource tags when SG is expunged
This commit is contained in:
parent
4c6e547e70
commit
65551cff82
@ -113,5 +113,19 @@ public class SecurityGroupDaoImpl extends GenericDaoBase<SecurityGroupVO, Long>
|
||||
boolean result = super.remove(id);
|
||||
txn.commit();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DB
|
||||
public boolean expunge(Long id) {
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
txn.start();
|
||||
SecurityGroupVO entry = findById(id);
|
||||
if (entry != null) {
|
||||
_tagsDao.removeByIdAndType(id, TaggedResourceType.SecurityGroup);
|
||||
}
|
||||
boolean result = super.expunge(id);
|
||||
txn.commit();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user