From e14f9fa6ee3786db36a9ef8383c21861ccae4dde Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Mon, 21 Jul 2014 21:03:09 +0300 Subject: Brocade Fabric OS model cleanups --- lib/oxidized/model/fabricos.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/oxidized/model/fabricos.rb b/lib/oxidized/model/fabricos.rb index 4854541..7ab9fd5 100644 --- a/lib/oxidized/model/fabricos.rb +++ b/lib/oxidized/model/fabricos.rb @@ -6,10 +6,6 @@ class FabricOS < Oxidized::Model prompt /^([\w]+:+[\w]+[>]\s)$/ comment '# ' - cmd :all do |cfg| - cfg - end - cmd 'chassisShow' do |cfg| comment cfg end @@ -22,8 +18,4 @@ class FabricOS < Oxidized::Model exec true # don't run shell, run each command in exec channel end - cfg :ssh do - pre_logout 'exit' - end - end -- cgit v1.2.1 From 605050c9c32e26a7420c6feef3f72d95b3095f10 Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Tue, 22 Jul 2014 18:57:13 +0300 Subject: Documentation improvements: added list of supported devices and installation instructions for CentOS, OL and RHEL --- .README.md.swp | Bin 0 -> 20480 bytes README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .README.md.swp diff --git a/.README.md.swp b/.README.md.swp new file mode 100644 index 0000000..8378ae4 Binary files /dev/null and b/.README.md.swp differ diff --git a/README.md b/README.md index b797006..6ea1822 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,29 @@ * restful API to fetch configurations (/node/fetch/[NODE] or /node/fetch/group/[NODE]) * restful API to show list of nodes (GET /nodes) +# Supported OS types + + * A10 Networks ACOS + * Alcatel-Lucent Operating System AOS + * Alcatel-Lucent Operating System AOS7 + * Alcatel-Lucent Operating System Wireless + * Alcatel-Lucent TiMOS + * Arista EOS + * Brocade Fabric OS + * Brocade Ironware + * Cisco AireOS + * Cisco ASA + * Cisco IOS + * Cisco IOS-XR + * DELL PowerConnect + * Force10 FTOS + * FortiGate FortiOS + * HP ProCurve + * Juniper JunOS + # Install - * early days, but try: + + * Debian 1. apt-get install ruby ruby-dev libsqlite3-dev libssl-dev 2. gem install oxidized 3. gem install oxidized-script oxidized-web # if you don't install oxidized-web, make sure you remove "rest" from your config @@ -18,6 +39,38 @@ 6. (maybe point to your rancid/router.db or copy it there) 7. oxidized + * CentOS, Oracle Linux, Red Hat Linux version 6 + 1. Install Ruby 1.9.3 or greater + * For Ruby 2.1.2 installation instructions see "Installing Ruby 2.1.2 using RVM" + 2. Install Oxidized dependencies + * yum install cmake sqlite-devel openssl-devel + 3. Install Oxidized daemon and Web front-end from Ruby Gems + * gem install oxidized + * gem install oxidized-script oxidized-web + 4. Start Oxidized, this will create initial configuration + * oxidized + 5. Edit Oxidized configuration and create device database + * vi ~/.config/oxidized/config + * vi ~/.config/oxidized/router.db + 6. If you are using file system storage create config directory + * mkdir -p ~/.config/oxidized/configs/default + 7. Start Oxidized + * oxidized + + * Installing Ruby 2.1.2 using RVM + 1. Install Ruby 2.1.2 build dependencies + * yum install curl gcc-c++ patch readline readline-devel zlib zlib-devel + * yum install libyaml-devel libffi-devel openssl-devel make cmake + * yum install bzip2 autoconf automake libtool bison iconv-devel + 2. Install RVM + * curl -L get.rvm.io | bash -s stable + 3. Setup RVM environment + * source /etc/profile.d/rvm.sh + 4. Compile and install Ruby 2.1.2 + * rvm install 2.1.2 + 5. Set Ruby 2.1.2 as default + * rvm use --default 2.1.2 + # API ## Input * gets config from nodes -- cgit v1.2.1 From 983a4ad32cddefcec69cdb0aab0713a420009b3a Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Tue, 22 Jul 2014 19:02:26 +0300 Subject: Documentation formatting fixes --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6ea1822..0974f39 100644 --- a/README.md +++ b/README.md @@ -41,23 +41,23 @@ * CentOS, Oracle Linux, Red Hat Linux version 6 1. Install Ruby 1.9.3 or greater - * For Ruby 2.1.2 installation instructions see "Installing Ruby 2.1.2 using RVM" + * For Ruby 2.1.2 installation instructions see "Installing Ruby 2.1.2 using RVM" 2. Install Oxidized dependencies - * yum install cmake sqlite-devel openssl-devel + * yum install cmake sqlite-devel openssl-devel 3. Install Oxidized daemon and Web front-end from Ruby Gems - * gem install oxidized - * gem install oxidized-script oxidized-web + * gem install oxidized + * gem install oxidized-script oxidized-web 4. Start Oxidized, this will create initial configuration - * oxidized + * oxidized 5. Edit Oxidized configuration and create device database - * vi ~/.config/oxidized/config - * vi ~/.config/oxidized/router.db + * vi ~/.config/oxidized/config + * vi ~/.config/oxidized/router.db 6. If you are using file system storage create config directory - * mkdir -p ~/.config/oxidized/configs/default + * mkdir -p ~/.config/oxidized/configs/default 7. Start Oxidized - * oxidized + * oxidized - * Installing Ruby 2.1.2 using RVM + * Installing Ruby 2.1.2 using RVM 1. Install Ruby 2.1.2 build dependencies * yum install curl gcc-c++ patch readline readline-devel zlib zlib-devel * yum install libyaml-devel libffi-devel openssl-devel make cmake -- cgit v1.2.1 From a150604f876a49a20d2428ba25fbffe3a604ddd5 Mon Sep 17 00:00:00 2001 From: thakala Date: Tue, 22 Jul 2014 19:03:07 +0300 Subject: Delete .README.md.swp --- .README.md.swp | Bin 20480 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .README.md.swp diff --git a/.README.md.swp b/.README.md.swp deleted file mode 100644 index 8378ae4..0000000 Binary files a/.README.md.swp and /dev/null differ -- cgit v1.2.1 From 8dda557fc3d1cee63e54329260b10a66db147131 Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Tue, 22 Jul 2014 19:57:48 +0300 Subject: Cisco ASA model added --- lib/oxidized/model/asa.rb | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 lib/oxidized/model/asa.rb diff --git a/lib/oxidized/model/asa.rb b/lib/oxidized/model/asa.rb new file mode 100644 index 0000000..3ee4e2d --- /dev/null +++ b/lib/oxidized/model/asa.rb @@ -0,0 +1,48 @@ +class ASA < Oxidized::Model + + # Cisco ASA model # + # Only SSH supported for the sake of security + + prompt /^\r*([\w]+[#>]\s?)$/ + comment '! ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd :secret do |cfg| + cfg.gsub! /enable password (\S+) (.*)/, 'enable password