/** * Return the VTN configuration in the given VTN. * * @param vnode The VTN container. * @return The configuration for the given VTN. */ @Override protected VtenantConfig getConfig(Vtn vnode) { return vnode.getVtenantConfig(); }
/** * Record a log message that indicates the VTN has been created or removed. * * @param vtn A {@link Vtn} instance. * @param type {@link VtnUpdateType#CREATED} on created. * {@link VtnUpdateType#REMOVED} on removed. */ private void log(Vtn vtn, VtnUpdateType type) { if (LOG.isInfoEnabled()) { VTenantIdentifier vtnId = new VTenantIdentifier(vtn.getName()); LOG.info("{}: VTN has been {}: value={{}}", vtnId, MiscUtils.toLowerCase(type), toString(vtn.getVtenantConfig())); } }
return false; if (!Objects.equals(_vtenantConfig, other.getVtenantConfig())) { return false;
public VtnBuilder(Vtn base) { if (base.getKey() == null) { this._key = new VtnKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._vbridge = base.getVbridge(); this._vtenantConfig = base.getVtenantConfig(); this._vterminal = base.getVterminal(); this._vtnInputFilter = base.getVtnInputFilter(); this._vtnPathMaps = base.getVtnPathMaps(); if (base instanceof VtnImpl) { VtnImpl impl = (VtnImpl) 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.vtn.rev150328.vtns.Vtn> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtns.Vtn>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
/** * Construct a new instance. * * @param pctx A runtime context for a received packet. * @param vtnId The identifier of the VTN. * @param vtn A {@link Vtn} instance read from the MD-SAL datastore. */ public VTenant(PacketContext pctx, VTenantIdentifier vtnId, Vtn vtn) { super(vtnId, vtn); // Initialize flow timeout. VtenantConfig cfg = vtn.getVtenantConfig(); pctx.setFlowTimeout(cfg.getIdleTimeout(), cfg.getHardTimeout()); // Initialize VTN input filter. inputFilter = getFlowFilterList( pctx.getTxContext(), false, vtn.getVtnInputFilter()); }