/** * Return an instance identifier builder which contains the VTN key. * * @return An instance identifier builder. */ protected final InstanceIdentifierBuilder<Vtn> getVtnIdentifierBuilder() { return InstanceIdentifier.builder(Vtns.class). child(Vtn.class, new VtnKey(tenantName)); }
private VtnImpl(VtnBuilder 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(); 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.vtn.rev150328.vtns.Vtn>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtns.Vtn>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtns.Vtn>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtns.Vtn>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
/** * Return an instance identifier that specifies the VTN. * * @param tname The name of the VTN. * @return An {@link InstanceIdentifier} instance. */ public static InstanceIdentifier<Vtn> getTenantPath(String tname) { VtnKey vtnKey = new VtnKey(new VnodeName(tname)); return InstanceIdentifier.builder(Vtns.class) .child(Vtn.class, vtnKey) .build(); }
/** * Return an instance identifier that specifies the VTN. * * @param tname The name of the VTN. * @return An {@link InstanceIdentifier} instance. */ public static InstanceIdentifier<Vtn> getTenantPath(String tname) { VtnKey vtnKey = new VtnKey(new VnodeName(tname)); return InstanceIdentifier.builder(Vtns.class). child(Vtn.class, vtnKey). build(); }
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()); } } }
/** * Return an instance identifier that specifies the vBridge configuration. * * @param tname The name of the VTN. * @param bname The name of the vBridge. * @return An {@link InstanceIdentifier} instance. */ public static InstanceIdentifier<VbridgeConfig> getBridgeConfigPath( String tname, String bname) { VtnKey vtnKey = new VtnKey(new VnodeName(tname)); VbridgeKey vbrKey = new VbridgeKey(new VnodeName(bname)); return InstanceIdentifier.builder(Vtns.class) .child(Vtn.class, vtnKey) .child(Vbridge.class, vbrKey) .child(VbridgeConfig.class) .build(); }
/** * Return an instance identifier that specifies the vBridge configuration. * * @param tname The name of the VTN. * @param bname The name of the vBridge. * @return An {@link InstanceIdentifier} instance. */ public static InstanceIdentifier<VbridgeConfig> getBridgeConfigPath( String tname, String bname) { VtnKey vtnKey = new VtnKey(new VnodeName(tname)); VbridgeKey vbrKey = new VbridgeKey(new VnodeName(bname)); return InstanceIdentifier.builder(Vtns.class). child(Vtn.class, vtnKey). child(Vbridge.class, vbrKey). child(VbridgeConfig.class). build(); }