}
public void peerDown(String ipAddress, long asNumber) {
+ PeerDownEvent peerDownEvent = new PeerDownEvent(ipAddress,asNumber);
+ bgpUpdatesHistory.addToHistory(TransactionType.ADD, peerDownEvent);
List<String> tepIpList = bgpUtil.getDcgwTepConfig(ipAddress);
if (tepIpList == null) {
LOG.error("No Tep IP configured for DCGW {} on a peerDown", ipAddress);
}
public void peerUp(String ipAddress, long asNumber) {
+ PeerUpEvent peerUpEvent = new PeerUpEvent(ipAddress,asNumber);
+ bgpUpdatesHistory.addToHistory(TransactionType.ADD, peerUpEvent);
List<String> tepIpList = bgpUtil.getDcgwTepConfig(ipAddress);
if (tepIpList == null) {
LOG.error("No Tep IP configured for DCGW {} on a peerUp", ipAddress);
session.getConsole().println(
"exec configure-bgp -op [start-bgp-server | stop-bgp-server | add-neighbor | delete-neighbor|"
+ " add-route | delete-route | graceful-restart| enable-log ]");
+ return null;
}
switch (op) {
case "start-bgp-server":
--- /dev/null
+/*
+ * Copyright © 2015, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.netvirt.bgpmanager;
+
+public class PeerDownEvent {
+ private String ipAddress;
+ private Long asNumber;
+
+ public PeerDownEvent(String ipAddress,Long asNumber) {
+ this.ipAddress = ipAddress;
+ this.asNumber = asNumber;
+ }
+
+ @Override
+ public String toString() {
+ return "PeerDownEvent{"
+ + "ipAddress='" + ipAddress + '\''
+ + ", asNumber=" + asNumber
+ + '}';
+ }
+}
--- /dev/null
+/*
+ * Copyright © 2015, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.netvirt.bgpmanager;
+
+public class PeerUpEvent {
+ private String ipAddress;
+ private Long asNumber;
+
+ public PeerUpEvent(String ipAddress,Long asNumber) {
+ this.ipAddress = ipAddress;
+ this.asNumber = asNumber;
+ }
+
+ @Override
+ public String toString() {
+ return "PeerUpEvent{"
+ + "ipAddress='" + ipAddress + '\''
+ + ", asNumber=" + asNumber
+ + '}';
+ }
+}
"display routing ip bgp vpnv4 rd <rd> tags",
"display routing ip bgp vpnv4 rd <rd> <ip>",
"display routing ip bgp vpnv4 rd <rd> <ip/mask>",
+ "display routing ip bgp vpnv6 all",
+ "display routing ip bgp vpnv6 rd <rd>",
+ "display routing ip bgp vpnv6 all summary",
+ "display routing ip bgp vpnv6 all tags",
"display routing ip bgp neighbors",
"display routing ip bgp summary",
"display routing ip bgp ipv4 unicast",
}
AsId asId = config.getAsId();
if (asId != null) {
- long asNum = asId.getLocalAs().longValue();
+ Long asNum = asId.getLocalAs().longValue();
IpAddress routerId = asId.getRouterId();
Long spt = asId.getStalepathTime().toJava();
Boolean afb = asId.isAnnounceFbit();
spt = gracefulRestart.getStalepathTime().toJava();
}
ps.printf("%nBGP Router%n");
- ps.printf("\t%-15s %d%n\t%-15s %s%n\t%-15s %s%n\t%-15s %s%n",
- ASSTR, asNum, RISTR, rid, SPSTR, spt == null || spt == 0 ? "default" : spt.toString(), FBSTR,
- bit);
+ ps.printf("\t%-15s %s%n\t%-15s %s%n\t%-15s %s%n\t%-15s %s%n",
+ ASSTR, asNum.toString(), RISTR, rid, SPSTR,
+ spt == null || spt == 0 ? "default" : spt.toString(), FBSTR, bit);
}
Logging logging = config.getLogging();
// Store in the file
toFile.write(sb.toString().trim());
} catch (UnknownHostException e) {
- LOG.error("Unknown host {}", bgpSdncMip, e);
+ LOG.info("Unknown host exception occured while socket creation {} ", bgpSdncMip);
} catch (SocketTimeoutException e) {
- LOG.error("Socket timeout", e);
+ LOG.info("Socket timeout Exception occured while socket creation");
} catch (IOException e) {
- LOG.error("I/O error", e);
+ LOG.info("I/O exception occured while socket creation");
}
}