From 537a24f3c37b577ec174bced319d2c3fdb5322f7 Mon Sep 17 00:00:00 2001 From: Brad Searle Date: Tue, 12 Jun 2018 07:29:24 +1000 Subject: Add support for frr in new versions of cumulus - closes #1087 (#1375) --- CHANGELOG.md | 1 + docs/Model-Notes/Cumulus.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/Model-Notes/README.md | 1 + lib/oxidized/model/cumulus.rb | 29 +++++++++++++++++------------ 4 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 docs/Model-Notes/Cumulus.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b4d975d..19c7385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * BUGFIX: model edgecos does not trigger falsepositives due to uptime and memory utilization * BUGFIX: Use SECRET-DATA hints for hiding secrets in JunOS (@Zmegolaz) +* FEATURE: add frr support to cumulus model (@User4574 / @bobthebutcher) ## 0.22.0 diff --git a/docs/Model-Notes/Cumulus.md b/docs/Model-Notes/Cumulus.md new file mode 100644 index 0000000..b5231d8 --- /dev/null +++ b/docs/Model-Notes/Cumulus.md @@ -0,0 +1,38 @@ +# Cumulus Linux + +## Routing Daemon + +With the release of Cumulus Linux 3.4.0 the platform moved the routing daemon to a fork of `Quagga` named `FRRouting`. See the below link for the release notes. + +[https://support.cumulusnetworks.com/hc/en-us/articles/115011217808-Cumulus-Linux-3-4-0-Release-Notes](https://support.cumulusnetworks.com/hc/en-us/articles/115011217808-Cumulus-Linux-3-4-0-Release-Notes) + +A variable has been added to enable users running Cumulus Linux > 3.4.0 to target the new `frr` routing daemon. + +### Example usage + +```yaml +vars: + cumulus_routing_daemon: frr +``` + +Alternatively map a column for the `cumulus_routing_daemon` variable. + +```yaml +source: + csv: + map: + name: 0 + ip: 1 + model: 2 + group: 3 + vars_map: + cumulus_routing_daemon: 4 +``` + +And set the `cumulus_routing_daemon` variable in the `router.db` file. + +```text +cumulus1:192.168.121.134:cumulus:cumulus:frr +``` + +The default variable is `quagga` so existing installations continue to operate without interruption. \ No newline at end of file diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md index 993eb77..aa0c25e 100644 --- a/docs/Model-Notes/README.md +++ b/docs/Model-Notes/README.md @@ -11,6 +11,7 @@ Vendor | Model |Updated AireOS|[AireOS](AireOS.md)|29 Nov 2017 Arbor Networks|[ArbOS](ArbOS.md)|27 Feb 2018 Arista|[EOS](EOS.md)|05 Feb 2018 +Cumulus|[Cumulus](Cumulus.md)|11 Jun 2018 Huawei|[VRP](VRP-Huawei.md)|17 Nov 2017 Juniper|[MX/QFX/EX/SRX/J Series](JunOS.md)|18 Jan 2018 Netgear|[Netgear](Netgear.md)|11 Apr 2018 diff --git a/lib/oxidized/model/cumulus.rb b/lib/oxidized/model/cumulus.rb index 334e1e4..f53ca73 100644 --- a/lib/oxidized/model/cumulus.rb +++ b/lib/oxidized/model/cumulus.rb @@ -13,6 +13,11 @@ class Cumulus < Oxidized::Model # show the persistent configuration pre do + # Set FRR or Quagga in config + routing_daemon = vars(:cumulus_routing_daemon) ? vars(:cumulus_routing_daemon).downcase : 'quagga' + routing_conf_file = routing_daemon == 'frr' ? 'frr.conf' : 'Quagga.conf' + routing_daemon_shout = routing_daemon.upcase + cfg = add_comment 'THE HOSTNAME' cfg += cmd 'cat /etc/hostname' @@ -34,23 +39,23 @@ class Cumulus < Oxidized::Model cfg += add_comment 'SNMP settings' cfg += cmd 'cat /etc/snmp/snmpd.conf' - cfg += add_comment 'QUAGGA DAEMONS' - cfg += cmd 'cat /etc/quagga/daemons' + cfg += add_comment "#{routing_daemon_shout} DAEMONS" + cfg += cmd "cat /etc/#{routing_daemon}/daemons" - cfg += add_comment 'QUAGGA ZEBRA' - cfg += cmd 'cat /etc/quagga/zebra.conf' + cfg += add_comment "#{routing_daemon_shout} ZEBRA" + cfg += cmd "cat /etc/#{routing_daemon}/zebra.conf" - cfg += add_comment 'QUAGGA BGP' - cfg += cmd 'cat /etc/quagga/bgpd.conf' + cfg += add_comment "#{routing_daemon_shout} BGP" + cfg += cmd "cat /etc/#{routing_daemon}/bgpd.conf" - cfg += add_comment 'QUAGGA OSPF' - cfg += cmd 'cat /etc/quagga/ospfd.conf' + cfg += add_comment "#{routing_daemon_shout} OSPF" + cfg += cmd "cat /etc/#{routing_daemon}/ospfd.conf" - cfg += add_comment 'QUAGGA OSPF6' - cfg += cmd 'cat /etc/quagga/ospf6d.conf' + cfg += add_comment "#{routing_daemon_shout} OSPF6" + cfg += cmd "cat /etc/#{routing_daemon}/ospf6d.conf" - cfg += add_comment 'QUAGGA CONF' - cfg += cmd 'cat /etc/quagga/Quagga.conf' + cfg += add_comment "#{routing_daemon_shout} CONF" + cfg += cmd "cat /etc/#{routing_daemon}/#{routing_conf_file}" cfg += add_comment 'MOTD' cfg += cmd 'cat /etc/motd' -- cgit v1.2.1