You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/07/23 19:32:33 UTC
git commit: Resource tags: CS-15647 - delete resource tags when SG is
expunged
Updated Branches:
refs/heads/master 4c6e547e7 -> 65551cff8
Resource tags: CS-15647 - delete resource tags when SG is expunged
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/65551cff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/65551cff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/65551cff
Branch: refs/heads/master
Commit: 65551cff82b646911bccdb3764951e65a9684e42
Parents: 4c6e547
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Jul 23 10:32:56 2012 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Mon Jul 23 10:33:59 2012 -0700
----------------------------------------------------------------------
.../network/security/dao/SecurityGroupDaoImpl.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/65551cff/server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java b/server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
index 0c9bdc5..81c20e3 100644
--- a/server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
+++ b/server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
@@ -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;
}
}