oxidized 0.30.1 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +3 -4
  3. data/.github/workflows/stale.yml +4 -2
  4. data/.rubocop.yml +18 -3
  5. data/.rubocop_todo.yml +4 -11
  6. data/CHANGELOG.md +93 -1
  7. data/CONTRIBUTING.md +5 -0
  8. data/Dockerfile +84 -20
  9. data/README.md +5 -21
  10. data/Rakefile +31 -2
  11. data/docs/Configuration.md +50 -14
  12. data/docs/Creating-Models.md +75 -4
  13. data/docs/DeviceSimulation.md +184 -0
  14. data/docs/Hooks.md +39 -5
  15. data/docs/Issues.md +97 -0
  16. data/docs/Model-Notes/APC_AOS.md +29 -16
  17. data/docs/Model-Notes/Cumulus.md +5 -0
  18. data/docs/Model-Notes/FSOS.md +6 -0
  19. data/docs/Model-Notes/FortiOS.md +21 -5
  20. data/docs/Model-Notes/HPEAruba.md +31 -0
  21. data/docs/Model-Notes/OS6.md +10 -0
  22. data/docs/Model-Notes/RouterOS.md +15 -0
  23. data/docs/Model-Notes/SikluMHTG.md +7 -0
  24. data/docs/ModelUnitTests.md +186 -0
  25. data/docs/Outputs.md +2 -0
  26. data/docs/Release.md +18 -15
  27. data/docs/Sources.md +21 -0
  28. data/docs/Supported-OS-Types.md +14 -7
  29. data/docs/Troubleshooting.md +35 -0
  30. data/examples/podman-compose/Makefile +59 -17
  31. data/examples/podman-compose/README.md +63 -27
  32. data/examples/podman-compose/docker-compose.yml +11 -2
  33. data/examples/podman-compose/gitserver/.gitignore +1 -0
  34. data/examples/podman-compose/gitserver/Dockerfile +14 -0
  35. data/examples/podman-compose/model-simulation/Dockerfile-model +1 -1
  36. data/examples/podman-compose/model-simulation/asternos.sh +2 -0
  37. data/examples/podman-compose/oxidized-config/.gitignore +2 -0
  38. data/examples/podman-compose/oxidized-config/config +1 -1
  39. data/examples/podman-compose/oxidized-config/config_csv-file +46 -0
  40. data/examples/podman-compose/oxidized-config/config_csv-gitserver +56 -0
  41. data/examples/podman-compose/oxidized-ssh/.gitignore +1 -0
  42. data/extra/device2yaml.rb +245 -0
  43. data/extra/gitdiff-msteams.sh +32 -5
  44. data/extra/nagios_check_failing_nodes.rb +1 -1
  45. data/extra/rest_client.rb +1 -1
  46. data/lib/oxidized/config.rb +8 -2
  47. data/lib/oxidized/hook/githubrepo.rb +37 -7
  48. data/lib/oxidized/hook/slackdiff.rb +29 -7
  49. data/lib/oxidized/input/http.rb +1 -0
  50. data/lib/oxidized/input/ssh.rb +13 -5
  51. data/lib/oxidized/input/telnet.rb +1 -1
  52. data/lib/oxidized/manager.rb +17 -16
  53. data/lib/oxidized/model/aos7.rb +2 -0
  54. data/lib/oxidized/model/aoscx.rb +16 -2
  55. data/lib/oxidized/model/aosw.rb +8 -2
  56. data/lib/oxidized/model/apc_aos.rb +1 -1
  57. data/lib/oxidized/model/arubainstant.rb +90 -0
  58. data/lib/oxidized/model/asa.rb +2 -1
  59. data/lib/oxidized/model/asyncos.rb +1 -1
  60. data/lib/oxidized/model/audiocodes.rb +2 -2
  61. data/lib/oxidized/model/cnos.rb +13 -10
  62. data/lib/oxidized/model/cumulus.rb +19 -2
  63. data/lib/oxidized/model/dlink.rb +1 -0
  64. data/lib/oxidized/model/dlinknextgen.rb +3 -0
  65. data/lib/oxidized/model/edgecos.rb +2 -1
  66. data/lib/oxidized/model/enterprise_sonic.rb +46 -0
  67. data/lib/oxidized/model/eos.rb +2 -0
  68. data/lib/oxidized/model/f5os.rb +17 -0
  69. data/lib/oxidized/model/firewareos.rb +10 -1
  70. data/lib/oxidized/model/fortios.rb +24 -1
  71. data/lib/oxidized/model/fsos.rb +5 -1
  72. data/lib/oxidized/model/garderos.rb +43 -0
  73. data/lib/oxidized/model/h3c.rb +1 -1
  74. data/lib/oxidized/model/ibos.rb +1 -0
  75. data/lib/oxidized/model/ios.rb +20 -12
  76. data/lib/oxidized/model/iosxr.rb +1 -1
  77. data/lib/oxidized/model/junos.rb +1 -1
  78. data/lib/oxidized/model/kornfeldos.rb +33 -0
  79. data/lib/oxidized/model/lenovonos.rb +2 -0
  80. data/lib/oxidized/model/linuxgeneric.rb +1 -1
  81. data/lib/oxidized/model/model.rb +2 -2
  82. data/lib/oxidized/model/netgear.rb +1 -1
  83. data/lib/oxidized/model/nodegrid.rb +1 -1
  84. data/lib/oxidized/model/nsxdfw.rb +30 -0
  85. data/lib/oxidized/model/nxos.rb +2 -1
  86. data/lib/oxidized/model/os6.rb +48 -0
  87. data/lib/oxidized/model/rgos.rb +1 -1
  88. data/lib/oxidized/model/riverbed.rb +104 -0
  89. data/lib/oxidized/model/routeros.rb +2 -2
  90. data/lib/oxidized/model/saos.rb +18 -1
  91. data/lib/oxidized/model/siklumhtg.rb +22 -0
  92. data/lib/oxidized/model/sonicos.rb +8 -2
  93. data/lib/oxidized/model/tplink.rb +1 -0
  94. data/lib/oxidized/model/uplinkolt.rb +46 -0
  95. data/lib/oxidized/model/vyatta.rb +2 -2
  96. data/lib/oxidized/model/xos.rb +7 -0
  97. data/lib/oxidized/node.rb +30 -18
  98. data/lib/oxidized/nodes.rb +13 -5
  99. data/lib/oxidized/output/file.rb +45 -42
  100. data/lib/oxidized/output/git.rb +185 -160
  101. data/lib/oxidized/output/gitcrypt.rb +188 -186
  102. data/lib/oxidized/output/http.rb +53 -51
  103. data/lib/oxidized/output/output.rb +6 -4
  104. data/lib/oxidized/source/csv.rb +44 -49
  105. data/lib/oxidized/source/http.rb +63 -81
  106. data/lib/oxidized/source/jsonfile.rb +63 -0
  107. data/lib/oxidized/source/source.rb +73 -18
  108. data/lib/oxidized/source/sql.rb +66 -59
  109. data/lib/oxidized/version.rb +2 -2
  110. data/oxidized.gemspec +25 -18
  111. metadata +115 -21
@@ -1,29 +1,42 @@
1
1
  # APC AOS Configuration
2
2
 
3
- Currently, the configuration of APC Network Management Cards can be downloaded with FTP only.
3
+ The configuration of APC Network Management Cards can be downloaded using FTP
4
+ and SCP.
5
+
6
+ To download with SCP, you need a
7
+ [patch](https://github.com/net-ssh/net-scp/pull/71) to
8
+ [Net::SCP](https://github.com/net-ssh/net-scp, which has been included
9
+ upstream, but there is currently no new release of Net::SCP and its authors are
10
+ unresponsive.
11
+
12
+ To temporarily solve this,
13
+ [@robertcheramy forked Net::SCP](https://github.com/robertcheramy/net-scp). You
14
+ can build or download the gem there. This gem is already included in the
15
+ oxidized container image (in the release coming after 0.31.0).
4
16
 
5
- A download of the configuration with SCP is [work in progress](https://github.com/ytti/oxidized/issues/1802).
6
- As the APC has an unusual behavior (the connection is closed without an exit-status), this has to be
7
- [fixed](https://github.com/net-ssh/net-scp/pull/71) upstream in [Net::SCP](https://github.com/net-ssh/net-scp).
8
- As soon as there is a release of Net::SCP supporting the behavior of APC OS, we will activate SCP in oxidized.
9
17
 
10
18
  ## Can I collect more information than just the configuration?
11
- APC OS does not have the ability to show the config.ini within an SSH-session. As oxidized can only get the
12
- configuration with one input type at a time, it is not possible to fetch config.ini via FTP/SCP and get the output of
13
- some commands via SSH at the same time.
19
+ APC OS does not have the ability to show the config.ini within an SSH-session.
20
+ As oxidized can only get the configuration with one input type at a time, it is
21
+ not possible to fetch config.ini via FTP/SCP and get the output of
22
+ some commands via SSH at the same time. Feature request #3334 has been opened
23
+ to support multiple inputs in oxidized.
24
+
25
+ A ticket has been opened with APC support in order to enable "cat config.ini"
26
+ within an SSH-session, but APC is not willing to support this.
14
27
 
15
- A ticket has been opened with APC support in order to support "cat config.ini" within an SSH-session, but
16
- the chances it will be supported at some time are not very good, and older versions will still not support it.
17
28
 
18
- ## How do I activate FTP input?
19
- In order to download the configuration with FTP (and in the future with SCP), you have to activate it as an
20
- input in the oxidized configuration. If you do not activate the input, oxidized will fail for the node with
21
- a rather unspecific error (`WARN -- : /apc status fail, retry attempt 1`).
29
+ ## How do I activate FTP/SCP input?
30
+ In order to download the configuration with FTP or SCP, you have to activate it
31
+ as an input in the oxidized configuration. If you do not activate the input,
32
+ oxidized will fail for the node with a
33
+ [rather unspecific error](https://github.com/ytti/oxidized/issues/3346)
34
+ (`WARN -- : /apc status fail, retry attempt 1`).
22
35
 
23
36
  The configuration can be done either globally or only for the model apc_aos.
24
37
 
25
- The global configuration would look like this. Note that Oxidized will try every input type in the given order
26
- until it succeeds, or it will report a failure.
38
+ The global configuration would look like this. Note that Oxidized will try every
39
+ input type in the given order until it succeeds, or it will report a failure.
27
40
  ```yaml
28
41
  input:
29
42
  default: ssh, ftp, scp
@@ -11,6 +11,9 @@ A variable has been added to enable users running Cumulus Linux > 3.4.0 to targe
11
11
  ## NCLU
12
12
  It is possible to switch to [NCLU](https://docs.nvidia.com/networking-ethernet-software/cumulus-linux-44/System-Configuration/Network-Command-Line-Utility-NCLU/) as a configuration collecting method, by setting `cumulus_use_nclu` to true
13
13
 
14
+ ## NVUE
15
+ It is also possible to use [NVUE](https://docs.nvidia.com/networking-ethernet-software/knowledge-base/Setup-and-Getting-Started/NVUE-Cheat-Sheet/) as a configuration collecting method, by setting `cumulus_use_nvue` to true.
16
+
14
17
  ### Example usage
15
18
 
16
19
  ```yaml
@@ -43,4 +46,6 @@ The default value for `cumulus_routing_daemon` is `quagga` so existing installat
43
46
 
44
47
  The default value for `cumulus_use_nclu` is `false`, in case NCLU is not installed.
45
48
 
49
+ The default value for `cumulus_use_nvue` is `false`, in case NVUE is not installed.
50
+
46
51
  Back to [Model-Notes](README.md)
@@ -7,5 +7,11 @@ This has been tested against the following models and OS versions
7
7
  |S3400-48T4SP |Version 2.0.2J Build 81736 |
8
8
  |S3400-48T4SP |Version 2.0.2J Build 95262 |
9
9
  |S3400-48T6SP |Version 2.2.0F Build 109661 |
10
+ |S3400-48T4SP |Version 2.0.2J Build 120538 |
11
+ |S3410-24TS-P |S3410_FSOS 11.4(1)B74S5 |
12
+ |S5850-48T4Q |Version 7.0.4.34 |
13
+ |S5800-48MBQ |Version 7.0.4.21 |
14
+ |S5810-48TS-P |S5810_FSOS 11.4(1)B74S8, Release(10200711) |
15
+ |S5860-20SQ |S5860_FSOS 12.4(1)B0101P1S4 |
10
16
 
11
17
  Back to [Model-Notes](README.md)
@@ -1,18 +1,24 @@
1
1
  # FortiOS Configuration
2
2
 
3
- Create user oxidized with ED25519 public key
3
+ ## Create user oxidized with ED25519 public key
4
+ You can use a user/password for retrieving the configuration or use a SSH public key:
4
5
 
5
6
  ```text
6
7
  config system admin
7
8
  edit oxidized
8
9
  set trusthost1 192.0.2.1 255.255.255.255
9
10
  set accprofile "super_admin_readonly"
10
- set ssh-public-key1 "ssh-ed25519 AAAAThisIsJustAnExmapleKey_UseYourOxidizedPUBLICKEY oxidized@librenms"
11
+ set ssh-public-key1 "ssh-ed25519 AAAAThisIsJustAnExampleKey_UseYourOxidizedPUBLICKEY oxidized@librenms"
11
12
  end
12
13
  ```
13
14
 
14
15
 
15
- Fortigate procdues a lot of config changes. I recommend filtering using
16
+ ## Configuration changes / hiding passwords
17
+ Fortigate reencrypts its passwords every time the configuration is shown.
18
+ This produces a lot of config changes.
19
+ If you don't want to have a new version every time the configuration is
20
+ downloaded, you can hide all secrets. Beware that you won't have a full backup,
21
+ as all passwords will be replaced with <configuration removed>
16
22
 
17
23
  ```yaml
18
24
  models:
@@ -21,8 +27,18 @@ models:
21
27
  remove_secret: true
22
28
  ```
23
29
 
30
+ ## config vs. full config
31
+ On fortios, you can get a configuration without default values (`show .`) or
32
+ including all the default values (`show full-configuration`).
24
33
 
34
+ The full configuration can be quite long and produce time-outs.
35
+ Beginning with oxidized 0.30.1, the default is to get the short configuration.
25
36
 
26
- Oxidized can now retrieve your configuration!
37
+ If you need the full configuration, you can activate it in oxidized config file:
38
+ ```yaml
39
+ models:
40
+ fortios:
41
+ vars:
42
+ fullconfig: true
43
+ ```
27
44
 
28
- Back to [Model-Notes](README.md)
@@ -0,0 +1,31 @@
1
+ # HPE Aruba Networking devices
2
+ HPE Aruba offers various networking devices with different operating systems.
3
+
4
+ ## HPE Aruba Networking Instant Mode (Aruba Instant)
5
+ [Aruba Instant](https://www.arubanetworks.com/techdocs/ArubaDocPortal/content/cons-instant-home.htm)
6
+ runs on IAPs (Instant Access points).
7
+
8
+ The Oxidized model is [ArubaInstant](/lib/oxidized/model/arubainstant.rb).
9
+ When run on the virtual WLAN controller, it will also collect the list of the
10
+ WLAN-AP linked to the controller.
11
+
12
+ The aosw model for AOS 8 used to be used for Aruba Instant, but it does not work
13
+ as well and may stop working in the future.
14
+
15
+ ## HPE Aruba Networking Wireless Operating System 8 (AOS 8)
16
+ [AOS 8](https://www.arubanetworks.com/techdocs/ArubaDocPortal/content/cons-aos-home.htm)
17
+ runs on WLAN controllers (mobility controllers) and controller-managed access
18
+ points.
19
+
20
+ The Oxidized model is [aosw](/lib/oxidized/model/aosw.rb).
21
+
22
+ ## HPE Aruba Networking CX Switch Operating System (AOS-CX)
23
+ [AOS-CX](https://www.arubanetworks.com/techdocs/AOS-CX/help_portal/Content/home.htm)
24
+ is the operating system for the newer CX-Series.
25
+
26
+ The Oxidized model is [aoscx](/lib/oxidized/model/aoscx.rb).
27
+
28
+ ## Older Models
29
+ Older Devices like ProCurve or 3Com/Comware are listed under the Vendor "HP" in
30
+ the [Supported OS Types](docs/Supported-OS-Types.md) list.
31
+
@@ -0,0 +1,10 @@
1
+ # OS6 Configuration
2
+
3
+ The commands Oxidized executes are:
4
+
5
+ 1. terminal length 0
6
+ 2. show version
7
+ 3. show interfaces transceiver properties
8
+ 4. show running-config
9
+
10
+ Back to [Model-Notes](README.md)
@@ -0,0 +1,15 @@
1
+ # Mikrotik RouterOS Configuration
2
+
3
+ RouterOS 7.12 and later support ED25519 keys.
4
+
5
+ Create a key pair, save the public key (``id_ed25519.pub``) and save it on flash. Create a user
6
+ and attach the public key.
7
+
8
+ ```text
9
+ [admin@mikrotik] > /user add name=oxidized group=read disabled=no
10
+ [admin@mikrotik] > /user ssh-keys import public-key-file=id_ed25519.pub user=oxidized
11
+ ```
12
+
13
+ Oxidized can now retrieve your configuration!
14
+
15
+ Back to [Model-Notes](README.md)
@@ -0,0 +1,7 @@
1
+ # Siklu Multihaul Terragraph Radio Line
2
+
3
+ The Siklu Multihaul TG radios use a different command set than the other Siklu radios.
4
+
5
+ To use this model, your source must designate the model as siklumhtg instead of siklu. It also requires that the MH-TG radio be running at least version 2.1.2.
6
+
7
+ Back to [Model-Notes](README.md)
@@ -0,0 +1,186 @@
1
+ # Model Unit Tests
2
+ Oxidized includes automated unit tests for its models, which require very little
3
+ effort to use. There are three different default unit tests for models:
4
+ - [Device Simulation](ModelUnitTests.md#device-simulation)
5
+ - [Device Prompt](ModelUnitTests.md#device-prompt)
6
+ - [Secrets](ModelUnitTests.md#secrets)
7
+
8
+ You only need to provide test files under [/spec/model/data](/spec/model/data),
9
+ and the tests will be run automatically with `rake test`. See
10
+ [CONTRIBUTING.md](/CONTRIBUTING.md) for explanations on how to set up a
11
+ development environment. In the following examples, we use
12
+ [Bundler](https://bundler.io/) and prefix all commands with `bundle exec`.
13
+
14
+ In addition, you can write [custom unit tests](ModelUnitTests.md#custom-tests)
15
+ for your model
16
+
17
+ ## Device Simulation
18
+ ### YAML Simulation File
19
+ You need a [YAML simulation file](/docs/DeviceSimulation.md) for your device.
20
+ See the link for instructions on how to produce it.
21
+
22
+ The YAML simulation files are stored under
23
+ [/spec/model/data/](/spec/model/data/), with the naming convention
24
+ `<model>:<description>:simulation.yaml`, where `<model>` is the lowercase name
25
+ of the Oxidized model and `<description>` is the name of the test case.
26
+ `<description>` is generally formatted as `<hardware>_<software>` or
27
+ `<hardware>_<software>_<information>`.
28
+
29
+ Using a correct name for the file is important to ensure it is included in
30
+ automatic model unit tests.
31
+
32
+ ### Expected Output
33
+ You need a second file that contains the expected output, which has the same
34
+ name as the YAML simulation file but ends with `:output.txt` instead of
35
+ `:simulation.yaml`.
36
+
37
+ You can automatically produce an output file based on the current model for all
38
+ YAML simulation files missing an `:output.txt`:
39
+ ```shell
40
+ bundle exec ruby spec/model/atoms_generate.rb
41
+ ```
42
+
43
+ In the following example,
44
+ `spec/model/data/aoscx:R8N85A-C6000-48G-CL4_PL.10.08.1010:output.txt` (the
45
+ second file in the list) was missing:
46
+
47
+ ```shell
48
+ oxidized$ bundle exec ruby spec/model/atoms_generate.rb
49
+ Run options: --seed 57811
50
+
51
+ # Running:
52
+
53
+ Generating output file for aoscx:R0X25A-6410_FL.10.10.1100:simulation... SKIP, output already exists
54
+ Generating output file for aoscx:R8N85A-C6000-48G-CL4_PL.10.08.1010:simulation... OK
55
+ Generating output file for arubainstant:IAP515_8.10.0.6_VWLC:simulation... SKIP, output already exists
56
+ Generating output file for asa:5512_9.12-4-67_single-context:simulation... SKIP, output already exists
57
+ Generating output file for garderos:R7709_003_006_068:simulation... SKIP, output already exists
58
+ Generating output file for ios:C8200L_16.12.1:simulation... FAIL, no simulation file
59
+ Generating output file for ios:C9200L-24P-4G_17.09.04a:simulation... SKIP, output already exists
60
+ Generating output file for ios:C9800-L-F-K9_17.06.05:simulation... SKIP, output already exists
61
+ Generating output file for ios:asr920_16.8.1b:simulation... SKIP, output already exists
62
+ Generating output file for junos:srx300_22.4:simulation... SKIP, output already exists
63
+ Generating output file for opnsense:nano_23.7:simulation... SKIP, output already exists
64
+ Generating output file for pfsense:CE_2.7.2:simulation... SKIP, output already exists
65
+ Generating output file for routeros:CHR_7.10.1:simulation... SKIP, output already exists
66
+ Generating output file for routeros:CHR_7.16:simulation... SKIP, output already exists
67
+ Generating output file for routeros:L009UiGS_7.15.2:simulation... SKIP, output already exists
68
+ .
69
+
70
+ Finished in 0.904792s, 1.1052 runs/s, 0.0000 assertions/s.
71
+
72
+ 1 runs, 0 assertions, 0 failures, 0 errors, 0 skips
73
+ Coverage report generated for RSpec to /home/xxx/oxidized/coverage/coverage.xml. 651 / 1122 LOC (58.02%) covered
74
+ Coverage report generated for RSpec to /home/xxx/oxidized/coverage.
75
+ Line Coverage: 58.02% (651 / 1122)
76
+ ```
77
+
78
+ ### Running the Tests
79
+ You can modify the `:output.txt` file to match your expectations and modify the
80
+ model accordingly. Run `bundle exec rake` to run the tests.
81
+
82
+ Here is an example when the output of the VTP command is missing in the expected
83
+ output:
84
+
85
+ ```
86
+ oxidized$ bundle exec rake test
87
+ /usr/bin/ruby3.1 -I"lib:spec" /home/xxx/oxidized/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb "spec/cli_spec.rb" "spec/config_spec.rb" "spec/hook/githubrepo_spec.rb" "spec/input/ssh_spec.rb" "spec/manager_spec.rb" "spec/model/apc_aos_spec.rb" "spec/model/model_atoms_spec.rb" "spec/model/model_helper_spec.rb" "spec/node_spec.rb" "spec/nodes_spec.rb" "spec/output/file_spec.rb" "spec/output/git_spec.rb" "spec/refinements_spec.rb" "spec/source/csv_spec.rb" "spec/source/http_spec.rb" "spec/source/jsonfile_spec.rb" "spec/source/sql_spec.rb"
88
+ Run options: --seed 31447
89
+
90
+ # Running:
91
+
92
+ ...............................................................SS..................F.............................SS..
93
+
94
+ Finished in 7.963602s, 14.6918 runs/s, 48.7217 assertions/s.
95
+
96
+ 1) Failure:
97
+ ATOMS tests#test_0006_ios:C9200L-24P-4G_17.09.04a:output has expected output [spec/model/model_atoms_spec.rb:12]:
98
+ --- expected
99
+ +++ actual
100
+ @@ -9,6 +9,21 @@
101
+ ! CPU: ARM64
102
+ ! Memory: nvram 2048K
103
+ !
104
+ +! VTP: VTP Version capable : 1 to 3
105
+ +! VTP: VTP version running : 1
106
+ +! VTP: VTP Domain Name : Oxidized
107
+ +! VTP: VTP Pruning Mode : Disabled (Operationally Disabled)
108
+ +! VTP: VTP Traps Generation : Disabled
109
+ +! VTP: Device ID : 40f0.7800.0000
110
+ +! VTP: Feature VLAN:
111
+ +! VTP: --------------
112
+ +! VTP: VTP Operating Mode : Transparent
113
+ +! VTP: Maximum VLANs supported locally : 1005
114
+ +! VTP: Number of existing VLANs : 10
115
+ +! VTP: Configuration Revision : 0
116
+ +! VTP: MD5 digest : 0x35 0x00 0x00 0x00 0x00 0x00 0x7F 0xB4
117
+ +! VTP: 0x07 0x00 0x00 0x00 0x00 0x00 0x09 0x6D
118
+ +!
119
+ ! NAME: \"c92xxL Stack\", DESCR: \"c92xxL Stack\"
120
+ ! PID: C9200L-24P-4G , VID: V01 , SN: JAE24FFFFFF
121
+ !
122
+
123
+
124
+ 117 runs, 388 assertions, 1 failures, 0 errors, 4 skips
125
+
126
+ You have skipped tests. Run with --verbose for details.
127
+ Coverage report generated for RSpec to /home/xxx/oxidized/coverage/coverage.xml. 2167 / 3131 LOC (69.21%) covered
128
+ Coverage report generated for RSpec to /home/xxx/oxidized/coverage.
129
+ Line Coverage: 69.21% (2167 / 3131)
130
+ rake aborted!
131
+ Command failed with status (1): [ruby -I"lib:spec" /home/xxx/oxidized/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/lib/rake/rake_test_loader.rb "spec/cli_spec.rb" "spec/config_spec.rb" "spec/hook/githubrepo_spec.rb" "spec/input/ssh_spec.rb" "spec/manager_spec.rb" "spec/model/apc_aos_spec.rb" "spec/model/model_atoms_spec.rb" "spec/model/model_helper_spec.rb" "spec/node_spec.rb" "spec/nodes_spec.rb" "spec/output/file_spec.rb" "spec/output/git_spec.rb" "spec/refinements_spec.rb" "spec/source/csv_spec.rb" "spec/source/http_spec.rb" "spec/source/jsonfile_spec.rb" "spec/source/sql_spec.rb" ]
132
+ /home/xxx/oxidized/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
133
+ Tasks: TOP => test
134
+ (See full trace by running task with --trace)
135
+ ```
136
+
137
+ If you want to be sure that your model has been tested, run
138
+ `bundle exec rake test TESTOPTS="--verbose"` and search for your models unter
139
+ `ATOMS tests`
140
+
141
+ ## Device Prompt
142
+ You can specify device prompts to test in a YAML file named
143
+ `spec/model/data/<model>:generic:prompt.yaml`.
144
+
145
+ The YAML file has three sections containing a list of prompts to test:
146
+ - pass: these prompts will pass the prompt regexp.
147
+ - pass_with_expect: these prompts will pass the prompt regexp after having been
148
+ cleaned by the expect commands.
149
+ - fail: these prompts will fail the prompt regexp.
150
+
151
+ Here is an example:
152
+ ```yaml
153
+ pass:
154
+ - "LAB-R1234_Garderos# "
155
+ pass_with_expect:
156
+ - "\e[4m\rLAB-R1234_Garderos#\e[m "
157
+ fail:
158
+ - "\e[4m\rLAB-R1234_Garderos#\e[m "
159
+ - "#LAB#"
160
+ ```
161
+
162
+ ## Secrets
163
+ You can test if the model effectively removes secrets from your YAML simulation
164
+ file with a YAML file named like the YAML simulation, but with the suffix
165
+ `:secret.yaml`.
166
+
167
+ The YAML file has two sections containing a list of strings to test:
168
+ - fail: the test will fail if the output contains these strings.
169
+ - pass: the test will pass only if the output contains these strings.
170
+
171
+ ```yaml
172
+ fail:
173
+ - 'AAAAAAAAAABBBBBBBBBBCCCCCCCCCC'
174
+ pass:
175
+ - 'snmp-server host 10.10.42.12 version 2c <secret removed> inform'
176
+ - 'hash-mgmt-user oxidized password hash <secret removed>'
177
+ - 'hash-mgmt-user rocks password hash <secret removed> usertype read-only'
178
+ ```
179
+
180
+ ## Custom tests
181
+ When you write custom tests for your models, please do not use the filenames
182
+ mentioned above, as it will interfere with the standard tests. If you need to
183
+ store a custom simulation file, use `model:description:custom_simulation.yaml`.
184
+
185
+ The [cumulus test](/spec/model/cumulus_spec.rb) is an example of a custom
186
+ test.
data/docs/Outputs.md CHANGED
@@ -63,6 +63,8 @@ output:
63
63
 
64
64
  ```
65
65
 
66
+ Over time, your Git repository will expand, potentially leading to performance issues. For instructions on how to address this, see [git performance issues with large device counts](Troubleshooting.md#git-performance-issues-with-large-device-counts).
67
+
66
68
  ## Output: Git-Crypt
67
69
 
68
70
  This uses the gem git and system git-crypt interfaces. Have a look at [GIT-Crypt](https://www.agwa.name/projects/git-crypt/) documentation to know how to install it.
data/docs/Release.md CHANGED
@@ -5,45 +5,48 @@ This document is targeted at oxidized maintainers. It describes the release proc
5
5
  Run `git diff 0.30.0..master` (where `0.30.0` is to be changed to the last release) and review
6
6
  all the changes that have been done. Have a specific look at changes you don't understand.
7
7
 
8
+ For a graphical compare, use `git difftool -d 0.30.0..master`.
9
+
8
10
  ## Test, test test!
9
11
  Test the git code and the container against as much device types an environments as you can.
10
12
 
11
13
  Do not integrate late PRs into master if they do not fix issues for the release. The must wait for the next release.
12
14
 
13
15
  ## Version numbering
14
- Oxidized versions are nummered like 0.major.minor
15
- - major is incremented when releasing new features. minor is then set to 0
16
- - minor is incremented when releasing fixes only, just after a major version.
16
+ Oxidized versions are nummered like major.minor.patch
17
+ - currently, the major version is 0.
18
+ - minor is incremented when releasing new features.
19
+ - patch is incremented when releasing fixes only.
17
20
 
18
- ## Release
21
+ ## Prepare the release in your working repository
19
22
  1. Checkout the master branch of oxidized. Make sure you are up to date with origin.
20
23
  2. Change the version in lib/oxidized/version.rb
21
24
  3. Change CHANGELOG.md to replace [Unreleased] with [0.xx.yy – 202Y-MM-DD]
22
25
  4. Run `git diff` to check your changes
23
26
  5. Commit the changes to the local git repository with a commit message “chore(release): release version 0.xx.yy”
24
27
  6. Tag the commit with `git tag -a 0.xx.yy -m "Release 0.xx.yy"`
25
- 7. Push the change and the tag to github:
28
+ 7. Build the gem with ‘rake build’
29
+ 8. Run `git diff` to check if there have been more changes (there shouldn't)
30
+ 9. Install an test the gem locally
31
+ ```
32
+ gem install --user-install pkg/oxidized-0.30.0.gem
33
+ ~/.local/share/gem/ruby/3.1.0/bin/oxidized
34
+ ```
35
+
36
+ ## Release in github
37
+ Push the change and the tag to github:
26
38
  ```
27
39
  git push
28
40
  git push origin 0.xx.yy
29
41
  ```
30
42
 
31
- ## Release in github
32
43
  Make a release from the tag in github
33
44
  - Thank the contributors
34
45
  - Only describe major changes, and refer to CHANGELOG.md
35
46
  - List new contributors (generated automatically)
36
47
 
37
48
  ## Release in rubygems
38
- 1. Build the gem with ‘rake build
39
- 2. Install an test the gem locally
40
- ```
41
- gem install --user-install pkg/oxidized-0.30.0.gem
42
- ~/.local/share/gem/ruby/3.1.0/bin/oxidized
43
- ```
44
- 3. Push the gem with ‘rake push’
45
-
46
- You need an account at rubygems which is allowed to push oxidized
49
+ Push the gem with ‘rake push
47
50
 
48
51
  ## Release in docker.io
49
52
  The OCI-Containter is automatically build and pushed to docker.io by github
data/docs/Sources.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Sources
2
2
 
3
+ Note: in all sources, the map attribute `name` is mandatory. It is used to identify the node and
4
+ for example choose the filename for the configuration output.
5
+
3
6
  ## Source: CSV
4
7
 
5
8
  One line per device, colon separated. If `ip` isn't present, a DNS lookup will be done against `name`. For large installations, setting `ip` will dramatically reduce startup time.
@@ -55,6 +58,24 @@ and within: `~/.gnupg/gpg.conf`
55
58
  pinentry-mode loopback
56
59
  ```
57
60
 
61
+ ## Source: JSONFile
62
+
63
+ One object per device. Supports GPG encryption like the CSV Source.
64
+
65
+ ```yaml
66
+ source:
67
+ default: jsonfile
68
+ jsonfile:
69
+ file: /var/lib/oxidized/router.json
70
+ map:
71
+ name: hostname
72
+ model: os
73
+ username: username
74
+ password: password
75
+ vars_map:
76
+ enable: enable
77
+ ```
78
+
58
79
  ## Source: SQL
59
80
 
60
81
  Oxidized uses the `sequel` ruby gem. You can use a variety of databases that aren't explicitly listed. For more information visit https://github.com/jeremyevans/sequel Make sure you have the correct adapter!
@@ -8,8 +8,8 @@
8
8
  |AddPack |AddPack |[addpack](/lib/oxidized/model/addpack.rb)
9
9
  |Adtran |Total Access (AOS) |[adtran](/lib/oxidized/model/adtran.rb)
10
10
  | |ADVA |[adva](/lib/oxidized/model/adva.rb) | |[ADVA](Model-Notes/ADVA.md)
11
- |Alcatel-Lucent |AOS |[aos](/lib/oxidized/model/aos.rb)
12
- | |AOS7 |[aos7](/lib/oxidized/model/aos7.rb)
11
+ |Alcatel-Lucent |AOS |[aos](/lib/oxidized/model/aos.rb) | |AOS6 - vxworks-based
12
+ | |AOS7 |[aos7](/lib/oxidized/model/aos7.rb) | |AOS7 and AOS8 - linux-based
13
13
  | |ISAM |[isam](/lib/oxidized/model/isam.rb)
14
14
  | |SR OS (Formerly TiMOS) |[sros](/lib/oxidized/model/sros.rb)
15
15
  | |Wireless |[aosw](/lib/oxidized/model/aosw.rb) | |Same model as Aruba Wireless
@@ -20,8 +20,9 @@
20
20
  |Arbor Networks |ArbOS |[arbos](/lib/oxidized/model/arbos.rb) | |[ArbOS](Model-Notes/ArbOS.md)
21
21
  |Arista |EOS |[eos](/lib/oxidized/model/eos.rb) | |[EOS](Model-Notes/EOS.md)
22
22
  |Arris |C4CMTS |[c4cmts](/lib/oxidized/model/c4cmts.rb)
23
- |Aruba |AOS-CX |[aoscx](/lib/oxidized/model/aoscx.rb) |@robertcheramy
24
- | |AOSW |[Aaosw](/lib/oxidized/model/aosw.rb)
23
+ |Aruba |AOS-CX |[aoscx](/lib/oxidized/model/aoscx.rb) |@robertcheramy |[HPE Aruba](Model-Notes/HPEAruba.md)
24
+ | |AOSW |[aosw](/lib/oxidized/model/aosw.rb) |[HPE Aruba](Model-Notes/HPEAruba.md)
25
+ | |ArubaInstant |[arubainstant](/lib/oxidized/model/arubainstant.rb)|@robertcheramy |[HPE Aruba](Model-Notes/HPEAruba.md)
25
26
  |Asterfusion |AsterNOS |[asternos](/lib/oxidized/model/asternos.rb)
26
27
  |AudioCodes |AudioCodes |[audiocodes](/lib/oxidized/model/audiocodes.rb)
27
28
  | |MediaPack MP-1xx, Mediant1000 |[audiocodesmp](/lib/oxidized/model/audiocodesmp.rb)
@@ -70,6 +71,7 @@
70
71
  |DELL |PowerConnect |[powerconnect](/lib/oxidized/model/powerconnect.rb)
71
72
  | |AOSW |[aosw](/lib/oxidized/model/aosw.rb) | |Same model as Aruba Wireless
72
73
  | |DellX |[dellx](/lib/oxidized/model/dellx.rb)
74
+ | |Dell EMC Networking OS6 |[os6](/lib/oxidized/model/os6.rb) | |[Dell EMC Networking OS6](Model-Notes/OS6.md)
73
75
  | |Dell EMC Networking OS10 |[os10](/lib/oxidized/model/os10.rb) | |[Dell EMC Networking OS10](Model-Notes/OS10.md)
74
76
  |D-Link |D-Link |[dlink](/lib/oxidized/model/dlink.rb)
75
77
  | |D-Link cisco like CLI |[dlinknextgen](/lib/oxidized/model/dlinknextgen.rb)
@@ -82,7 +84,8 @@
82
84
  | |Enterasys 800-Series |[enterasys800](/lib/oxidized/model/enterasys800.rb)
83
85
  | |WM |[mtrlrfs](/lib/oxidized/model/mtrlrfs.rb)
84
86
  | |XOS, ExtremeWare |[xos](/lib/oxidized/model/xos.rb)
85
- |F5 |TMOS |[tmos](/lib/oxidized/model/tmos.rb)
87
+ |F5 |F5OS |[tmos](/lib/oxidized/model/f5os.rb)
88
+ | |TMOS |[tmos](/lib/oxidized/model/tmos.rb)
86
89
  |Fiberstore (fs.com) |S3400 |[fsos](/lib/oxidized/model/fsos.rb) | |[FSOS](Model-Notes/FSOS.md)
87
90
  | |S3800 |[gcombnps](/lib/oxidized/model/gcombnps.rb)
88
91
  | |S3900 |[edgecos](/lib/oxidized/model/edgecos.rb)
@@ -119,7 +122,7 @@
119
122
  |Linuxgeneric |CentOS |[linuxgeneric](/lib/oxidized/model/linuxgeneric.rb)| |[LinuxGeneric](Model-Notes/LinuxGeneric.md)
120
123
  |Mellanox |MLNX-OS |[mlnxos](/lib/oxidized/model/mlnxos.rb)
121
124
  | |Voltaire |[voltaire](/lib/oxidized/model/voltaire.rb)
122
- |Mikrotik |RouterOS |[routeros](/lib/oxidized/model/routeros.rb)
125
+ |Mikrotik |RouterOS |[routeros](/lib/oxidized/model/routeros.rb) | |[RouterOS](Model-Notes/RouterOS.md)
123
126
  | |SwOS and SwOS Lite |[swos](/lib/oxidized/model/swos.rb)
124
127
  |Mimosa |Mimosa (B11) |[mimosab11](/lib/oxidized/model/mimosab11.rb)
125
128
  |Motorola |RFS |[mtrlrfs](/lib/oxidized/model/mtrlrfs.rb)
@@ -145,7 +148,8 @@
145
148
  |Ruijie Networks |RGOS |[rgos](/lib/oxidized/model/rgos.rb)
146
149
  |QTECH |QSW-2800, QSW-3400, QSW-3450, QSW-3500|[qtech](/lib/oxidized/model/qtech.rb)
147
150
  |Quanta |Quanta / VxWorks 6.6 (1.1.0.8)|[quantaos](/lib/oxidized/model/quantaos.rb)
148
- |Siklu |EtherHaul |[siklu](/lib/oxidized/model/siklu.rb)
151
+ |Siklu |EtherHaul |[siklu](/lib/oxidized/model/siklu.rb) |@bdg-robert
152
+ | |Multihaul TG |[siklumhtg](/lib/oxidized/model/siklumhtg.rb) |@bdg-robert |[Siklu Multihaul TG](Model-Notes/SikluMHTG.md)
149
153
  |Seiko Solutions |SmartCS, SmartCS mini |[smartcs](/lib/oxidized/model/smartcs.rb)
150
154
  |SonicWALL |SonicOS |[sonicos](/lib/oxidized/model/sonicos.rb)
151
155
  |SNR |SNR-S300G, S2xxx, S3xxx, S4xxx|[dcnos](/lib/oxidized/model/dcnos.rb)
@@ -165,10 +169,13 @@
165
169
  | |Edgeos |[edgeos](/lib/oxidized/model/edgeos.rb)
166
170
  | |EdgeSwitch |[edgeswitch](/lib/oxidized/model/edgeswitch.rb)
167
171
  | |AirFiber |[airfiber](/lib/oxidized/model/airfiber.rb)
172
+ |Uplink |EP4440-DP |[EP4440](/lib/oxidized/model/uplinkolt.rb) | |Might support all EP4440 series
168
173
  |VMWare |NSX Edge (configuration) |[nsxconfig](/lib/oxidized/model/nsxconfig.rb)
169
174
  | |NSX Edge (firewall rules) |[nsxfirewall](/lib/oxidized/model/nsxfirewall.rb)
175
+ | |NSX Distributed Firewall |[nsxdfw](/lib/oxidized/model/nsxdfw.rb)
170
176
  |Watchguard |Fireware OS |[firewareos](/lib/oxidized/model/firewareos.rb)
171
177
  |Westell |Westell 8178G, Westell 8266G |[weos](/lib/oxidized/model/weos.rb)
178
+ |Yadro |KornfeldOS |[kornfeldos](/lib/oxidized/model/kornfeldos.rb)
172
179
  |YAMAHA |YAMAHA NVR/RTX Series |[yamaha](/lib/oxidized/model/yamaha.rb)
173
180
  |Zhone |Zhone (OLT and MX) |[zhoneolt](/lib/oxidized/model/zhoneolt.rb)
174
181
  |ZPE |Nodegrid OS |[nodegrid](/lib/oxidized/model/nodegrid.rb)
@@ -1,4 +1,9 @@
1
1
  # Troubleshooting
2
+ ## Table of contents
3
+ 1. [Connects but no/partial configuration collected](#oxidized-connects-to-a-supported-device-but-no-or-partial-configuration-is-collected)
4
+ 2. [No push to remote git repository](#oxidized-does-not-push-to-a-remote-git-repository-hook-githubrepo)
5
+ 3. [Git performance issues with large device counts](#git-performance-issues-with-large-device-counts)
6
+ 4. [Oxidized ignores the changes I made to its git repository](#oxidized-ignores-the-changes-i-made-to-its-git-repository)
2
7
 
3
8
  ## Oxidized connects to a supported device but no (or partial) configuration is collected
4
9
 
@@ -80,3 +85,33 @@ If you are running oxidized in a container, you need to map /home/oxidized/.ssh
80
85
  container to a local repository and save the known_hosts in the local repository. You can
81
86
  find an example how to do this under [examples/podman-compose](/examples/podman-compose/)
82
87
 
88
+ ## Git performance issues with large device counts
89
+ When you use git to store your configurations, the size of your repository will
90
+ grow over time. This growth can lead to performance issues. To resolve these issues, you should perform a Git garbage collection on your repository.
91
+
92
+ Follow these steps to do so:
93
+
94
+ 1. Stop oxidized (no one should access the git repository while running garbage collection)
95
+ 2. Make a backup of your oxidized data, especially the Git repository
96
+ 3. Change directory your oxidized git repository (as configured in oxidized configuration file)
97
+ 4. Execute the command `git gc` to run the garbage collection
98
+ 5. Restart oxidized - you're done!
99
+
100
+ ## Oxidized ignores the changes I made to its git repository
101
+ First of all: you shouldn't manipulate the git repository of oxidized. Don't
102
+ create it, don't modify it, leave it alone. You can break things. You have
103
+ been warned.
104
+
105
+ In some situations, you may need to make changes to the git repository of
106
+ oxidized. Stop oxidized, make backups, and be sure you know exactly what you
107
+ are doing. You have been warned.
108
+
109
+ If you simply clone the git repository, make changes and push them, oxidized
110
+ will ignore these modifications. This is because oxidized caches the HEAD tree
111
+ in the index and `git push` does not update the index because the repository is
112
+ a bare repo and not a working directory repository.
113
+
114
+ So, you have to update the index manually. For this, go into oxidized repo, and
115
+ run `git ls-tree -r HEAD | git update-index --index-info`. While you're at it,
116
+ consider running `git gc`, as oxidized cannot garbage collect the repo (this
117
+ is not supported in [Rugged](https://github.com/libgit2/rugged)).