private boolean verifyIntent() { if (intent.getId() == null) { LOG.warn("Intent ID is not specified {}", intent); return false; } if (intent.getActions() == null || intent.getActions().size() > NUM_OF_SUPPORTED_ACTION) { LOG.warn("Intent's action is either null or there is more than {} action {}" , NUM_OF_SUPPORTED_ACTION, intent); return false; } if (intent.getSubjects() == null || intent.getSubjects().size() > NUM_OF_SUPPORTED_EPG) { LOG.warn("Intent's subjects is either null or there is more than {} subjects {}" , NUM_OF_SUPPORTED_EPG, intent); return false; } return true; }
sb.append(String.format("Intent Id: <%s>\n", intent.getId().getValue())); 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()));
return false; if (!Objects.equals(_subjects, other.getSubjects())) { 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)
public IntentBuilder(Intent base) { if (base.getKey() == null) { this._key = new IntentKey( base.getId() ); this._id = base.getId(); } else { this._key = base.getKey(); this._id = _key.getId(); } this._actions = base.getActions(); this._conditions = base.getConditions(); this._constraints = base.getConstraints(); this._detailedStatusMessage = base.getDetailedStatusMessage(); this._status = base.getStatus(); this._subjects = base.getSubjects(); if (base instanceof IntentImpl) { IntentImpl impl = (IntentImpl) 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.intents.Intent> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getSubjects() != null) { return false; } else if(!_subjects.equals(other.getSubjects())) { return false;
this._state = base.getState(); this._status = base.getStatus(); this._subjects = base.getSubjects(); if (base instanceof IntentImpl) { IntentImpl impl = (IntentImpl) base;
if (intent.getSubjects().size() == NUM_OF_SUPPORTED_EPG) { List<Subjects> subjects = intent.getSubjects();
return input.getOrder(); }).immutableSortedCopy(intent.getSubjects());