public RuleActionBuilder setOrder(final java.lang.Integer value) { if (value != null) { checkOrderRange(value); } this._order = value; return this; }
public RuleClassifier build() { return new RuleClassifierImpl(this); }
public RuleAction build() { return new RuleActionImpl(this); }
public RuleClassifierBuilder(RuleClassifier base) { if (base.getKey() == null) { this._key = new RuleClassifierKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._additionalInfo = base.getAdditionalInfo(); this._direction = base.getDirection(); this._parameterValue = base.getParameterValue(); if (base instanceof RuleClassifierImpl) { RuleClassifierImpl impl = (RuleClassifierImpl) 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.security.rule.group.security.rule.RuleClassifier> 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.security.rule.group.security.rule.RuleClassifier>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public RuleActionBuilder(RuleAction base) { if (base.getKey() == null) { this._key = new RuleActionKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._additionalInfo = base.getAdditionalInfo(); this._order = base.getOrder(); this._parameterValue = base.getParameterValue(); if (base instanceof RuleActionImpl) { RuleActionImpl impl = (RuleActionImpl) 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.security.rule.group.security.rule.RuleAction> 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.security.rule.group.security.rule.RuleAction>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (!Objects.equals(_additionalInfo, other.getAdditionalInfo())) { return false; if (!Objects.equals(_direction, other.getDirection())) { return false; if (!Objects.equals(_key, other.getKey())) { return false; if (!Objects.equals(_name, other.getName())) { return false; if (!Objects.equals(_parameterValue, other.getParameterValue())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
private RuleClassifierImpl(RuleClassifierBuilder base) { if (base.getKey() == null) { this._key = new RuleClassifierKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._additionalInfo = base.getAdditionalInfo(); this._direction = base.getDirection(); this._parameterValue = base.getParameterValue(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private RuleActionImpl(RuleActionBuilder base) { if (base.getKey() == null) { this._key = new RuleActionKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._additionalInfo = base.getAdditionalInfo(); this._order = base.getOrder(); this._parameterValue = base.getParameterValue(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
aceIpBuilder.setDscp(new Dscp((short) 1)); // TODO: Do we have to setup DSCP? List<ParameterValue> pvList = classifier.getParameterValue(); boolean foundSrcPort = false; // TODO: This is a kludge to work around yangtools mandatory String aceRuleName = classifier.getName().getValue(); LOG.debug("FABMGR: ERROR: createAceFromSecurityRuleEntry: foundDestPort is false: {}", aceRuleName); DestinationPortRangeBuilder destinationPortRangeBuilder = new DestinationPortRangeBuilder(); String aceRuleName = classifier.getName().getValue(); LOG.debug("FABMGR: ERROR: createAceFromSecurityRuleEntry: foundSrcPort is false: {}", aceRuleName); SourcePortRangeBuilder sourcePortRangeBuilder = new SourcePortRangeBuilder(); return null; List<ParameterValue> actions = ruleAction.getParameterValue(); if (actions == null || actions.isEmpty()) { Direction direction = classifier.getDirection(); String sfcChainName = pv.getStringValue(); LOG.debug("FABMGR: createAceFromSecurityRuleEntry: ADD sfc chain: {}", sfcChainName); String aceRuleName = classifier.getName().getValue(); AceBuilder aceBuilder = new AceBuilder(); aceBuilder.setRuleName(aceRuleName);
if (!Objects.equals(_additionalInfo, other.getAdditionalInfo())) { return false; if (!Objects.equals(_key, other.getKey())) { return false; if (!Objects.equals(_name, other.getName())) { return false; if (!Objects.equals(_order, other.getOrder())) { return false; if (!Objects.equals(_parameterValue, other.getParameterValue())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
continue; RuleClassifierBuilder ruleClassifierBuilder = new RuleClassifierBuilder(); ruleClassifierBuilder.setName(new Name(classifierRef.getName().getValue())); ClassifierInstance classifierInstance = getClassifierInstance(tenantId, classifierRef.getName(), dataProvider); } else { if (classifierInstance.getClassifierDefinitionId() != null) { ruleClassifierBuilder.setAdditionalInfo(new Text(classifierInstance.getClassifierDefinitionId() .getValue())); LOG.trace("Classifier Instance {} has no parameters", classifierInstance.getName().getValue()); ruleClassifierBuilder.setParameterValue(parms); ruleClassifierBuilder.setDirection(Direction.forValue(classifierRef.getDirection().getIntValue())); } else { ruleClassifierBuilder.setDirection(Direction.Bidirectional); fClassifiers.add(ruleClassifierBuilder.build());
continue; RuleActionBuilder ruleActionBuilder = new RuleActionBuilder(); ruleActionBuilder.setName(new Name(actionRef.getName().getValue())); ruleActionBuilder.setOrder(actionRef.getOrder()); ActionInstance actionInstance = getActionInstance(actionRef.getName()); if (actionInstance == null) { } else { if (actionInstance.getActionDefinitionId() != null) { ruleActionBuilder.setAdditionalInfo(new Text(actionInstance.getActionDefinitionId().getValue())); LOG.trace("Action Instance {} has no parameters", actionInstance.getName().getValue()); ruleActionBuilder.setParameterValue(parms); pActions.add(ruleActionBuilder.build());
public RuleActionBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleAction> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
public RuleClassifierBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.security.rules.rev151013.security.rule.groups.attributes.security.rule.groups.container.security.rule.groups.security.rule.group.security.rule.RuleClassifier> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
for (Direction enumItem : Direction.values())
if (sfcPath.isSymmetric() && direction.equals(Direction.Out)) { rspName = new RspName(rspName.getValue() + "-Reverse"); rsp = getRspByName(rspName, rTx);