public NeighborsBuilder setRemoteAs(final java.lang.Long value) { if (value != null) { checkRemoteAsRange(value); } this._remoteAs = value; return this; }
public synchronized void addNeighbor(String nbrIp, int remoteAs) { Ipv4Address nbrAddr = new Ipv4Address(nbrIp); Long rAs = (long) remoteAs; InstanceIdentifier.InstanceIdentifierBuilder<Neighbors> iib = InstanceIdentifier.builder(Bgp.class) .child(Neighbors.class, new NeighborsKey(nbrAddr)); InstanceIdentifier<Neighbors> iid = iib.build(); Neighbors dto = new NeighborsBuilder().setAddress(nbrAddr) .setRemoteAs(rAs).build(); update(iid, dto); }
private NeighborsImpl(NeighborsBuilder base) { if (base.getKey() == null) { this._key = new NeighborsKey( base.getAddress() ); this._address = base.getAddress(); } else { this._key = base.getKey(); this._address = _key.getAddress(); } this._addressFamilies = base.getAddressFamilies(); this._ebgpMultihop = base.getEbgpMultihop(); this._remoteAs = base.getRemoteAs(); this._updateSource = base.getUpdateSource(); 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.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.Neighbors>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public synchronized void addNeighbor(String nbrIp, int remoteAs) { Ipv4Address nbrAddr = new Ipv4Address(nbrIp); Long rAs = (long) remoteAs; InstanceIdentifier.InstanceIdentifierBuilder<Neighbors> iib = InstanceIdentifier.builder(Bgp.class) .child(Neighbors.class, new NeighborsKey(nbrAddr)); InstanceIdentifier<Neighbors> iid = iib.build(); Neighbors dto = new NeighborsBuilder().setAddress(nbrAddr) .setRemoteAs(rAs).build(); update(iid, dto); }