/** * * @param intentKey * @return the user that created this intent */ private static UserId getUserId(IntentKey intentKey) { // for this release, assume userId to be the same as the NIC intent ID return new UserId(intentKey.getId().getValue()); }
private IntentImpl(IntentBuilder 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(); 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.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private IntentImpl(IntentBuilder 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._qosConfig = base.getQosConfig(); this._state = base.getState(); this._status = base.getStatus(); this._subjects = base.getSubjects(); 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.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intents.Intent>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
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()); } } }
Intent lclIntent = (Intent) originalDataObject.get(instanceIdentifier); IntentKey lclIntentKey = lclIntent.getKey(); Uuid uuid = lclIntentKey.getId(); LOG.trace(" Intent Deleted :{} ", uuid.getValue()); String encodeUUID = vtnRendererUtility.encodeUUID(uuid.getValue());
} else { this._key = base.getKey(); this._id = _key.getId();