oxidized 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4293285f8095f28f9f3d38dc2d606a03a58d163b
4
- data.tar.gz: f108592ebdce488d10f06d7ee0e5545e3e117e32
3
+ metadata.gz: f88947ee1d76a827ebd27c7bed550316840adb77
4
+ data.tar.gz: ed10ff21f48f72e1f447ea4c1a6f2c47f07affe1
5
5
  SHA512:
6
- metadata.gz: aed22b16c6223c5b27a6b68476e25aea4154fcafd104a8567f7f19c4de38c8dddcd3fe18e1fd0950bc6e01e927d6af2fed514dd8f966eb33670f2a3517c6285f
7
- data.tar.gz: 62a21f8caa39a27c853d2d56b3b96d35f6320db5cf6743ea76dd0cb7c6562729a0b96b5cc9b83524ad6edaac960dfb07ab88c7bffa526b459248603ba0e71bfa
6
+ metadata.gz: 210d315e689781ffc62d5d64faff5f6cf6be4e6e5178703d4f30026be62dab6764987f85cb8eb406aa456f96e074fc6d8a47f7ce7a4df66e106ee099c9d9d179
7
+ data.tar.gz: 65ab67187988d2fbc67cea78498b9cd6dd5b4ba35a0c9e871079eaa840c0f66f930b4c89b59bc20041b0f8cc4bd58f990d22e4f811fd668cd10cf100dbf3cfd7
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- # 0 17.3
1
+ # 0.18.0
2
+ - FEATURE: APC model (by @davromaniak )
3
+ - BUGFIX: ironware, aosw
4
+ - BUGFIX: interpolate nil, false, true for node vars too
5
+
6
+ # 0 17.0
2
7
  - FEATURE: "nil", "false" and "true" in source (e.g. router.db) are interpeted as nil, false, true. Empty is now always considered empty string, instead of in some cases nil and some cases empty string.
3
8
  - FEATURE: support tftp as input model (@MajesticFalcon)
4
9
  - FEATURE: add alvarion model (@MajesticFalcon)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oxidized (0.17.0)
4
+ oxidized (0.18.0)
5
5
  asetus (~> 0.1)
6
6
  net-ssh (~> 3.0.2)
7
7
  net-telnet
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Oxidized [![Build Status](https://travis-ci.org/Shopify/oxidized.svg)](https://travis-ci.org/Shopify/oxidized) [![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized) [![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1
+ # Oxidized [![Build Status](https://travis-ci.org/Shopify/oxidized.svg)](https://travis-ci.org/Shopify/oxidized) [![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized) [![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
2
 
3
3
  Oxidized is a network device configuration backup tool. It's a RANCID replacement!
4
4
 
@@ -45,102 +45,104 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen
45
45
 
46
46
  # Supported OS types
47
47
  * Vendor
48
- * OS - model_name
48
+ * OS model
49
49
 
50
50
  * A10 Networks
51
- * ACOS - acos
51
+ * [ACOS](lib/oxidized/model/acos.rb)
52
52
  * Alcatel-Lucent
53
- * AOS - aos
54
- * AOS7 - aos7
55
- * ISAM - isam
53
+ * [AOS](lib/oxidized/model/aos.rb)
54
+ * [AOS7](lib/oxidized/model/aos7.rb)
55
+ * [ISAM](lib/oxidized/model/isam.rb)
56
56
  * Wireless
57
57
  * Alvarion
58
- * BreezeACCESS - alvarion
58
+ * [BreezeACCESS](lib/oxidized/model/alvarion.rb)
59
+ * APC
60
+ * [AOS](lib/oxidized/model/apc_aos.rb)
59
61
  * Arista
60
- * EOS - eos
62
+ * [EOS](lib/oxidized/model/eos.rb)
61
63
  * Arris
62
- * C4CMTS - c4cmts
64
+ * [C4CMTS](lib/oxidized/model/c4cmts.rb)
63
65
  * Aruba
64
- * AOSW - aosw
66
+ * [AOSW](lib/oxidized/model/aosw.rb)
65
67
  * Brocade
66
- * FabricOS - fabricos
67
- * Ironware - ironware
68
- * NOS (Network Operating System) - nos
69
- * Vyatta - vyatta
70
- * 6910 - br6910
68
+ * [FabricOS](lib/oxidized/model/fabricos.rb)
69
+ * [Ironware](lib/oxidized/model/ironware.rb)
70
+ * [NOS (Network Operating System)](lib/oxidized/model/nos.rb)
71
+ * [Vyatta](lib/oxidized/model/vyatta.rb)
72
+ * [6910](lib/oxidized/model/br6910.rb)
71
73
  * Check Point
72
- * GaiaOS - gaiaos
74
+ * [GaiaOS](lib/oxidized/model/gaiaos.rb)
73
75
  * Ciena
74
- * SOAS - saos
76
+ * [SOAS](lib/oxidized/model/saos.rb)
75
77
  * Cisco
76
- * AireOS - aireos
77
- * ASA - asa
78
- * CatOS - catos
79
- * IOS - ios
80
- * IOSXR - iosxr
81
- * NXOS - nxos
82
- * SMB (Nikola series)
78
+ * [AireOS](lib/oxidized/model/aireos.rb)
79
+ * [ASA](lib/oxidized/model/asa.rb)
80
+ * [CatOS](lib/oxidized/model/catos.rb)
81
+ * [IOS](lib/oxidized/model/ios.rb)
82
+ * [IOSXR](lib/oxidized/model/iosxr.rb)
83
+ * [NXOS](lib/oxidized/model/nxos.rb)
84
+ * [SMB (Nikola series)](lib/oxidized/model/ciscosmb.rb)
83
85
  * Citrix
84
- * NetScaler (Virtual Applicance) - netscaler
86
+ * [NetScaler (Virtual Applicance)](lib/oxidized/model/netscaler.rb)
85
87
  * Coriant (former Tellabs)
86
- * TMOS (8800) - tmos
87
- * 8600 -
88
+ * [TMOS (8800)](lib/oxidized/model/corianttmos.rb)
89
+ * [8600](lib/oxidized/model/coriant8600.rb)
88
90
  * Cumulus
89
- * Linux
91
+ * [Linux](lib/oxidized/model/cumulus.rb)
90
92
  * DataCom
91
- * DmSwitch 3000
93
+ * [DmSwitch 3000](lib/oxidized/model/datacom.rb)
92
94
  * DELL
93
- * PowerConnect - powerconnect
94
- * AOSW - aosw
95
+ * [PowerConnect](lib/oxidized/model/powerconnect.rb)
96
+ * [AOSW](lib/oxidized/model/aosw.rb)
95
97
  * Ericsson/Redback
96
- * IPOS (former SEOS) - ipos
98
+ * [IPOS (former SEOS)](lib/oxidized/model/ipos.rb)
97
99
  * Extreme Networks
98
- * XOS - xos
99
- * WM
100
+ * [XOS](lib/oxidized/model/xos.rb)
101
+ * [WM](lib/oxidized/model/mtrlrfs.rb)
100
102
  * F5
101
- * TMOS
103
+ * [TMOS](lib/oxidized/model/tmos.rb)
102
104
  * Force10
103
- * DNOS - dnos
104
- * FTOS - ftos
105
+ * [DNOS](lib/oxidized/model/dnos.rb)
106
+ * [FTOS](lib/oxidized/model/ftos.rb)
105
107
  * FortiGate
106
- * FortiOS - fortios
108
+ * [FortiOS](lib/oxidized/model/fortios.rb)
107
109
  * HP
108
- * Comware (HP A-series, H3C, 3Com) - comware
109
- * Procurve - procurve
110
+ * [Comware (HP A-series, H3C, 3Com)](lib/oxidized/model/comware.rb)
111
+ * [Procurve](lib/oxidized/model/procurve.rb)
110
112
  * Huawei
111
- * VRP
113
+ * [VRP](lib/oxidized/model/vrp.rb)
112
114
  * Juniper
113
- * JunOS
114
- * ScreenOS (Netscreen)
115
+ * [JunOS](lib/oxidized/model/junos.rb)
116
+ * [ScreenOS (Netscreen)](lib/oxidized/model/screenos.rb)
115
117
  * Mellanox
116
- * MLNX-OS - mlnxos
118
+ * [MLNX-OS](lib/oxidized/model/mlnxos.rb)
117
119
  * Mikrotik
118
- * RouterOS - routeros
120
+ * [RouterOS](lib/oxidized/model/routeros.rb)
119
121
  * Motorola
120
- * RFS
122
+ * [RFS](lib/oxidized/model/mtrlrfs.rb)
121
123
  * MRV
122
- * MasterOS - masteros
124
+ * [MasterOS](lib/oxidized/model/masteros.rb)
123
125
  * Netonix
124
- * WISP Switch (As Netonix) - netonix
126
+ * [WISP Switch (As Netonix)](lib/oxidized/model/netonix.rb)
125
127
  * Nokia (formerly TiMetra, Alcatel, Alcatel-Lucent)
126
- * SR OS (TiMOS) - timos
128
+ * [SR OS (TiMOS)](lib/oxidized/model/timos.rb)
127
129
  * Opengear
128
- * Opengear - opengear
130
+ * [Opengear](lib/oxidized/model/opengear.rb)
129
131
  * Palo Alto
130
- * PANOS - panos
131
- * pfSense - pfsense
132
+ * [PANOS](lib/oxidized/model/panos.rb)
133
+ * [pfSense](lib/oxidized/model/pfsense.rb)
132
134
  * Quanta
133
- * Quanta / VxWorks 6.6 (1.1.0.8) - quantaos
135
+ * [Quanta / VxWorks 6.6 (1.1.0.8)](lib/oxidized/model/quantaos.rb)
134
136
  * Supermicro
135
- * Supermicro - supermicro
137
+ * [Supermicro](lib/oxidized/model/supermicro.rb)
136
138
  * Ubiquiti
137
- * AirOS - airos
138
- * Edgeos - edgeos
139
- * EdgeSwitch - edgeswitch
139
+ * [AirOS](lib/oxidized/model/airos.rb)
140
+ * [Edgeos](lib/oxidized/model/edgeos.rb)
141
+ * [EdgeSwitch](lib/oxidized/model/edgeswitch.rb)
140
142
  * Watchguard
141
- * Fireware OS - firewareos
143
+ * [Fireware OS](lib/oxidized/model/firewareos.rb)
142
144
  * Zyxel
143
- * ZyNOS - zynos
145
+ * [ZyNOS](lib/oxidized/model/zynos.rb)
144
146
 
145
147
 
146
148
  # Installation
@@ -286,6 +288,24 @@ _Note: this step in only needed for creating Oxidized's configuration file and c
286
288
  ```
287
289
  docker run --rm -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest oxidized
288
290
  ```
291
+ If the RESTful API and Web Interface are enabled, on the docker host running the container
292
+ edit /etc/oxidized/config and modify 'rest: 127.0.0.1:8888' by 'rest: 0.0.0.0:8888'
293
+ this will bind port 8888 to all interfaces then expose port out. (Issue #445)
294
+
295
+ You can also use docker-compose to launch oxidized container:
296
+ ```
297
+ # docker-compose.yml
298
+ # docker-compose file example for oxidized that will start along with docker daemon
299
+ oxidized:
300
+ restart: always
301
+ image: oxidized/oxidized:latest
302
+ ports:
303
+ - 8888:8888/tcp
304
+ environment:
305
+ CONFIG_RELOAD_INTERVAL: 600
306
+ volumes:
307
+ - /etc/oxidized:/root/.config/oxidized
308
+ ```
289
309
 
290
310
  create the `/etc/oxidized/router.db`
291
311
 
@@ -347,10 +367,10 @@ Device models can contain substitution filters to remove potentially sensitive d
347
367
 
348
368
  As a partial example from ios.rb:
349
369
 
350
- ```
370
+ ```
351
371
  cmd :secret do |cfg|
352
372
  cfg.gsub! /^(snmp-server community).*/, '\\1 <configuration removed>'
353
- (...)
373
+ (...)
354
374
  cfg
355
375
  end
356
376
  ```
@@ -416,10 +436,10 @@ source:
416
436
  adapter: mysql2
417
437
  database: oxidized
418
438
  table: nodes
419
- username: root
439
+ username: root
420
440
  password: rootpass
421
441
  map:
422
- name: ip
442
+ name: ip
423
443
  model: model
424
444
  username: username
425
445
  password: password
@@ -0,0 +1,14 @@
1
+ <VirtualHost *:80>
2
+ # Place in sites-available
3
+
4
+ ServerAdmin admin@example.com
5
+ ServerName oxidized.example.com
6
+ ServerAlias oxidized
7
+
8
+ ProxyPass / http://127.0.0.1:8888/
9
+ ProxyPassReverse / http://127.0.0.1:8888/
10
+
11
+ ErrorLog /var/log/apache2/oxidized_error.log
12
+ CustomLog /var/log/apache2/oxidized_access.log combined
13
+
14
+ </VirtualHost>
@@ -0,0 +1,14 @@
1
+ server {
2
+ listen 80;
3
+ listen [::]:80;
4
+
5
+ server_name oxidized.example.com;
6
+
7
+ location / {
8
+ proxy_pass http://127.0.0.1:8888/;
9
+ }
10
+
11
+ access_log /var/log/nginx/access_oxidized.log;
12
+ error_log /var/log/nginx/error_oxidized.log;
13
+ }
14
+
@@ -60,8 +60,8 @@ class AOSW < Oxidized::Model
60
60
  cfg :telnet, :ssh do
61
61
  if vars :enable
62
62
  post_login do
63
- send 'enable\n'
64
- send vars(:enable) + '\n'
63
+ send "enable\n"
64
+ send vars(:enable) + "\n"
65
65
  end
66
66
  end
67
67
  post_login 'no paging'
@@ -0,0 +1,11 @@
1
+ class Apc_aos < Oxidized::Model
2
+
3
+ cmd 'config.ini' do |cfg|
4
+ cfg.gsub! /^; Configuration file\, generated on.*/, ''
5
+ end
6
+
7
+ cfg :ftp do
8
+ end
9
+
10
+ end
11
+
@@ -2,14 +2,14 @@ class IronWare < Oxidized::Model
2
2
 
3
3
  prompt /^.*(telnet|ssh)\@.+[>#]\s?$/i
4
4
  comment '! '
5
-
5
+
6
6
  #to handle pager without enable
7
7
  #expect /^((.*)--More--(.*))$/ do |data, re|
8
8
  # send ' '
9
9
  # data.sub re, ''
10
10
  #end
11
11
 
12
-
12
+
13
13
  #to remove backspace (if handle pager without enable)
14
14
  #expect /^((.*)[\b](.*))$/ do |data, re|
15
15
  # data.sub re, ''
@@ -44,14 +44,14 @@ class IronWare < Oxidized::Model
44
44
  out << sc.rest
45
45
  cfg = out
46
46
  end
47
-
47
+
48
48
  comment cfg
49
49
  end
50
-
50
+
51
51
  cmd 'show flash' do |cfg|
52
52
  comment cfg
53
53
  end
54
-
54
+
55
55
  cmd 'show module' do |cfg|
56
56
  cfg.gsub! /^((Invalid input)|(Type \?)).*$/, '' # some ironware devices are fixed config
57
57
  comment cfg
@@ -74,7 +74,7 @@ class IronWare < Oxidized::Model
74
74
  if vars :enable
75
75
  post_login do
76
76
  send "enable\r\n"
77
- send vars(:enable) + "\r\n"
77
+ cmd vars(:enable)
78
78
  end
79
79
  end
80
80
  post_login ''
@@ -25,7 +25,7 @@ class CSV < Source
25
25
  # map node parameters
26
26
  keys = {}
27
27
  @cfg.map.each do |key, position|
28
- keys[key.to_sym] = data[position]
28
+ keys[key.to_sym] = node_var_interpolate data[position]
29
29
  end
30
30
  keys[:model] = map_model keys[:model] if keys.key? :model
31
31
 
@@ -39,7 +39,7 @@ class HTTP < Source
39
39
  # map node parameters
40
40
  keys = {}
41
41
  @cfg.map.each do |key, position|
42
- keys[key.to_sym] = line[position]
42
+ keys[key.to_sym] = node_var_interpolate line[position]
43
43
  end
44
44
  keys[:model] = map_model keys[:model] if keys.key? :model
45
45
 
@@ -26,7 +26,7 @@ class SQL < Source
26
26
  query.each do |node|
27
27
  # map node parameters
28
28
  keys = {}
29
- @cfg.map.each { |key, sql_column| keys[key.to_sym] = node[sql_column.to_sym] }
29
+ @cfg.map.each { |key, sql_column| keys[key.to_sym] = node_var_interpolate node[sql_column.to_sym] }
30
30
  keys[:model] = map_model keys[:model] if keys.key? :model
31
31
 
32
32
  # map node specific vars
@@ -1,3 +1,3 @@
1
1
  module Oxidized
2
- VERSION = '0.17.0'
2
+ VERSION = '0.18.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxidized
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-28 00:00:00.000000000 Z
13
+ date: 2016-10-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: asetus
@@ -182,8 +182,10 @@ files:
182
182
  - extra/auto-reload-config.runit
183
183
  - extra/nagios_check_failing_nodes.rb
184
184
  - extra/oxidized-report-git-commits
185
+ - extra/oxidized.apache2
185
186
  - extra/oxidized.init
186
187
  - extra/oxidized.init.d
188
+ - extra/oxidized.nginx
187
189
  - extra/oxidized.runit
188
190
  - extra/oxidized.service
189
191
  - extra/oxidized.supervisord
@@ -216,6 +218,7 @@ files:
216
218
  - lib/oxidized/model/aos.rb
217
219
  - lib/oxidized/model/aos7.rb
218
220
  - lib/oxidized/model/aosw.rb
221
+ - lib/oxidized/model/apc_aos.rb
219
222
  - lib/oxidized/model/asa.rb
220
223
  - lib/oxidized/model/br6910.rb
221
224
  - lib/oxidized/model/c4cmts.rb