public AsIdBuilder(AsId base) { this._localAs = base.getLocalAs(); this._routerId = base.getRouterId(); this._stalepathTime = base.getStalepathTime(); this._announceFbit = base.isAnnounceFbit(); if (base instanceof AsIdImpl) { AsIdImpl impl = (AsIdImpl) 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.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsId> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev150901.bgp.AsId>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
return; LOG.debug("received add router config asNum {}", val.getLocalAs().intValue()); synchronized (BgpConfigurationManager.this) { BgpRouter br = getClient(yangObj); return; int asNum = val.getLocalAs().intValue(); Ipv4Address routerId = val.getRouterId(); Boolean afb = val.isAnnounceFbit(); String rid = (routerId == null) ? "" : routerId.getValue(); int stalepathTime = (int) getStalePathtime(RESTART_DEFAULT_GR, val);
protected synchronized void remove(InstanceIdentifier<AsId> iid, AsId val) { LOG.debug("received delete router config asNum {}", val.getLocalAs().intValue()); synchronized(BgpConfigurationManager.this) { BgpRouter br = getClient(yangObj); if (br == null) { return; } int asNum = val.getLocalAs().intValue(); try { br.stopBgp(asNum); } catch (Exception e) { LOG.error(yangObj+" Delete received exception: \""+e+"\"; "+delWarn); } if (bgpManager.getBgpCounters() != null) { bgpManager.stopBgpCountersTask(); } } }
public static long getStalePathtime(int defValue, AsId as_num) { long spt = 0; try { spt = getConfig().getGracefulRestart().getStalepathTime(); } catch (Exception e) { try { spt = as_num.getStalepathTime(); LOG.trace("BGP config/Stale-path time is not set using graceful"); } catch (Exception ignore) { LOG.trace("BGP AS id is not set using graceful"); spt = defValue; } } if (spt == 0) { LOG.trace("BGP config/Stale-path time is not set using graceful/start-bgp"); spt = defValue; } return spt; }
protected synchronized void remove(InstanceIdentifier<AsId> iid, AsId val) { LOG.error("received delete router config asNum {}", val.getLocalAs().intValue()); if (ignoreClusterDcnEventForFollower()) { return; } synchronized (BgpConfigurationManager.this) { BgpRouter br = getClient(yangObj); if (br == null) { return; } int asNum = val.getLocalAs().intValue(); try { br.stopBgp(asNum); } catch (Exception e) { LOG.error(yangObj + " Delete received exception: \"" + e + "\"; " + delWarn); } if (getBgpCounters() != null) { stopBgpCountersTask(); } if (getBgpAlarms() != null) { stopBgpAlarmsTask(); } } }
if (!Objects.equals(_localAs, other.getLocalAs())) { return false; if (!Objects.equals(_routerId, other.getRouterId())) { return false; if (!Objects.equals(_stalepathTime, other.getStalepathTime())) { return false; if (!Objects.equals(_announceFbit, other.isAnnounceFbit())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
return null; int asn = bm.getConfig().getAsId().getLocalAs().intValue(); int hops = 0; if (!Commands.isValid(nbrIp, Commands.IPADDR, IP)) {
protected synchronized void add(InstanceIdentifier<AsId> iid, AsId val) { LOG.debug("received add router config asNum {}", val.getLocalAs().intValue()); synchronized(BgpConfigurationManager.this) { BgpRouter br = getClient(yangObj); return; int asNum = val.getLocalAs().intValue(); Ipv4Address routerId = val.getRouterId(); Long spt = val.getStalepathTime(); Boolean afb = val.isAnnounceFbit(); String rid = (routerId == null) ? "" : routerId.getValue(); int stalepathTime = (spt == null) ? 90 : spt.intValue();
return null; int asn = bm.getConfig().getAsId().getLocalAs().intValue(); int hops = 0; if (!Commands.isValid(nbrIp, Commands.IPADDR, IP)) {
int asNum = a.getLocalAs().intValue(); Ipv4Address routerId = a.getRouterId(); Long spt = a.getStalepathTime(); Boolean afb = a.isAnnounceFbit(); String rid = (routerId == null) ? "<n/a>" : routerId.getValue(); int s = (spt == null) ? 0 : spt.intValue();
int asNum = a.getLocalAs().intValue(); Ipv4Address routerId = a.getRouterId(); Long spt = a.getStalepathTime(); Boolean afb = a.isAnnounceFbit(); String rid = (routerId == null) ? "<n/a>" : routerId.getValue(); int s = (spt == null) ? 0 : spt.intValue();
return; int asNum = a.getLocalAs().intValue(); Ipv4Address routerId = a.getRouterId(); Long spt = a.getStalepathTime(); Boolean afb = a.isAnnounceFbit(); String rid = (routerId == null) ? "" : routerId.getValue(); int stalepathTime = (spt == null) ? 90 : spt.intValue();
return; int asNum = a.getLocalAs().intValue(); Ipv4Address routerId = a.getRouterId(); Long spt = a.getStalepathTime(); Boolean afb = a.isAnnounceFbit(); String rid = (routerId == null) ? "" : routerId.getValue(); int stalepathTime = (int) getStalePathtime(0, config.getAsId());