diff --git a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java index d2844044eb8..bb4df1dd556 100644 --- a/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/SecurityGroupJoinDaoImpl.java @@ -172,6 +172,16 @@ public class SecurityGroupJoinDaoImpl extends GenericDaoBase tags = _resourceTagJoinDao.listBy(vsg.getRuleUuid(), ResourceTag.ResourceObjectType.SecurityGroupRule); + Set tagResponse = new HashSet(); + for (ResourceTagJoinVO tag: tags) { + tagResponse.add(ApiDBUtils.newResourceTagResponse(tag, false)); + } + + // add the tags to the rule data + ruleData.setTags(tagResponse); + if (vsg.getRuleType() == SecurityRuleType.IngressRule) { ruleData.setObjectName("ingressrule"); vsgData.addSecurityGroupIngressRule(ruleData);