return false; if (!Objects.equals(_securityRule, other.getSecurityRule())) { return false;
public SecurityRuleGroupBuilder(SecurityRuleGroup base) { if (base.getKey() == null) { this._key = new SecurityRuleGroupKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._securityRule = base.getSecurityRule(); if (base instanceof SecurityRuleGroupImpl) { SecurityRuleGroupImpl impl = (SecurityRuleGroupImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.SecurityRuleGroup> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.SecurityRuleGroup>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private void renderSecurityRuleGroups(Uuid tenantId, NodeId fabricId,UserLogicalNetworkCache uln, NodeId nodeId, SecurityRuleGroups ruleGroups) { /* * One SecurityRuleGroups contains a list SecurityRuleGroup. * One SecurityRuleGroup contains a list of SecurityRule. * One SecurityRule can be mapped to one ietf-acl. */ SecurityRuleGroupsMappingInfo ruleGroupsMappingInfo = uln.findSecurityRuleGroupsFromRuleGroupsId(ruleGroups.getUuid()); if (ruleGroupsMappingInfo == null) { LOG.error("FABMGR: ERROR: renderSecurityRuleGroups: ruleGroupsMappingInfo is null"); return; } List<SecurityRuleGroup> ruleGroupList = ruleGroups.getSecurityRuleGroup(); for (SecurityRuleGroup ruleGroup : ruleGroupList) { List<SecurityRule> ruleList = ruleGroup.getSecurityRule(); for (SecurityRule rule : ruleList) { String aclName = this.createAclFromSecurityRule(rule); this.renderSecurityRule(tenantId, fabricId, uln, nodeId, ruleGroupsMappingInfo, aclName); } } uln.markSecurityRuleGroupsAsRendered(ruleGroups); }
private void renderSecurityRuleGroupsOnPair(Uuid tenantId, UserLogicalNetworkCache uln, NodeId fabricId, NodeId nodeId, NodeId fabricId2, NodeId nodeId2, SecurityRuleGroups ruleGroups) { /* * One SecurityRuleGroups contains a list SecurityRuleGroup. * One SecurityRuleGroup contains a list of SecurityRule. * One SecurityRule can be mapped to one ietf-acl. */ SecurityRuleGroupsMappingInfo ruleGroupsMappingInfo = uln.findSecurityRuleGroupsFromRuleGroupsId(ruleGroups.getUuid()); if (ruleGroupsMappingInfo == null) { LOG.error("FABMGR: ERROR: renderSecurityRuleGroups: ruleGroupsMappingInfo is null"); return; } List<SecurityRuleGroup> ruleGroupList = ruleGroups.getSecurityRuleGroup(); for (SecurityRuleGroup ruleGroup : ruleGroupList) { List<SecurityRule> ruleList = ruleGroup.getSecurityRule(); for (SecurityRule rule : ruleList) { String aclName = this.createAclFromSecurityRule(rule); this.renderSecurityRule(tenantId, fabricId, uln, nodeId, ruleGroupsMappingInfo, aclName); this.renderSecurityRule(tenantId, fabricId2, uln, nodeId2, ruleGroupsMappingInfo, aclName); } } uln.markSecurityRuleGroupsAsRendered(ruleGroups); }