private String getEndpointIdentifier(Subjects subject) { String endpointGroupIdentifier = ""; //Retrieve the appropriate endpoint group identifier if (subject.getSubject() instanceof EndPointSelector) { EndPointSelector endPointSelector = (EndPointSelector) subject.getSubject(); endpointGroupIdentifier = endPointSelector.getEndPointSelector().getEndPointSelector(); } if (subject.getSubject() instanceof EndPointGroupSelector) { EndPointGroupSelector endPointGroupSelector = (EndPointGroupSelector) subject.getSubject(); endpointGroupIdentifier = endPointGroupSelector.getEndPointGroupSelector().getEndPointGroupSelector(); } if (subject.getSubject() instanceof EndPointGroup) { EndPointGroup endPointGroup = (EndPointGroup) subject.getSubject(); endpointGroupIdentifier = endPointGroup.getEndPointGroup().getName(); } return endpointGroupIdentifier; }
return false; if (!Objects.equals(_subject, other.getSubject())) { return false;
sb.append(String.format("Subjects: \n")); for (Subjects subjects : intent.getSubjects()) { EndPointGroup endPointGroup = (EndPointGroup) subjects.getSubject(); sb.append(String.format(" Order: %d\n", subjects.getOrder())); sb.append(String.format(" " + value + ": %s\n", endPointGroup.getEndPointGroup().getName()));
public SubjectsBuilder(Subjects base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); if (base instanceof SubjectsImpl) { SubjectsImpl impl = (SubjectsImpl) 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.intent.rev150122.intent.Subjects> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public SubjectsBuilder(Subjects base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); if (base instanceof SubjectsImpl) { SubjectsImpl impl = (SubjectsImpl) 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.intent.rev150122.intent.Subjects> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getSubject() != null) { return false; } else if(!_subject.equals(other.getSubject())) { return false;
EndPointGroup sourceContainer = (EndPointGroup) intent.getSubjects().get(0).getSubject(); EndPointGroup destinationContainer = (EndPointGroup) intent.getSubjects().get(1).getSubject(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.Action actionContainer = (org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.Action)
&& subjects.size() == 2) { if (subjects.get(0).getSubject() instanceof EndPointGroup && subjects.get(1).getSubject() instanceof EndPointGroup) { String from = ((EndPointGroup) subjects.get(0).getSubject()).getEndPointGroup().getName(); String to = ((EndPointGroup) subjects.get(1).getSubject()).getEndPointGroup().getName(); String bandwidthStr = constraint.getBandwidthConstraint().getBandwidth(); long bandwidth = parseBandwidthString(bandwidthStr);