summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lib/oxidized/model/alteonos.rb60
2 files changed, 62 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5866cb0..23404d5 100644
--- a/README.md
+++ b/README.md
@@ -168,6 +168,8 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen
* [PANOS](lib/oxidized/model/panos.rb)
* [PLANET SG/SGS Switches](lib/oxidized/model/planet.rb)
* [pfSense](lib/oxidized/model/pfsense.rb)
+ * Radware
+ * [AlteonOS](lib/oxidized/model/alteonos.rb)
* Quanta
* [Quanta / VxWorks 6.6 (1.1.0.8)](lib/oxidized/model/quantaos.rb)
* Siklu
diff --git a/lib/oxidized/model/alteonos.rb b/lib/oxidized/model/alteonos.rb
new file mode 100644
index 0000000..9eacf4e
--- /dev/null
+++ b/lib/oxidized/model/alteonos.rb
@@ -0,0 +1,60 @@
+class ALTEONOS < Oxidized::Model
+
+ prompt /^\(?.+\)?\s?[#>]/
+
+ comment '! '
+
+ cmd :secret do |cfg|
+ cfg.gsub!(/^([\s\t]*admpw ).*/, '\1 <password removed>')
+ cfg.gsub!(/^([\s\t]*pswd ).*/, '\1 <password removed>')
+ cfg.gsub!(/^([\s\t]*esecret ).*/, '\1 <password removed>')
+ cfg
+ end
+
+ ##############################################################################################
+ ## Added to remove #
+ ## #
+ ##/* Configuration dump taken 14:10:20 Fri Jul 28, 2017 (DST) #
+ ##/* Configuration last applied at 16:17:05 Fri Jul 14, 2017 #
+ ##/* Configuration last save at 16:17:43 Fri Jul 14, 2017 #
+ ##/* Version 29.0.3.12, vXXXXXXXX, Base MAC address XXXXXXXXXXX #
+ ##/* To restore SSL Offloading configuration and management HTTPS access, #
+ ##/* it is recommended to include the private keys in the dump. #
+ ## OR #
+ ##/* To restore SSL Offloading configuration and management HTTPS access,it is recommended #
+ ##/* to include the private keys in the dump. #
+ ## #
+ ##############################################################################################
+
+ cmd 'cfg/dump' do |cfg|
+ cfg.gsub! /^([\s\t\/*]*Configuration).*/, ''
+ cfg.gsub! /^([\s\t\/*]*Version).*/, ''
+ cfg.gsub! /^([\s\t\/*]*To restore ).*/, ''
+ cfg.gsub! /^([\s\t\/*]*it is recommended to include).*/, ''
+ cfg.gsub! /^([\s\t\/*]*to include ).*/, ''
+ cfg
+ end
+
+ #Answer for Dispay private keys
+ expect /^Display private keys\?\s?\[y\/n\]\: $/ do |data, re|
+ send "n\r"
+ data.sub re, ''
+ end
+
+ #Answer for sync to peer on exit
+ expect /^Confirm Sync to Peer\s?\[y\/n\]\: $/ do |data, re|
+ send "n\r"
+ data.sub re, ''
+ end
+
+ #Answer for Unsaved configuration
+ expect /^(WARNING: There are unsaved configuration changes).*/ do |data, re|
+ send "n\r"
+ data.sub re, ''
+ end
+
+ cfg :ssh do
+ pre_logout 'exit'
+ end
+
+end