public EndPointGroup build() { return new EndPointGroupImpl(this); }
public EndPointGroupBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private String extractEndPointName(final EndPointGroup endPointGroup) { return endPointGroup.getEndPointGroup().getName(); }
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; }
if (!Objects.equals(_name, other.getName())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
private Subjects subject(short order, String name) { return new SubjectsBuilder() .setSubject( new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroupBuilder() .setEndPointGroup( new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroupBuilder() .setName(name).build()).build()).setOrder(order).build(); }
private EndPointGroupImpl(EndPointGroupBuilder base) { this._name = base.getName(); 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.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public EndPointGroupBuilder(EndPointGroup base) { this._name = base.getName(); if (base instanceof EndPointGroupImpl) { EndPointGroupImpl impl = (EndPointGroupImpl) 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.subject.end.point.group.EndPointGroup> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getName() != null) { return false; } else if(!_name.equals(other.getName())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
protected List<Subjects> createSubjects() { List<Subjects> subjectList = new ArrayList<Subjects>(); EndPointGroup endpointGroupFrom = new EndPointGroupBuilder().setName(this.from).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroup fromEPG = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject .EndPointGroupBuilder().setEndPointGroup(endpointGroupFrom).build(); Subjects subjects1 = new SubjectsBuilder().setOrder((short) FIRST_SUBJECT).setSubject(fromEPG).build(); EndPointGroup endpointGroupTo = new EndPointGroupBuilder().setName(this.to).build(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.EndPointGroup toEPG = new org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject .EndPointGroupBuilder().setEndPointGroup(endpointGroupTo).build(); Subjects subjects2 = new SubjectsBuilder().setOrder((short) SECOND_SUBJECT).setSubject(toEPG).build(); subjectList.add(subjects1); subjectList.add(subjects2); return subjectList; } }
public EndPointGroup build() { return new EndPointGroupImpl(this); }
public EndPointGroupBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private EndPointGroupImpl(EndPointGroupBuilder base) { this._name = base.getName(); 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.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public EndPointGroupBuilder(EndPointGroup base) { this._name = base.getName(); if (base instanceof EndPointGroupImpl) { EndPointGroupImpl impl = (EndPointGroupImpl) 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.subject.end.point.group.EndPointGroup> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.EndPointGroup>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private Map<String, String> getMappingServiceContent(final EndPointGroup endPointGroup) throws IntentElementNotFoundException { final String endPointGroupName = endPointGroup.getEndPointGroup().getName(); final String CONTENT_NOT_FOUND_MESSAGE = "Content not found for EndPointGroup: " + endPointGroupName; final Map<String, String> contentMap = intentMappingService.get(endPointGroupName); if(contentMap.isEmpty()) { throw new IntentElementNotFoundException(CONTENT_NOT_FOUND_MESSAGE); } return contentMap; } }
EndPointGroup endPointGroup = (EndPointGroup) subjects.getSubject(); sb.append(String.format(" Order: %d\n", subjects.getOrder())); sb.append(String.format(" " + value + ": %s\n", endPointGroup.getEndPointGroup().getName())); sb.append("\n");
&& 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);