oxidized 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +30 -4
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +10 -3
  4. data/.github/ISSUE_TEMPLATE/support-request.md +30 -4
  5. data/.github/PULL_REQUEST_TEMPLATE.md +3 -1
  6. data/.github/workflows/codeql.yml +4 -4
  7. data/.github/workflows/publishdocker.yml +2 -2
  8. data/.github/workflows/ruby.yml +10 -3
  9. data/.github/workflows/stale.yml +1 -1
  10. data/.rubocop_todo.yml +2 -8
  11. data/AGENTS.md +174 -0
  12. data/CHANGELOG.md +101 -0
  13. data/CONTRIBUTING.md +78 -44
  14. data/Dockerfile +8 -4
  15. data/README.md +8 -1
  16. data/docs/Creating-Models.md +5 -5
  17. data/docs/DeviceSimulation.md +80 -51
  18. data/docs/Docker.md +49 -0
  19. data/docs/Inputs.md +81 -5
  20. data/docs/Issues.md +49 -13
  21. data/docs/Model-Notes/FTD.md +64 -0
  22. data/docs/Model-Notes/HPEAruba.md +5 -0
  23. data/docs/Model-Notes/ITMGOS.md +40 -0
  24. data/docs/Model-Notes/PanOS_API.md +20 -1
  25. data/docs/Model-Notes/TPLink.md +75 -0
  26. data/docs/Outputs.md +1 -0
  27. data/docs/Release.md +43 -21
  28. data/docs/Ruby-API.md +231 -9
  29. data/docs/Supported-OS-Types.md +10 -5
  30. data/docs/Troubleshooting.md +8 -9
  31. data/extra/device2yaml.rb +21 -5
  32. data/extra/hooks/modelrulesadvanced.rb +2 -3
  33. data/extra/oxidized.service +0 -1
  34. data/extra/syslog.rb +1 -1
  35. data/lib/oxidized/cli/support.rb +4 -7
  36. data/lib/oxidized/config/vars.rb +2 -1
  37. data/lib/oxidized/core.rb +20 -0
  38. data/lib/oxidized/hook/ciscosparkdiff.rb +1 -1
  39. data/lib/oxidized/hook/slackdiff.rb +1 -1
  40. data/lib/oxidized/hook/xmppdiff.rb +2 -2
  41. data/lib/oxidized/input/cli.rb +14 -2
  42. data/lib/oxidized/input/http.rb +22 -7
  43. data/lib/oxidized/input/scp.rb +3 -1
  44. data/lib/oxidized/input/sshbase.rb +43 -12
  45. data/lib/oxidized/input/telnet.rb +2 -2
  46. data/lib/oxidized/model/acos.rb +2 -2
  47. data/lib/oxidized/model/acsw.rb +1 -1
  48. data/lib/oxidized/model/adtran.rb +1 -1
  49. data/lib/oxidized/model/aireos.rb +3 -3
  50. data/lib/oxidized/model/aoscx.rb +7 -3
  51. data/lib/oxidized/model/aosw.rb +8 -13
  52. data/lib/oxidized/model/arbos.rb +1 -1
  53. data/lib/oxidized/model/aricentiss.rb +1 -1
  54. data/lib/oxidized/model/asa.rb +1 -1
  55. data/lib/oxidized/model/asternos.rb +1 -1
  56. data/lib/oxidized/model/audiocodesmp.rb +1 -1
  57. data/lib/oxidized/model/awplus.rb +4 -3
  58. data/lib/oxidized/model/bdcom.rb +1 -1
  59. data/lib/oxidized/model/br6910.rb +1 -1
  60. data/lib/oxidized/model/c4cmts.rb +1 -1
  61. data/lib/oxidized/model/ciscosmb.rb +0 -1
  62. data/lib/oxidized/model/cnos.rb +10 -1
  63. data/lib/oxidized/model/comnetms.rb +1 -1
  64. data/lib/oxidized/model/coriantgroove.rb +1 -1
  65. data/lib/oxidized/model/dellx.rb +1 -1
  66. data/lib/oxidized/model/dlink.rb +1 -1
  67. data/lib/oxidized/model/dlinknextgen.rb +1 -1
  68. data/lib/oxidized/model/dnos.rb +2 -2
  69. data/lib/oxidized/model/eatonnetwork.rb +33 -32
  70. data/lib/oxidized/model/eciapollo.rb +1 -1
  71. data/lib/oxidized/model/edgeos.rb +3 -3
  72. data/lib/oxidized/model/enterasys.rb +1 -1
  73. data/lib/oxidized/model/eos.rb +1 -0
  74. data/lib/oxidized/model/fastiron.rb +10 -1
  75. data/lib/oxidized/model/fiberdriver.rb +1 -1
  76. data/lib/oxidized/model/firelinuxos.rb +1 -1
  77. data/lib/oxidized/model/fortigate.rb +15 -2
  78. data/lib/oxidized/model/fortios.rb +1 -1
  79. data/lib/oxidized/model/ftd.rb +183 -0
  80. data/lib/oxidized/model/ftos.rb +2 -2
  81. data/lib/oxidized/model/garderos.rb +16 -5
  82. data/lib/oxidized/model/hpebladesystem.rb +1 -1
  83. data/lib/oxidized/model/ibos.rb +1 -2
  84. data/lib/oxidized/model/ingate.rb +15 -1
  85. data/lib/oxidized/model/iosxr.rb +9 -3
  86. data/lib/oxidized/model/ironware.rb +1 -1
  87. data/lib/oxidized/model/itmgos.rb +74 -0
  88. data/lib/oxidized/model/junos.rb +8 -2
  89. data/lib/oxidized/model/kornfeldos.rb +2 -4
  90. data/lib/oxidized/model/lancom.rb +2 -2
  91. data/lib/oxidized/model/masteros.rb +1 -1
  92. data/lib/oxidized/model/mlnxos.rb +1 -1
  93. data/lib/oxidized/model/model.rb +5 -2
  94. data/lib/oxidized/model/mtrlrfs.rb +1 -1
  95. data/lib/oxidized/model/ndms.rb +1 -1
  96. data/lib/oxidized/model/necix.rb +1 -1
  97. data/lib/oxidized/model/netgear.rb +1 -1
  98. data/lib/oxidized/model/netscaler.rb +1 -1
  99. data/lib/oxidized/model/nxos.rb +11 -2
  100. data/lib/oxidized/model/ocnos.rb +1 -1
  101. data/lib/oxidized/model/onefinity.rb +1 -1
  102. data/lib/oxidized/model/oneos.rb +0 -1
  103. data/lib/oxidized/model/openbsd.rb +1 -1
  104. data/lib/oxidized/model/os10.rb +2 -2
  105. data/lib/oxidized/model/os6.rb +3 -2
  106. data/lib/oxidized/model/panos.rb +1 -1
  107. data/lib/oxidized/model/panos_api.rb +42 -14
  108. data/lib/oxidized/model/procurve.rb +63 -31
  109. data/lib/oxidized/model/routeros.rb +2 -1
  110. data/lib/oxidized/model/screenos.rb +2 -2
  111. data/lib/oxidized/model/sgos.rb +1 -1
  112. data/lib/oxidized/model/siklu.rb +2 -2
  113. data/lib/oxidized/model/slxos.rb +1 -1
  114. data/lib/oxidized/model/sonicos.rb +2 -2
  115. data/lib/oxidized/model/tdre.rb +2 -2
  116. data/lib/oxidized/model/telco.rb +1 -1
  117. data/lib/oxidized/model/tmos.rb +11 -2
  118. data/lib/oxidized/model/tplink.rb +4 -4
  119. data/lib/oxidized/model/viptela.rb +1 -1
  120. data/lib/oxidized/model/voltaire.rb +1 -1
  121. data/lib/oxidized/model/vrp.rb +14 -8
  122. data/lib/oxidized/model/vsololt.rb +93 -0
  123. data/lib/oxidized/model/vyatta.rb +3 -3
  124. data/lib/oxidized/model/vyos.rb +5 -1
  125. data/lib/oxidized/model/xos.rb +1 -1
  126. data/lib/oxidized/model/zhoneolt.rb +1 -1
  127. data/lib/oxidized/node.rb +9 -9
  128. data/lib/oxidized/nodes.rb +5 -13
  129. data/lib/oxidized/output/git.rb +72 -81
  130. data/lib/oxidized/output/gitcrypt.rb +13 -32
  131. data/lib/oxidized/redact.rb +18 -0
  132. data/lib/oxidized/signals.rb +2 -16
  133. data/lib/oxidized/source/source.rb +5 -1
  134. data/lib/oxidized/source/sql.rb +1 -0
  135. data/lib/oxidized/version.rb +2 -2
  136. data/lib/oxidized.rb +1 -0
  137. data/lib/refinements.rb +7 -3
  138. data/oxidized.gemspec +20 -11
  139. metadata +69 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59eeea5dc9024b545f633379b4ab663cf5ea26fe478a4dafffe0e0b80909d2b7
4
- data.tar.gz: 26363d11d322e4f797db86050dce16532b8cf2e0e5419de0b92b0dae0b8076df
3
+ metadata.gz: e07433459a7c3d0046e5f7b34649bd73c1514327bf6e2be0d23ecea877c26dbf
4
+ data.tar.gz: f5064b5e424c2f83c2487a69802006ffc2c7796c8ca9dc5ac5fcbec0f655c644
5
5
  SHA512:
6
- metadata.gz: 3b47b07aaa4528bfa49559ae27785f64da5de07e00305878b840cad7f00068e83c84951350494b37765e0a2499a59881d15979360a8c911702f81531613dd674
7
- data.tar.gz: e103734e361736470524ea88f650fa0007a498273c2b54597a0d6fe3d0e768013f2a13f9edea755b72955ce57684614b7a824a745b81c41f0f2fe539b3d13b4d
6
+ metadata.gz: 197d509ce42d8904208225576000e6d5c833714c55965441d6fe5a11a5b9a4f9f7475b14c5d075813282e5e493ffcbea3aefaa095d9719ebd7f2e1ac3973aca3
7
+ data.tar.gz: 00132c109f7d6dede6a0e04b0207988c19f109db89ca080b76c82fa3e3cf79d5ce178caf1a05956f20adf777882ce0778bdf42c0c3e4907a930c04046fefff66
@@ -6,8 +6,15 @@ labels: bug
6
6
  assignees: ''
7
7
 
8
8
  ---
9
- <!-- Check the box [X] -->
10
- - [ ] I have read and understood [docs/Issues.md](https://github.com/ytti/oxidized/blob/master/docs/Issues.md).
9
+ <!--
10
+ Thanks for helping improve Oxidized!
11
+
12
+ Please read docs/Issues.md on how to write a good issue:
13
+ https://github.com/ytti/oxidized/blob/master/docs/Issues.md
14
+ -->
15
+
16
+ > By submitting content here (especially YAML simulation files), I agree that it
17
+ > may be integrated into the project under its license (Apache-2.0).
11
18
 
12
19
  **Describe the bug**
13
20
  A clear and concise description of what the bug is.
@@ -34,12 +41,31 @@ If applicable, add logs to help explain your problem.
34
41
 
35
42
  **Running environment (please complete the following information):**
36
43
  <!-- complete the following information and add further details if needed.
37
- Always test the latest version of oxidized -->
44
+ Always test the latest version of oxidized.
45
+ Tip: run `oxidized --support` as the same user and in the same environment as
46
+ the regular Oxidized process. With Docker, use
47
+ `docker exec --user oxidized <container-name> oxidized --support`. Remove any
48
+ sensitive data before sharing the output. -->
38
49
  - OS: [e.g. Debian Bookworm, official container version xxx, ...]
39
50
  - oxidized version: [e.g. 0.32.2]
40
51
  - oxidized-web version: [e.g. 0.15.1, if applicable]
41
- - Manufacturer model an software version:
52
+ - Manufacturer model and software version:
42
53
  - oxidized model name:
43
54
 
55
+ **Device simulation (for model-specific issues)**
56
+ <!--
57
+ If your issue is about a specific device/model, a YAML simulation file helps us
58
+ a lot. When the issue can be reproduced with the current Oxidized model
59
+ unchanged, the easiest way is to enable the yaml debug option in your input
60
+ section:
61
+
62
+ input:
63
+ debug: yaml
64
+
65
+ Reproduce the backup, then attach the generated file from
66
+ ~/.config/oxidized/logs/. See docs/DeviceSimulation.md for details, and remember
67
+ to remove sensitive data (passwords, IP addresses, serial numbers).
68
+ -->
69
+
44
70
  **Additional context**
45
71
  Add any other context about the problem here.
@@ -2,12 +2,19 @@
2
2
  name: Feature request
3
3
  about: Suggest an idea for this project
4
4
  title: ''
5
- labels: feature request
5
+ labels: feature_request
6
6
  assignees: ''
7
7
 
8
8
  ---
9
- <!-- Check the box [X] -->
10
- - [ ] I have read and understood [docs/Issues.md](https://github.com/ytti/oxidized/blob/master/docs/Issues.md).
9
+ <!--
10
+ Thanks for suggesting an improvement to Oxidized!
11
+
12
+ Please read docs/Issues.md on how to write a good issue:
13
+ https://github.com/ytti/oxidized/blob/master/docs/Issues.md
14
+ -->
15
+
16
+ > By submitting content here, I agree that it may be integrated into the project
17
+ > under its license (Apache-2.0).
11
18
 
12
19
  **Is your feature request related to a problem? Please describe.**
13
20
  A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
@@ -6,8 +6,15 @@ labels: question
6
6
  assignees: ''
7
7
 
8
8
  ---
9
- <!-- Check the box [X] -->
10
- - [ ] I have read and understood [docs/Issues.md](https://github.com/ytti/oxidized/blob/master/docs/Issues.md).
9
+ <!--
10
+ Thanks for reaching out!
11
+
12
+ Please read docs/Issues.md on how to write a good issue:
13
+ https://github.com/ytti/oxidized/blob/master/docs/Issues.md
14
+ -->
15
+
16
+ > By submitting content here (especially YAML simulation files), I agree that it
17
+ > may be integrated into the project under its license (Apache-2.0).
11
18
 
12
19
  **Describe the problem**
13
20
  A clear and concise description of what your problem is.
@@ -27,13 +34,32 @@ If applicable, add logs to help explain your problem.
27
34
 
28
35
  **Running environment (please complete the following information):**
29
36
  <!-- complete the following information and add further details if needed.
30
- Always test the latest version of oxidized -->
37
+ Always test the latest version of oxidized.
38
+ Tip: run `oxidized --support` as the same user and in the same environment as
39
+ the regular Oxidized process. With Docker, use
40
+ `docker exec --user oxidized <container-name> oxidized --support`. Remove any
41
+ sensitive data before sharing the output. -->
31
42
  - OS: [e.g. Debian Bookworm, official container version xxx, ...]
32
43
  - oxidized version: [e.g. 0.32.2]
33
44
  - oxidized-web version: [e.g. 0.15.1, if applicable]
34
- - Manufacturer model an software version:
45
+ - Manufacturer model and software version:
35
46
  - oxidized model name:
36
47
 
48
+ **Device simulation (for model-specific issues)**
49
+ <!--
50
+ If your issue is about a specific device/model, a YAML simulation file helps us
51
+ a lot. When the issue can be reproduced with the current Oxidized model
52
+ unchanged, the easiest way is to enable the yaml debug option in your input
53
+ section:
54
+
55
+ input:
56
+ debug: yaml
57
+
58
+ Reproduce the backup, then attach the generated file from
59
+ ~/.config/oxidized/logs/. See docs/DeviceSimulation.md for details, and remember
60
+ to remove sensitive data (passwords, IP addresses, serial numbers).
61
+ -->
62
+
37
63
  **Additional context**
38
64
  Add any other context about the problem here.
39
65
 
@@ -1,10 +1,12 @@
1
1
  ## Pre-Request Checklist
2
2
  <!-- Not all items apply to each PR, but a great PR addresses all applicable items. -->
3
+ <!-- After submitting the pull request, ensure that all GitHub CI checks pass. -->
3
4
 
4
5
  - [ ] Passes rubocop code analysis (try `rubocop --auto-correct`)
5
6
  - [ ] Tests added or adapted (try `rake test`)
7
+ - [ ] Model changes include a YAML simulation file and the expected output (see `docs/DeviceSimulation.md` and `docs/ModelUnitTests.md`)
6
8
  - [ ] Changes are reflected in the documentation
7
- - [ ] User-visible changes appended to [CHANGELOG.md](/CHANGELOG.md)
9
+ - [ ] User-visible changes appended to `CHANGELOG.md`
8
10
 
9
11
  ## Description
10
12
  <!-- Describe your changes here. -->
@@ -40,11 +40,11 @@ jobs:
40
40
 
41
41
  steps:
42
42
  - name: Checkout repository
43
- uses: actions/checkout@v6
43
+ uses: actions/checkout@v7
44
44
 
45
45
  # Initializes the CodeQL tools for scanning.
46
46
  - name: Initialize CodeQL
47
- uses: github/codeql-action/init@v4
47
+ uses: github/codeql-action/init@v4.39.3
48
48
  with:
49
49
  languages: ${{ matrix.language }}
50
50
  # If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
58
58
  # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59
59
  # If this step fails, then you should remove it and run the build manually (see below)
60
60
  - name: Autobuild
61
- uses: github/codeql-action/autobuild@v4
61
+ uses: github/codeql-action/autobuild@v4.39.3
62
62
 
63
63
  # ℹ️ Command-line programs to run using the OS shell.
64
64
  # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,6 +71,6 @@ jobs:
71
71
  # ./location_of_script_within_repo/buildscript.sh
72
72
 
73
73
  - name: Perform CodeQL Analysis
74
- uses: github/codeql-action/analyze@v4
74
+ uses: github/codeql-action/analyze@v4.39.3
75
75
  with:
76
76
  category: "/language:${{matrix.language}}"
@@ -38,7 +38,7 @@ jobs:
38
38
  latest=true
39
39
 
40
40
  - name: Login to Docker Hub
41
- uses: docker/login-action@v4
41
+ uses: docker/login-action@v4.8.0
42
42
  with:
43
43
  username: ${{ secrets.DOCKER_USERNAME }}
44
44
  password: ${{ secrets.DOCKER_PASSWORD }}
@@ -86,7 +86,7 @@ jobs:
86
86
  merge-multiple: true
87
87
 
88
88
  - name: Login to Docker Hub
89
- uses: docker/login-action@v4
89
+ uses: docker/login-action@v4.8.0
90
90
  with:
91
91
  username: ${{ secrets.DOCKER_USERNAME }}
92
92
  password: ${{ secrets.DOCKER_PASSWORD }}
@@ -16,14 +16,21 @@ on: [ push, pull_request ]
16
16
  jobs:
17
17
  test:
18
18
 
19
- runs-on: ubuntu-latest
19
+ runs-on: ${{ matrix.os }}
20
20
  strategy:
21
21
  matrix:
22
- ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', 'ruby-head']
22
+ ruby-version: ['3.2', '3.3', '3.4', '4.0', 'ruby-head']
23
+ os: [ubuntu-latest]
24
+ # ubuntu-26.04 (ubuntu-latest) only provides Ruby >= 3.2
25
+ include:
26
+ - ruby-version: '3.0'
27
+ os: ubuntu-24.04
28
+ - ruby-version: '3.1'
29
+ os: ubuntu-24.04
23
30
  continue-on-error: ${{ matrix.ruby-version == 'ruby-head' }}
24
31
 
25
32
  steps:
26
- - uses: actions/checkout@v6
33
+ - uses: actions/checkout@v7
27
34
  - name: Set up Ruby
28
35
  uses: ruby/setup-ruby@v1
29
36
  with:
@@ -12,7 +12,7 @@ jobs:
12
12
  stale:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: actions/stale@v10
15
+ - uses: actions/stale@v11
16
16
  with:
17
17
  stale-issue-message: 'This issue is stale because it has been open 90 days with no activity.'
18
18
  stale-pr-message: 'This PR is stale because it has been open 90 days with no activity.'
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-03-31 11:49:52 UTC using RuboCop version 1.86.0.
3
+ # on 2026-11-13 05:32:26 UTC using RuboCop version 1.92.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -31,14 +31,8 @@ Style/FileOpen:
31
31
  Exclude:
32
32
  - 'extra/syslog.rb'
33
33
 
34
- # Offense count: 2
34
+ # Offense count: 1
35
35
  # Configuration parameters: AllowedClasses.
36
36
  Style/OneClassPerFile:
37
37
  Exclude:
38
38
  - 'lib/oxidized/input/telnet.rb'
39
- - 'lib/oxidized/signals.rb'
40
-
41
- # Offense count: 32
42
- # This cop supports unsafe autocorrection (--autocorrect-all).
43
- Style/SlicingWithRange:
44
- Enabled: false
data/AGENTS.md ADDED
@@ -0,0 +1,174 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI coding agents working in the Oxidized repository. Human
4
+ contributors should read [CONTRIBUTING.md](CONTRIBUTING.md) and the
5
+ [docs/](docs/) folder.
6
+
7
+ ## Project overview
8
+
9
+ Oxidized is a network device configuration backup tool (a RANCID replacement)
10
+ written in Ruby. It logs into network devices, runs commands, and stores the
11
+ resulting configuration in an output backend (git, file, ...). It supports
12
+ 150+ device types through "models".
13
+
14
+ Core concepts:
15
+
16
+ - **Model** ([lib/oxidized/model/](lib/oxidized/model/)) – describes how to talk
17
+ to one OS type: prompt, commands, comment style, secret removal, etc. Uses a
18
+ Ruby DSL built on `Oxidized::Model`.
19
+ - **Input** ([lib/oxidized/input/](lib/oxidized/input/)) – transport such as
20
+ `ssh`, `telnet`, `ftp`, `scp`.
21
+ - **Output** ([lib/oxidized/output/](lib/oxidized/output/)) – where configs are
22
+ stored (`git`, `file`, ...).
23
+ - **Source** ([lib/oxidized/source/](lib/oxidized/source/)) – where the node
24
+ list comes from (`csv`, `sql`, `http`, ...).
25
+ - **Node / Nodes / Job / Worker** ([lib/oxidized/](lib/oxidized/)) – the
26
+ scheduling and execution core.
27
+
28
+ ## Environment & common commands
29
+
30
+ Dependencies are managed with Bundler into `vendor/bundle`. Prefix commands with
31
+ `bundle exec`.
32
+
33
+ ```bash
34
+ bundle config set --local path 'vendor/bundle'
35
+ bundle install
36
+
37
+ bundle exec rake # default task (rubocop + minitest)
38
+ bundle exec rake test # run the whole test suite (minitest)
39
+ bundle exec rubocop # lint / style
40
+ bundle exec bin/oxidized # run Oxidized locally
41
+ ```
42
+
43
+ Run a single model test while iterating:
44
+
45
+ ```bash
46
+ bundle exec rake test TESTOPTS="--verbose --name=/ios#C9800.*output/"
47
+ ```
48
+
49
+ Use `OXIDIZED_HOME` to point at a custom config directory instead of
50
+ `~/.config/oxidized/`.
51
+
52
+ ## Communication
53
+
54
+ - Respond to the user in the language they write in.
55
+ - **All code, identifiers, comments, commit messages and documentation must be
56
+ in English.**
57
+
58
+ ## Coding conventions
59
+
60
+ - Target Ruby `>= 3.0` (see [oxidized.gemspec](oxidized.gemspec)). Do not use
61
+ syntax or stdlib features newer than 3.0.
62
+ - Follow RuboCop; the config lives in [.rubocop.yml](.rubocop.yml). Run
63
+ `bundle exec rubocop` before finishing and fix offenses instead of disabling
64
+ cops, unless a disable is clearly justified.
65
+ - Strings: prefer `"double quotes"`; use `'single quotes'` to signal that string
66
+ interpolation is intentionally not wanted (not enforced by RuboCop).
67
+ - Max line length is 120 (models under `lib/oxidized/model/*.rb` are exempt from
68
+ the RuboCop check, but keep new model lines reasonable — aim for 80 characters
69
+ where possible, without forcing it).
70
+ - **Comments should be sparse and concise.** Only comment when the code is not
71
+ self-evident (a non-obvious device quirk, a workaround, a referenced issue).
72
+ Do not add comments, docstrings, or type annotations to code you did not
73
+ change.
74
+ - Keep changes focused and minimal. Do not refactor or "clean up" unrelated code
75
+ as part of an unrelated fix.
76
+
77
+ ## Working on models
78
+
79
+ Read these before touching a model:
80
+
81
+ - [docs/Creating-Models.md](docs/Creating-Models.md) – model structure, DSL,
82
+ common tasks (`enable`, `clean :escape_codes`, `reject_lines`, ...).
83
+ - [docs/Ruby-API.md](docs/Ruby-API.md) – available DSL methods.
84
+ - [docs/DeviceSimulation.md](docs/DeviceSimulation.md) – simulation files.
85
+ - [docs/ModelUnitTests.md](docs/ModelUnitTests.md) – how models are tested.
86
+
87
+ Notes:
88
+
89
+ - A model file is named after the OS type and defines a class of the same name
90
+ inheriting from `Oxidized::Model` (or from another model such as `Defacto`).
91
+ - Prefer extending existing behaviour with the DSL (`cmd`, `pre`/`post`,
92
+ `prompt`, `comment`, `cfg`, `macro`) over ad-hoc Ruby.
93
+ - When adding a new model, add it to
94
+ [docs/Supported-OS-Types.md](docs/Supported-OS-Types.md).
95
+
96
+ ## Testing conventions
97
+
98
+ Model unit tests are data-driven from [spec/model/data/](spec/model/data/) and
99
+ run automatically by `rake test`. Relevant file suffixes for a given
100
+ `<model>#<description>`:
101
+
102
+ - `#simulation.yaml` – recorded device session (input for the test).
103
+ - `#output.txt` – expected rendered configuration.
104
+ - `#prompt.yaml`, `#secret.yaml`, `#significant_changes.yaml` – optional focused
105
+ tests.
106
+
107
+ Generate a missing `#output.txt` from the current model:
108
+
109
+ ```bash
110
+ bundle exec ruby spec/model/atoms_generate.rb
111
+ ```
112
+
113
+ Custom Ruby tests live in `spec/**/*_spec.rb` (minitest + mocha). Use the
114
+ `#custom_simulation.yaml` suffix for custom simulation data so it does not
115
+ collide with the automatic tests.
116
+
117
+ ## IMPORTANT: never generate YAML simulation files
118
+
119
+ An agent must **never** create or hand-write a device simulation YAML file
120
+ (`spec/model/data/*#simulation.yaml`). These files must be captured from a real
121
+ device so that ANSI escape codes, `\r`, trailing spaces (`\x20`), prompts and
122
+ timing are faithful — hand-crafted data produces misleading tests.
123
+
124
+ Instead, **guide the user** to record one themselves, using one of:
125
+
126
+ 1. **`extra/device2yaml.rb`** – connects over SSH and records the session. See
127
+ [docs/DeviceSimulation.md](docs/DeviceSimulation.md#creating-a-yaml-simulation-file-with-device2yamlrb).
128
+ Example:
129
+
130
+ ```bash
131
+ extra/device2yaml.rb oxidized@device \
132
+ -c "terminal length 0
133
+ show version
134
+ show running-config
135
+ exit" \
136
+ -o spec/model/data/ios#C8200L_16.12.1#simulation.yaml
137
+ ```
138
+
139
+ 2. **`input.debug: yaml`** (Oxidized `>= 0.37.0`) – lets a running Oxidized
140
+ instance write the simulation file from a real backup session into
141
+ `~/.config/oxidized/logs/`. See
142
+ [docs/DeviceSimulation.md](docs/DeviceSimulation.md#creating-a-yaml-simulation-file-with-the-debug-option).
143
+
144
+ ```yaml
145
+ input:
146
+ default: ssh
147
+ debug: yaml
148
+ ```
149
+
150
+ Remind the user to redact secrets (passwords, IP addresses, serial numbers)
151
+ before committing, and to follow the
152
+ `<model>#<hardware>_<software>#simulation.yaml` naming convention. Once the user
153
+ provides a real simulation file, the agent may generate/adjust the matching
154
+ `#output.txt` and edit the model.
155
+
156
+ The agent may help redact secrets in a captured simulation file, but must leave
157
+ the first and last line of each command output unchanged: they contain the
158
+ command echo and the following prompt, which Oxidized relies on for prompt
159
+ detection.
160
+
161
+ To test how a model processes command output (e.g. secret removal), the agent
162
+ may add a few configuration lines to an existing, captured simulation file,
163
+ inside the output of the command concerned. The same rule applies: keep the
164
+ first and last line of the command output unchanged, use fabricated values,
165
+ and add the lines to the matching `#output.txt` (and `#secret.yaml` if
166
+ relevant). Prefer this over a separate Ruby spec.
167
+
168
+ ## Contribution workflow
169
+
170
+ - Branch names may be prefixed with the issue number (e.g.
171
+ `1234-short-description`).
172
+ - Keep commits small and messages descriptive; they appear in the pull request.
173
+ - Before opening a PR: `bundle exec rubocop` and `bundle exec rake test` must
174
+ pass (CI blocks merges otherwise).
data/CHANGELOG.md CHANGED
@@ -4,6 +4,107 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.38.0 - 2026-11-16]
8
+ ### Release Notes
9
+ The git and gitcrypt outputs no longer provide the `:date` field in the node versions, as it was only used by oxidized-web <= 0.16.0. You need oxidized-web >= 0.17.0, older versions will fail to display node versions and diffs.
10
+
11
+ Oxidized no longer patches Puma's signal handling (needed for Puma 8). With oxidized-web < 0.17.0, Puma takes over the INT, TERM and HUP signals again. Oxidized logs a warning at startup if it finds such a version.
12
+
13
+ When loading a single node (`oxs <host>` in oxidized-script, `/reload?node=<host>` in oxidized-web), the node name must now match exactly. Previously, a node also matched when its name was contained in the requested name, so `oxs router10` could run on `router1`.
14
+
15
+ net-ssh >= 8.0 requires Diffie-Hellman group exchange groups of at least 2048 bits (previously 1024). Old devices offering only 1024-bit groups fail to connect; set the variable `ssh_minimum_dh_bits: 1024` for them.
16
+
17
+ net-ssh >= 8.0 parses the OpenSSH configuration files (`~/.ssh/config`, `/etc/ssh/ssh_config`) more strictly, including `KexAlgorithms`, `PubkeyAcceptedAlgorithms` and `-` algorithm lists. This may change the algorithm negotiation; see [OpenSSH configuration files](docs/Inputs.md#openssh-configuration-files).
18
+
19
+ net-ssh >= 8.1 changed how RSA keys are offered, which may break public key authentication on some devices; see [SSH public key algorithms](docs/Inputs.md#ssh-public-key-algorithms).
20
+
21
+ ### Added
22
+ - device2yaml: add port option (@systeembeheerder)
23
+ - itmgos: new model for Lantronix IT Management Gateway OS (SLC 8000, SLC 9000, EMG, SLB console servers), with simulation data and unit tests (@ryanhoggpm)
24
+ - vrp: add simulation data for Huawei YunShan OS with VRP model (@systeembeheerder)
25
+ - iosxr: add show vesion (@Mascherus, @systeembeheerder)
26
+ - cnos: remove transceiver DDM data (@freddy36)
27
+ - cnos: add show license output (@freddy36)
28
+ - cnos: add FS-S5850 simulation data (@freddy36)
29
+ - eatonnetwork: model unit test (@thanegill)
30
+ - source/sql: support defining port in configuration. Closes #3853 (@ytti)
31
+ - vsololt: new model for VSOL GPON OLT (@Vantomas)
32
+ - tplink: add simulation data and unit tests for the TP-Link DeltaStream DS-P7001-08 GPON OLT (@Vantomas)
33
+ - device2yaml: add `-n`/`--newline` option to set the command line terminator (e.g. `-n "\r\n"`) for devices that submit a command only on a carriage return; the terminator is recorded as a `command_newline` key in the generated YAML (@Vantomas)
34
+ - ftd: new model for Cisco FTD via HTTP; requires the optional rubyzip gem (@mgrocock-cwcs, @robertcheramy)
35
+ - AGENTS.md: add guidance for AI coding agents, and document the AI contribution policy in CONTRIBUTING.md (@robertcheramy)
36
+ - refinements: add `String#rstrip_lines` to strip trailing whitespace from each line (@thanegill)
37
+ - ssh: add the `ssh_pubkey_algorithms` variable to choose the public key signature algorithms, for devices that disconnect on `rsa-sha2-*` such as Huawei SmartAX. Closes #2875 (@fmcglinn)
38
+ - ssh: add the `ssh_minimum_dh_bits` variable to accept Diffie-Hellman groups smaller than 2048 bits on old devices (@robertcheramy)
39
+
40
+ ### Changed
41
+ - vyos: add commit info (@systeembeheerder)
42
+ - vrp: ignore `!Last configuration was updated/saved at` lines when `output_store_mode` is `on_significant`. Closes #3958 (@robertcheramy)
43
+ - docker: set LANG=C.UTF-8. Fixes #3690 (@ytti)
44
+ - routeros: remove intermittent POE `voltage_on_poe-in` comment (@hendrikbl)
45
+ - tplink: use `\r\n` as the line terminator in pre_logout, required for the model unit tests to work (@Vantomas)
46
+ - ssh: change max_window_size from 138k to 2MB to avoid triggering Mikrotik bug. Closes #3867 (@ytti)
47
+ - CI: run Ruby 3.0 and 3.1 on ubuntu-24.04, as ubuntu-26.04 (ubuntu-latest) only provides Ruby >= 3.2 (@robertcheramy)
48
+ - README: document libgpg-error-dev as a dependency on Debian and Ubuntu, and libjitterentropy3-dev as a dependency on Ubuntu 26.04 (Ubuntu bug #2158026) (@robertcheramy)
49
+ - core: log a warning at startup when the loaded oxidized-web is older than 0.17.0 (@robertcheramy)
50
+ - ssh: require net-ssh ~> 8.1 and net-scp ~> 4.2, newer than the Debian 13 packages; the Docker image installs them as gems (@robertcheramy)
51
+ - ssh: drop the ed25519 gem dependency and the x25519 gem in the Docker image, as net-ssh 8 uses OpenSSL for Ed25519 and Curve25519 (@robertcheramy)
52
+ - ssh, scp: log a warning instead of creating a crashfile on a host key mismatch (`secure: true`) and on an unsupported key type (@robertcheramy)
53
+ - ingate: redact secrets (private keys, passwords, secrets, passphrases, pre-shared keys, tokens and the SNMP community) when remove_secret is set (@thanegill)
54
+ - http: support overriding port (@mgrocock-cwcs)
55
+ - http: support DELETE method (@mgrocock-cwcs)
56
+ - tmos: strip volatile object metadata (checksum, revision, size, create/update time and author) from `tmsh -q list` and the partition configs (@dahlmo)
57
+ - panos_api: back up the running configuration with `show config running` instead of the candidate configuration export. A custom admin role now needs the XML API `Operational Requests` permission; set `panos_api_candidate: true` to keep the previous behaviour. Fixes #2759 (@macmandr197)
58
+ - gemspec: add nokogiri as a development dependency for the panos_api unit tests (@macmandr197)
59
+ - gemspec: document which component needs each optional dependency (@robertcheramy)
60
+ - output/git: skip walking the git logs in the version cache when HEAD did not change, speeding up node lists in oxidized-web. Closes #3895 (@zaits07)
61
+ - output/git: reduce the memory footprint of the version cache by deduplicating author and message strings (@robertcheramy)
62
+ - output/git, output/gitcrypt: remove the `:date` field from node versions, use `:time` instead. Requires oxidized-web >= 0.17.0 (@robertcheramy)
63
+ - garderos: replace `show system version` & `show system serial` with `show system information` and `show hardware all` to get more hardware details (@robertcheramy)
64
+ - docs: document in Docker.md how to extend the official image with additional gems or packages, as the image no longer ships build tools or `/sbin/my_init` since the move to debian:trixie-slim. Closes #3897 (@joewaltman)
65
+ - ATOMS tests: fail instead of skip when test data cannot be loaded (@robertcheramy)
66
+ - procurve: rstrip trailing whitespace from commented command sections (@thanegill)
67
+ - adtran, aosw, c4cmts, coriantgroove, dlink, dlinknextgen, enterasys, hpebladesystem, junos, mtrlrfs, procurve, routeros, xos, zhoneolt: use the `cut_*` and `rstrip_lines` refinements instead of custom code (@thanegill)
68
+ - arbos, aricentiss, asa, asternos, bdcom, comnetms, dellx, dnos, eciapollo, edgeos, fiberdriver, firelinuxos, ftos, ibos, kornfeldos, masteros, mlnxos, ndms, necix, netgear, netscaler, ocnos, onefinity, openbsd, os10, os6, panos, screenos, sgos, siklu, sonicos, tdre, telco, tplink, viptela, voltaire, vyatta: use the `cut_head`, `cut_tail` and `cut_both` refinements instead of slicing line arrays (@robertcheramy)
69
+ - acsw, aireos, br6910, ironware, slxos, sonicos, tplink: use endless ranges (`[n..]`) instead of `[n..-1]` (@robertcheramy)
70
+ - audiocodesmp, ciscosmb, ibos, kornfeldos, oneos: remove no-op `[0..-1]` slicing that only copied the configuration (@robertcheramy)
71
+ - rubocop: enable `Style/SlicingWithRange` and fix the offenses in hooks, telnet input, refinements and extra/syslog.rb (@robertcheramy)
72
+ - procurve: remove ANSI escape codes with `clean :escape_codes` and simplify the prompt regexp (@thanegill)
73
+ - procurve: redact the additional credentials exposed by `include-credentials` / `encrypt-credentials`, with unit tests (@thanegill)
74
+
75
+ ### Fixed
76
+ - extra/oxidized.service: remove `KillSignal=SIGKILL`, Oxidized exits on SIGTERM since #3059 (@robertcheramy)
77
+ - signals: remove the `Puma::Signal` monkey patch, which broke Puma 8 (`undefined method 'list' for class Puma::Signal`) when Oxidized was loaded before Puma. The patch is no longer needed since oxidized-web 0.17.0 (ytti/oxidized-web#357) starts `Puma::Server` directly instead of using the Puma launcher. With oxidized-web < 0.17.0, Puma traps INT, TERM and HUP again (@robertcheramy)
78
+ - output/git: `get_diff` only returns the diff of the requested node when a commit contains several nodes (@robertcheramy)
79
+ - output/gitcrypt: `get_diff` only returns the diff of the requested node when a commit contains several nodes, and works with groups in a single repository (@robertcheramy)
80
+ - output/gitcrypt: reference the `git` gem as `::Git`, as `Git` resolved to `Oxidized::Output::Git` when the git output was loaded too (@robertcheramy)
81
+ - input/cli: raise an error when a requested login credential is missing. Fixes #3700 (@robertcheramy)
82
+ - eos: hide the community string / v3 user in snmp-server host lines. Fixes #3882 (@FusionBrah)
83
+ - aoscx: mask the community string in snmp-server host lines instead of the token after the host address. Fixes #3881 (@FusionBrah)
84
+ - fortigate: answer the `Do you want to continue? (y/n)` prompt from `diagnose hardware deviceinfo psu`. Fixes #3940 (@suryakant-source)
85
+ - fastiron: answer the pager prompt with a space and strip ANSI escape sequences, as `skip-page-display` is not available to users without enable rights. Fixes #3819 (@FusionBrah)
86
+ - junos: redact cleartext passwords embedded in archive-site URLs. Fixes #3640 (@KalebFenley, @robertcheramy)
87
+ - nxos: hide the auth key of snmp-server users without priv (@robertcheramy)
88
+ - siklu: allow parenthesis in prompt. Fixes #3841 (@ytti)
89
+ - fortios: allow parenthesis in prompt. Fixes #3846 (@ytti)
90
+ - os6: hide snmp-server community strings in the secret filter (@Jurgen1994)
91
+ - fortigate: prompt can contain HA cluster status. Fixes #3846 (@robertcheramy)
92
+ - aoscx: hide power consumption on rows where PSU output is N/A. Fixes #3864 (@FusionBrah)
93
+ - aoscx: hide input voltage readings in "show environment power-supply input-voltage". Fixes #3864 (@FusionBrah)
94
+ - source: return the decrypted contents of a `gpg`-encrypted source as an IO object, so JSONFile (and any source reading via `#read`) loads it instead of crashing with a `NoMethodError`. Fixes #3879 (@youdie006)
95
+ - output/git: fix the version cache losing commits made within the same second or during a cache update. Log an error and rebuild the cache if the git history has been rewritten while Oxidized is running (@robertcheramy)
96
+ - output/git: rebuild the git index from HEAD before each commit, so that changes merged by the githubrepo hook or pushed to the repository are no longer reverted by the next commit, and read configurations from HEAD instead of the index. Fixes #3887 (@robertcheramy)
97
+ - scp: rescue the `ArgumentError` net-scp raises when a device answers with an error message missing the `\2` prefix, so the node fails instead of crashing Oxidized. Fixes #3900 (@SAY-5)
98
+ - nodes: match the node name exactly when loading a single node, instead of matching the node name as a regexp against the requested name, which could select the wrong node (e.g. `router1` for `router10`) (@robertcheramy)
99
+ - core: expand `~` in `crash.directory` before writing crash dumps. Fixes #3945. (@wleeaf, @robertcheramy)
100
+ - junos: remove syntax error when there is no virtual chassis. Fixes #3922. (@dalejos, @robertcheramy)
101
+ - ssh: reject an `ssh_proxy` that is not `[user@]host` (RFC 1123 hostname, IPv4 or IPv6 address) and an `ssh_proxy_port` that is not an integer, so values from the source cannot inject shell commands or ssh options. Invalid ssh variables make the node fail with a warning (@robertcheramy)
102
+ - docs: Supported-OS-Types lists the F5OS, Grandstream HT8xx and Uplink EP4440 models under their model names (`f5os`, `grandstreamht8xx`, `uplinkolt`) instead of `tmos`, `grandstream` and `EP4440` (@rawsun007)
103
+ - awplus: remove stray BEL (0x07) character left from pager. Fixes #3919. (@cojumbo, @robertcheramy)
104
+ - procurve: hide the SNMP community on `snmp-server host <ip> community "<name>"` lines (@thanegill)
105
+ - procurve: hide local user password hashes (`password ... sha1 "<hash>"`) when remove_secret is true (@thanegill)
106
+ - debug logs no longer contain the node password, sensitive vars (e.g. `enable`) and the HTTP Authorization header (basic auth credentials, API tokens). The new `Oxidized::Redact` module hides them, using the same patterns as `oxidized --support` (@robertcheramy)
107
+
7
108
  ## [0.37.0 - 2026-05-20]
8
109
  ### Added
9
110
  - routeros: support store mode `on_significant` (@infabo)