oxidized 0.28.0 → 0.29.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +31 -0
  3. data/.github/workflows/codeql.yml +76 -0
  4. data/.github/workflows/publishdocker.yml +11 -2
  5. data/.github/workflows/ruby.yml +42 -0
  6. data/.github/workflows/stale.yml +16 -0
  7. data/.rubocop.yml +30 -10
  8. data/.rubocop_todo.yml +97 -43
  9. data/CHANGELOG.md +149 -2
  10. data/Dockerfile +15 -9
  11. data/README.md +63 -32
  12. data/Rakefile +2 -0
  13. data/docs/Configuration.md +49 -7
  14. data/docs/Creating-Models.md +24 -19
  15. data/docs/Hooks.md +35 -6
  16. data/docs/Model-Notes/ADVA.md +12 -0
  17. data/docs/Model-Notes/Cumulus.md +7 -1
  18. data/docs/Model-Notes/IOS.md +36 -0
  19. data/docs/Model-Notes/JunOS.md +3 -3
  20. data/docs/Model-Notes/LenovoNOS.md +29 -0
  21. data/docs/Model-Notes/LinksysSRW.md +15 -0
  22. data/docs/Model-Notes/Nokia.md +3 -0
  23. data/docs/Model-Notes/OS10.md +33 -0
  24. data/docs/Model-Notes/PanOS_API.md +28 -0
  25. data/docs/Model-Notes/README.md +2 -0
  26. data/docs/Ruby-API.md +12 -8
  27. data/docs/Sources.md +18 -0
  28. data/docs/Supported-OS-Types.md +51 -6
  29. data/docs/Troubleshooting.md +1 -1
  30. data/extra/gitdiff-msteams.sh +91 -0
  31. data/extra/nagios_check_failing_nodes.rb +6 -9
  32. data/extra/oxidized-report-git-commits +71 -14
  33. data/extra/oxidized.init +2 -5
  34. data/extra/oxidized.logrotate +1 -0
  35. data/extra/oxidized.runit +4 -1
  36. data/extra/oxidized.service +5 -8
  37. data/extra/rest_client.rb +1 -1
  38. data/extra/syslog.rb +2 -2
  39. data/lib/oxidized/cli.rb +1 -1
  40. data/lib/oxidized/config/vars.rb +5 -2
  41. data/lib/oxidized/config.rb +6 -3
  42. data/lib/oxidized/core.rb +1 -1
  43. data/lib/oxidized/hook/exec.rb +6 -6
  44. data/lib/oxidized/hook/githubrepo.rb +42 -11
  45. data/lib/oxidized/hook/slackdiff.rb +2 -2
  46. data/lib/oxidized/hook/xmppdiff.rb +45 -25
  47. data/lib/oxidized/hook.rb +4 -8
  48. data/lib/oxidized/input/exec.rb +1 -1
  49. data/lib/oxidized/input/input.rb +1 -0
  50. data/lib/oxidized/input/ssh.rb +23 -20
  51. data/lib/oxidized/input/telnet.rb +52 -44
  52. data/lib/oxidized/job.rb +1 -0
  53. data/lib/oxidized/jobs.rb +11 -6
  54. data/lib/oxidized/manager.rb +1 -0
  55. data/lib/oxidized/model/acmepacket.rb +40 -0
  56. data/lib/oxidized/model/acos.rb +3 -1
  57. data/lib/oxidized/model/acsw.rb +2 -0
  58. data/lib/oxidized/model/adtran.rb +7 -3
  59. data/lib/oxidized/model/adva.rb +68 -0
  60. data/lib/oxidized/model/aen.rb +2 -0
  61. data/lib/oxidized/model/aireos.rb +2 -0
  62. data/lib/oxidized/model/airfiber.rb +3 -1
  63. data/lib/oxidized/model/airos.rb +2 -0
  64. data/lib/oxidized/model/alteonos.rb +2 -0
  65. data/lib/oxidized/model/alvarion.rb +2 -0
  66. data/lib/oxidized/model/aos.rb +2 -0
  67. data/lib/oxidized/model/aos7.rb +2 -0
  68. data/lib/oxidized/model/aoscx.rb +98 -0
  69. data/lib/oxidized/model/aosw.rb +4 -2
  70. data/lib/oxidized/model/apc_aos.rb +2 -0
  71. data/lib/oxidized/model/arbos.rb +2 -0
  72. data/lib/oxidized/model/aricentiss.rb +2 -0
  73. data/lib/oxidized/model/asa.rb +4 -0
  74. data/lib/oxidized/model/asyncos.rb +2 -0
  75. data/lib/oxidized/model/audiocodes.rb +2 -0
  76. data/lib/oxidized/model/audiocodesmp.rb +2 -0
  77. data/lib/oxidized/model/awplus.rb +3 -1
  78. data/lib/oxidized/model/axos.rb +2 -0
  79. data/lib/oxidized/model/bdcom.rb +51 -0
  80. data/lib/oxidized/model/boss.rb +3 -1
  81. data/lib/oxidized/model/br6910.rb +2 -0
  82. data/lib/oxidized/model/c4cmts.rb +2 -0
  83. data/lib/oxidized/model/cambium.rb +2 -0
  84. data/lib/oxidized/model/cambiumepmp.rb +19 -0
  85. data/lib/oxidized/model/casa.rb +6 -1
  86. data/lib/oxidized/model/catos.rb +2 -0
  87. data/lib/oxidized/model/ciscoce.rb +14 -0
  88. data/lib/oxidized/model/cisconga.rb +2 -0
  89. data/lib/oxidized/model/ciscosma.rb +2 -0
  90. data/lib/oxidized/model/ciscosmb.rb +4 -0
  91. data/lib/oxidized/model/ciscovpn3k.rb +2 -0
  92. data/lib/oxidized/model/cnos.rb +2 -0
  93. data/lib/oxidized/model/comnetms.rb +2 -0
  94. data/lib/oxidized/model/comtrol.rb +2 -0
  95. data/lib/oxidized/model/comware.rb +17 -1
  96. data/lib/oxidized/model/coriant8600.rb +2 -0
  97. data/lib/oxidized/model/coriantgroove.rb +2 -0
  98. data/lib/oxidized/model/corianttmos.rb +2 -0
  99. data/lib/oxidized/model/cumulus.rb +60 -44
  100. data/lib/oxidized/model/datacom.rb +2 -0
  101. data/lib/oxidized/model/dcnos.rb +2 -0
  102. data/lib/oxidized/model/dellx.rb +3 -3
  103. data/lib/oxidized/model/dlink.rb +4 -1
  104. data/lib/oxidized/model/dnos.rb +2 -0
  105. data/lib/oxidized/model/eciapollo.rb +2 -0
  106. data/lib/oxidized/model/edgecos.rb +24 -2
  107. data/lib/oxidized/model/edgeos.rb +2 -0
  108. data/lib/oxidized/model/edgeswitch.rb +6 -4
  109. data/lib/oxidized/model/eltex.rb +50 -0
  110. data/lib/oxidized/model/enterasys.rb +20 -3
  111. data/lib/oxidized/model/enterasys800.rb +31 -0
  112. data/lib/oxidized/model/eos.rb +4 -1
  113. data/lib/oxidized/model/fabricos.rb +3 -1
  114. data/lib/oxidized/model/fastiron.rb +5 -2
  115. data/lib/oxidized/model/fiberdriver.rb +2 -0
  116. data/lib/oxidized/model/firebrick.rb +2 -0
  117. data/lib/oxidized/model/firelinuxos.rb +2 -0
  118. data/lib/oxidized/model/firewareos.rb +2 -0
  119. data/lib/oxidized/model/fortios.rb +26 -11
  120. data/lib/oxidized/model/fortiwlc.rb +26 -0
  121. data/lib/oxidized/model/ftos.rb +2 -0
  122. data/lib/oxidized/model/fujitsupy.rb +2 -0
  123. data/lib/oxidized/model/gaiaos.rb +42 -3
  124. data/lib/oxidized/model/gcombnps.rb +2 -0
  125. data/lib/oxidized/model/grandstream.rb +2 -0
  126. data/lib/oxidized/model/h3c.rb +42 -0
  127. data/lib/oxidized/model/hatteras.rb +4 -2
  128. data/lib/oxidized/model/hios.rb +40 -0
  129. data/lib/oxidized/model/hirschmann.rb +2 -0
  130. data/lib/oxidized/model/hpebladesystem.rb +3 -1
  131. data/lib/oxidized/model/hpemsa.rb +2 -0
  132. data/lib/oxidized/model/hpmsm.rb +2 -0
  133. data/lib/oxidized/model/ibos.rb +2 -0
  134. data/lib/oxidized/model/icotera.rb +2 -0
  135. data/lib/oxidized/model/ios.rb +15 -10
  136. data/lib/oxidized/model/iosxe.rb +1 -1
  137. data/lib/oxidized/model/iosxr.rb +2 -0
  138. data/lib/oxidized/model/ipos.rb +2 -0
  139. data/lib/oxidized/model/ironware.rb +10 -4
  140. data/lib/oxidized/model/isam.rb +2 -0
  141. data/lib/oxidized/model/junos.rb +7 -1
  142. data/lib/oxidized/model/lancom.rb +25 -0
  143. data/lib/oxidized/model/lenovonos.rb +84 -0
  144. data/lib/oxidized/model/linksyssrw.rb +73 -0
  145. data/lib/oxidized/model/linuxgeneric.rb +2 -0
  146. data/lib/oxidized/model/masteros.rb +2 -0
  147. data/lib/oxidized/model/mlnxos.rb +4 -0
  148. data/lib/oxidized/model/model.rb +35 -8
  149. data/lib/oxidized/model/mtrlrfs.rb +2 -0
  150. data/lib/oxidized/model/ndms.rb +3 -1
  151. data/lib/oxidized/model/necix.rb +32 -0
  152. data/lib/oxidized/model/netgear.rb +7 -2
  153. data/lib/oxidized/model/netonix.rb +2 -0
  154. data/lib/oxidized/model/netscaler.rb +40 -1
  155. data/lib/oxidized/model/nodegrid.rb +25 -0
  156. data/lib/oxidized/model/nos.rb +2 -0
  157. data/lib/oxidized/model/nsxconfig.rb +2 -0
  158. data/lib/oxidized/model/nsxfirewall.rb +2 -0
  159. data/lib/oxidized/model/nxos.rb +5 -2
  160. data/lib/oxidized/model/oneos.rb +2 -0
  161. data/lib/oxidized/model/openbsd.rb +11 -0
  162. data/lib/oxidized/model/opengear.rb +3 -1
  163. data/lib/oxidized/model/openwrt.rb +2 -0
  164. data/lib/oxidized/model/opnsense.rb +14 -4
  165. data/lib/oxidized/model/os10.rb +2 -0
  166. data/lib/oxidized/model/outputs.rb +2 -0
  167. data/lib/oxidized/model/panos.rb +2 -0
  168. data/lib/oxidized/model/panos_api.rb +73 -0
  169. data/lib/oxidized/model/pfsense.rb +14 -7
  170. data/lib/oxidized/model/planet.rb +2 -0
  171. data/lib/oxidized/model/powerconnect.rb +3 -3
  172. data/lib/oxidized/model/procurve.rb +4 -2
  173. data/lib/oxidized/model/purityos.rb +10 -1
  174. data/lib/oxidized/model/qtech.rb +2 -0
  175. data/lib/oxidized/model/quantaos.rb +3 -5
  176. data/lib/oxidized/model/raisecom.rb +2 -0
  177. data/lib/oxidized/model/routeros.rb +17 -2
  178. data/lib/oxidized/model/saos.rb +2 -0
  179. data/lib/oxidized/model/screenos.rb +2 -0
  180. data/lib/oxidized/model/sgos.rb +2 -0
  181. data/lib/oxidized/model/siklu.rb +2 -0
  182. data/lib/oxidized/model/slxos.rb +3 -0
  183. data/lib/oxidized/model/smartax.rb +2 -0
  184. data/lib/oxidized/model/smartcs.rb +42 -0
  185. data/lib/oxidized/model/sonicos.rb +11 -1
  186. data/lib/oxidized/model/speedtouch.rb +2 -0
  187. data/lib/oxidized/model/sros.rb +3 -1
  188. data/lib/oxidized/model/srosmd.rb +99 -0
  189. data/lib/oxidized/model/stoneos.rb +8 -2
  190. data/lib/oxidized/model/supermicro.rb +1 -1
  191. data/lib/oxidized/model/swos.rb +11 -0
  192. data/lib/oxidized/model/tdre.rb +2 -0
  193. data/lib/oxidized/model/telco.rb +2 -0
  194. data/lib/oxidized/model/timos.rb +1 -1
  195. data/lib/oxidized/model/tmos.rb +5 -2
  196. data/lib/oxidized/model/tplink.rb +4 -0
  197. data/lib/oxidized/model/trango.rb +13 -11
  198. data/lib/oxidized/model/truenas.rb +22 -0
  199. data/lib/oxidized/model/ucs.rb +2 -0
  200. data/lib/oxidized/model/viptela.rb +2 -0
  201. data/lib/oxidized/model/voltaire.rb +2 -0
  202. data/lib/oxidized/model/voss.rb +2 -0
  203. data/lib/oxidized/model/vrp.rb +3 -1
  204. data/lib/oxidized/model/vyatta.rb +2 -0
  205. data/lib/oxidized/model/weos.rb +2 -0
  206. data/lib/oxidized/model/xos.rb +6 -3
  207. data/lib/oxidized/model/yamaha.rb +59 -0
  208. data/lib/oxidized/model/zhoneolt.rb +2 -0
  209. data/lib/oxidized/model/zteolt.rb +54 -0
  210. data/lib/oxidized/model/zy1308.rb +13 -0
  211. data/lib/oxidized/model/zynos.rb +2 -0
  212. data/lib/oxidized/model/zynoscli.rb +2 -0
  213. data/lib/oxidized/model/zynosgs.rb +2 -0
  214. data/lib/oxidized/node/stats.rb +1 -0
  215. data/lib/oxidized/node.rb +16 -11
  216. data/lib/oxidized/nodes.rb +7 -6
  217. data/lib/oxidized/output/file.rb +2 -1
  218. data/lib/oxidized/output/git.rb +5 -3
  219. data/lib/oxidized/output/gitcrypt.rb +5 -8
  220. data/lib/oxidized/output/http.rb +2 -0
  221. data/lib/oxidized/source/csv.rb +1 -0
  222. data/lib/oxidized/source/http.rb +4 -0
  223. data/lib/oxidized/source/source.rb +7 -2
  224. data/lib/oxidized/source/sql.rb +15 -5
  225. data/lib/oxidized/version.rb +2 -2
  226. data/lib/oxidized/worker.rb +5 -5
  227. data/lib/oxidized.rb +1 -1
  228. data/lib/refinements.rb +43 -0
  229. data/oxidized.gemspec +22 -16
  230. metadata +120 -31
  231. data/.github/no-response.yml +0 -13
  232. data/.travis.yml +0 -10
  233. data/lib/oxidized/string.rb +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95fc2012e91f74ce819ae87f1c400231e86efa9a7fac37882569bc5426fd3fe5
4
- data.tar.gz: 7ef28ef45e639d0813da0b38cc1f5c5f39bb64e0cb012536b7a774952f723adb
3
+ metadata.gz: d5f60756df10959016092e920b8d30c1752a54c902c25dd5753f73cf9982dbbe
4
+ data.tar.gz: 32e8b6918df95cc21e0a7cdcfb2934385f362a70f5035c70a2271390254826d7
5
5
  SHA512:
6
- metadata.gz: a9b04bd2bbcc50f6e71c9ec340712ad10fe33362d4703e317d17e439ed714433400e7d76512ae10fbf928386b9e3bd81e1db1d70f259639015ba506cdf89092b
7
- data.tar.gz: 334d3c403a31d79b3489b430f20142a272022b4cade9321e91173a8c8bd90a9b7244763f853779fdd65a3d6c0cd201c4ccc2cfff7964bc3385f90fc0cb032467
6
+ metadata.gz: 299463a15d5fdbdea8f6e67859eb9c2c9d8ea9c1fe6bf4506a1bc3fb7de9e6ed9f01887e3d999460d67ecfd8eb7994ebd193a0bca33d1cc6fe39e30b8f34293a
7
+ data.tar.gz: '095c7d26e35534fac3c3c1fe2615eb31e5d6b6302910c66e3d07ba23f698f9b13b8bbab9e70f84f5a627bf560a6e636e7d8dea7a85158f31012c50c845edf0cd'
@@ -0,0 +1,31 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "github-actions"
9
+ target-branch: "master"
10
+ directory: "/"
11
+ schedule:
12
+ interval: "daily"
13
+ open-pull-requests-limit: 10
14
+ labels:
15
+ - dependencies
16
+ - package-ecosystem: "bundler"
17
+ target-branch: "master"
18
+ directory: "/"
19
+ schedule:
20
+ interval: "daily"
21
+ open-pull-requests-limit: 10
22
+ labels:
23
+ - dependencies
24
+ - package-ecosystem: "docker"
25
+ target-branch: "master"
26
+ directory: "/"
27
+ schedule:
28
+ interval: "daily"
29
+ open-pull-requests-limit: 10
30
+ labels:
31
+ - dependencies
@@ -0,0 +1,76 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "master" ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "master" ]
20
+ schedule:
21
+ - cron: '44 21 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Use only 'java' to analyze code written in Java, Kotlin or both
38
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40
+
41
+ steps:
42
+ - name: Checkout repository
43
+ uses: actions/checkout@v3
44
+
45
+ # Initializes the CodeQL tools for scanning.
46
+ - name: Initialize CodeQL
47
+ uses: github/codeql-action/init@v2
48
+ with:
49
+ languages: ${{ matrix.language }}
50
+ # If you wish to specify custom queries, you can do so here or in a config file.
51
+ # By default, queries listed here will override any specified in a config file.
52
+ # Prefix the list here with "+" to use these queries and those in the config file.
53
+
54
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
+ # queries: security-extended,security-and-quality
56
+
57
+
58
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59
+ # If this step fails, then you should remove it and run the build manually (see below)
60
+ - name: Autobuild
61
+ uses: github/codeql-action/autobuild@v2
62
+
63
+ # ℹ️ Command-line programs to run using the OS shell.
64
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65
+
66
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
67
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68
+
69
+ # - run: |
70
+ # echo "Run, Build Application using script"
71
+ # ./location_of_script_within_repo/buildscript.sh
72
+
73
+ - name: Perform CodeQL Analysis
74
+ uses: github/codeql-action/analyze@v2
75
+ with:
76
+ category: "/language:${{matrix.language}}"
@@ -1,13 +1,22 @@
1
1
  name: Publish Docker
2
- on: [push]
2
+ on:
3
+ push:
4
+ branches: [ "master" ]
3
5
  jobs:
4
6
  build:
7
+ if: github.repository_owner == 'ytti'
5
8
  runs-on: ubuntu-latest
6
9
  steps:
7
10
  - uses: actions/checkout@master
11
+ with:
12
+ fetch-depth: 0
13
+ - name: Get Release Version
14
+ id: get_version
15
+ run: echo "release-version=$(git describe --tags)" >> $GITHUB_OUTPUT
8
16
  - name: Publish to Registry
9
- uses: elgohr/Publish-Docker-Github-Action@master
17
+ uses: elgohr/Publish-Docker-Github-Action@v5
10
18
  with:
11
19
  name: oxidized/oxidized
12
20
  username: ${{ secrets.DOCKER_USERNAME }}
13
21
  password: ${{ secrets.DOCKER_PASSWORD }}
22
+ tags: "latest,${{ steps.get_version.outputs.release-version }}"
@@ -0,0 +1,42 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: CI
9
+
10
+ on: [ push, pull_request ]
11
+ # push:
12
+ # branches: [ master ]
13
+ # pull_request:
14
+ # branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['3.0', '3.1', '3.2']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v3
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby-version }}
32
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
+ - name: rubocop
34
+ uses: reviewdog/action-rubocop@v2
35
+ with:
36
+ rubocop_version: gemfile
37
+ rubocop_extensions: rubocop-minitest:gemfile rubocop-rake:gemfile
38
+ reporter: github-pr-review
39
+ - name: Run tests
40
+ run: bundle exec rake
41
+ - uses: codecov/codecov-action@v3
42
+ if: ${{ always() }}
@@ -0,0 +1,16 @@
1
+ name: "Stale Issue/PR cleanup"
2
+ on:
3
+ schedule:
4
+ - cron: "30 1 * * *"
5
+
6
+ permissions:
7
+ issues: write
8
+ pull-requests: write
9
+
10
+ jobs:
11
+ stale:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/stale@v8
15
+ with:
16
+ operations-per-run: 500
data/.rubocop.yml CHANGED
@@ -2,22 +2,29 @@ inherit_from: .rubocop_todo.yml
2
2
 
3
3
  # Do not attempt to police vendored code
4
4
  AllCops:
5
- TargetRubyVersion: 2.3
5
+ NewCops: enable
6
+ TargetRubyVersion: 3.0
6
7
  Exclude:
7
8
  - 'vendor/**/*'
8
9
 
9
- StringLiterals:
10
+ Style/StringLiterals:
10
11
  Enabled: false
11
12
 
12
13
  Style/FrozenStringLiteralComment:
13
14
  Enabled: false
14
15
 
15
- LineLength:
16
+ Layout/LineLength:
16
17
  Enabled: false
17
18
 
18
19
  Lint/AmbiguousRegexpLiteral:
19
20
  Enabled: false
20
21
 
22
+ Lint/RaiseException:
23
+ Enabled: true
24
+
25
+ Lint/StructNewOverride:
26
+ Enabled: true
27
+
21
28
  # Stick to verbose until https://bugs.ruby-lang.org/issues/10177 is closed.
22
29
  Style/PreferredHashMethods:
23
30
  EnforcedStyle: verbose
@@ -60,14 +67,27 @@ Style/Documentation:
60
67
  Style/ParallelAssignment:
61
68
  Enabled: false
62
69
 
70
+ Metrics/MethodLength:
71
+ Max: 45
72
+
63
73
  ## Metrics/AbcSize:
64
74
  ## Max: 28
65
- ##
66
- ## Metrics/MethodLength:
67
- ## Max: 20
68
- ##
69
- ## Metrics/ClassLength:
70
- ## Max: 140
71
- ##
75
+
76
+ Metrics/ClassLength:
77
+ Max: 200
78
+
72
79
  ## Metrics/CyclomaticComplexity:
73
80
  ## Max: 7
81
+
82
+ Metrics/BlockLength:
83
+ Max: 150
84
+
85
+ Metrics/ParameterLists:
86
+ Max: 6
87
+
88
+ Lint/EmptyBlock:
89
+ Enabled: false
90
+
91
+ require:
92
+ - rubocop-rake
93
+ - rubocop-minitest
data/.rubocop_todo.yml CHANGED
@@ -1,56 +1,38 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-02-29 09:58:06 +0100 using RuboCop version 0.80.0.
3
+ # on 2023-04-14 17:17:03 UTC using RuboCop version 1.48.1.
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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 3
10
- # Configuration parameters: AllowComments.
10
+ # Configuration parameters: AllowComments, AllowNil.
11
11
  Lint/SuppressedException:
12
12
  Exclude:
13
13
  - 'lib/oxidized/input/ssh.rb'
14
14
  - 'lib/oxidized/input/telnet.rb'
15
15
  - 'lib/oxidized/nodes.rb'
16
16
 
17
- # Offense count: 67
17
+ # Offense count: 62
18
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
18
19
  Metrics/AbcSize:
19
- Max: 82
20
+ Max: 92
20
21
 
21
- # Offense count: 18
22
- # Configuration parameters: CountComments, ExcludedMethods.
23
- # ExcludedMethods: refine
24
- Metrics/BlockLength:
25
- Max: 142
26
-
27
- # Offense count: 6
28
- # Configuration parameters: CountComments.
29
- Metrics/ClassLength:
30
- Max: 196
31
-
32
- # Offense count: 11
22
+ # Offense count: 16
23
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
33
24
  Metrics/CyclomaticComplexity:
34
- Max: 14
35
-
36
- # Offense count: 61
37
- # Configuration parameters: CountComments, ExcludedMethods.
38
- Metrics/MethodLength:
39
- Max: 41
40
-
41
- # Offense count: 1
42
- # Configuration parameters: CountKeywordArgs.
43
- Metrics/ParameterLists:
44
- Max: 6
25
+ Max: 12
45
26
 
46
- # Offense count: 11
27
+ # Offense count: 13
28
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
47
29
  Metrics/PerceivedComplexity:
48
- Max: 14
30
+ Max: 12
49
31
 
50
32
  # Offense count: 1
51
33
  Naming/AccessorMethodName:
52
34
  Exclude:
53
- - 'lib/oxidized/string.rb'
35
+ - 'lib/refinements.rb'
54
36
 
55
37
  # Offense count: 8
56
38
  Naming/ConstantName:
@@ -68,10 +50,10 @@ Naming/ConstantName:
68
50
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
69
51
  Naming/MemoizedInstanceVariableName:
70
52
  Exclude:
71
- - 'lib/oxidized/string.rb'
53
+ - 'lib/refinements.rb'
72
54
 
73
- # Offense count: 14
74
- # Cop supports --auto-correct.
55
+ # Offense count: 9
56
+ # This cop supports safe autocorrection (--autocorrect).
75
57
  # Configuration parameters: PreferredName.
76
58
  Naming/RescuedExceptionsVariableName:
77
59
  Exclude:
@@ -82,23 +64,25 @@ Naming/RescuedExceptionsVariableName:
82
64
  - 'lib/oxidized/config.rb'
83
65
  - 'lib/oxidized/node.rb'
84
66
  - 'lib/oxidized/nodes.rb'
85
- - 'lib/oxidized/output/git.rb'
86
- - 'lib/oxidized/output/gitcrypt.rb'
87
67
  - 'lib/oxidized/source/sql.rb'
88
68
 
69
+ # Offense count: 2
70
+ Rake/DuplicateTask:
71
+ Exclude:
72
+ - 'Rakefile'
73
+
89
74
  # Offense count: 1
90
75
  Security/Eval:
91
76
  Exclude:
92
77
  - 'Rakefile'
93
78
 
94
- # Offense count: 4
95
- # Cop supports --auto-correct.
96
- # Configuration parameters: AutoCorrect, EnforcedStyle.
79
+ # Offense count: 3
80
+ # This cop supports unsafe autocorrection (--autocorrect-all).
81
+ # Configuration parameters: EnforcedStyle.
97
82
  # SupportedStyles: nested, compact
98
83
  Style/ClassAndModuleChildren:
99
84
  Exclude:
100
85
  - 'lib/oxidized/config/vars.rb'
101
- - 'lib/oxidized/input/telnet.rb'
102
86
  - 'lib/oxidized/nodes.rb'
103
87
 
104
88
  # Offense count: 2
@@ -106,15 +90,85 @@ Style/ClassVars:
106
90
  Exclude:
107
91
  - 'lib/oxidized.rb'
108
92
 
109
- # Offense count: 2
93
+ # Offense count: 1
94
+ # This cop supports unsafe autocorrection (--autocorrect-all).
95
+ # Configuration parameters: EnforcedStyle.
96
+ # SupportedStyles: allowed_in_returns, forbidden
110
97
  Style/DoubleNegation:
111
98
  Exclude:
112
- - 'lib/oxidized/cli.rb'
113
99
  - 'lib/oxidized/hook/exec.rb'
114
100
 
115
- # Offense count: 36
116
- # Cop supports --auto-correct.
101
+ # Offense count: 1
102
+ # This cop supports unsafe autocorrection (--autocorrect-all).
103
+ Style/GlobalStdStream:
104
+ Exclude:
105
+ - 'lib/oxidized.rb'
106
+
107
+ # Offense count: 3
108
+ Style/OpenStructUse:
109
+ Exclude:
110
+ - 'lib/oxidized/hook.rb'
111
+ - 'lib/oxidized/node.rb'
112
+ - 'spec/hook/githubrepo_spec.rb'
113
+
114
+ # Offense count: 27
115
+ # This cop supports safe autocorrection (--autocorrect).
116
+ Style/RedundantRegexpCharacterClass:
117
+ Exclude:
118
+ - 'lib/oxidized/model/axos.rb'
119
+ - 'lib/oxidized/model/comtrol.rb'
120
+ - 'lib/oxidized/model/fabricos.rb'
121
+ - 'lib/oxidized/model/ironware.rb'
122
+ - 'lib/oxidized/model/mlnxos.rb'
123
+ - 'lib/oxidized/model/nxos.rb'
124
+ - 'lib/oxidized/model/slxos.rb'
125
+ - 'lib/oxidized/model/sonicos.rb'
126
+ - 'lib/oxidized/model/speedtouch.rb'
127
+ - 'lib/oxidized/model/telco.rb'
128
+ - 'lib/oxidized/model/ucs.rb'
129
+ - 'lib/oxidized/model/voltaire.rb'
130
+ - 'lib/oxidized/model/zhoneolt.rb'
131
+ - 'lib/oxidized/model/zynoscli.rb'
132
+
133
+ # Offense count: 37
134
+ # This cop supports safe autocorrection (--autocorrect).
135
+ Style/RedundantRegexpEscape:
136
+ Exclude:
137
+ - 'lib/oxidized/model/adva.rb'
138
+ - 'lib/oxidized/model/airfiber.rb'
139
+ - 'lib/oxidized/model/aosw.rb'
140
+ - 'lib/oxidized/model/c4cmts.rb'
141
+ - 'lib/oxidized/model/dellx.rb'
142
+ - 'lib/oxidized/model/eltex.rb'
143
+ - 'lib/oxidized/model/enterasys800.rb'
144
+ - 'lib/oxidized/model/netonix.rb'
145
+ - 'lib/oxidized/model/netscaler.rb'
146
+ - 'lib/oxidized/model/openbsd.rb'
147
+ - 'lib/oxidized/model/siklu.rb'
148
+ - 'lib/oxidized/model/slxos.rb'
149
+ - 'lib/oxidized/model/sonicos.rb'
150
+ - 'lib/oxidized/model/trango.rb'
151
+
152
+ # Offense count: 45
153
+ # This cop supports safe autocorrection (--autocorrect).
117
154
  # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
118
155
  # SupportedStyles: slashes, percent_r, mixed
119
156
  Style/RegexpLiteral:
120
157
  Enabled: false
158
+
159
+ # Offense count: 31
160
+ # This cop supports unsafe autocorrection (--autocorrect-all).
161
+ Style/SlicingWithRange:
162
+ Enabled: false
163
+
164
+ # Offense count: 81
165
+ # This cop supports unsafe autocorrection (--autocorrect-all).
166
+ # Configuration parameters: Mode.
167
+ Style/StringConcatenation:
168
+ Enabled: false
169
+
170
+ # Offense count: 1
171
+ # This cop supports unsafe autocorrection (--autocorrect-all).
172
+ Style/ZeroLengthPredicate:
173
+ Exclude:
174
+ - 'lib/oxidized/core.rb'
data/CHANGELOG.md CHANGED
@@ -6,6 +6,150 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## Added
10
+
11
+ ## Changed
12
+
13
+ - Ensure Docker builds are only pushed to registry on `master` (@aschaber1)
14
+
15
+ ## Fixed
16
+
17
+ - #2749: fix issues with `cut_both`
18
+
19
+ ## [0.29.0 - 2023-04-13]
20
+
21
+ - Ensure Docker Builds are tagged with latest and version (using `git describe --tags`) (@aschaber1)
22
+ - Upgrade Dockerfile baseimage to Ubuntu 22.04 and Ruby 3.0 (@aschaber1)
23
+ - Upgrade Ruby dependency to Ruby 3.0+ (@aschaber1)
24
+ - model for PanOS & Panorama via HTTP API (@pv2b, @sts)
25
+ - model for MikroTik SwOS devicse (@sm-nessus)
26
+ - model for TrueNAS devices (@neilschelly)
27
+ - model for Acme Packet devices (@ha36d)
28
+ - model for SmartCS devise (@yoshihito-tatano)
29
+ - Cumulus: added option to use NCLU as ia collecting method
30
+ - Update net-ssh to 7.0.1 (using `append_all_supported_algorithms: true`)
31
+ - Allow (config) (vlan-####) confirmation (y/n) and sftp questions in procurve prompt (@sorano)
32
+ - Added new model called `srosmd` to backup configuration fron Nokia SR OS devices running in the model-driven CLI mode, which has different syntax to existing `sros` model.
33
+ - fix: allow Netgear devices to finish SSH session correctly
34
+ - More pager handling for MIS5030Q (@glance-)
35
+ - Update logrotate example to allow logrotate service to start before any logs exist
36
+ - Mask NX-OS tacacs+ host keys (@0x4c6565)
37
+ - airfiber: prompt matching made case-insensitive to support AF5xHD (@noaheroufus)
38
+ - Cumulus: add support for dhcp-relay (@ohai89)
39
+ - Github Action: Support creating custom version tag in a release
40
+ - Add support for no enable password set on ironware
41
+ - change pfSense secret scrubbing to keep config as well-formed XML
42
+ - Add support for comware HPE Office Connect 1950
43
+ - Added model for Hirschmann Hios devices, next to alread present Hirschmann classic (@tijldeneut)
44
+ - (StoneOS) Prompt fix for long device names, '^H' handling and removal of ever-changing data (@dMailonG)
45
+
46
+ ### Added
47
+
48
+ - install rugged with ssh in Dockerfile (@agrevtcev)
49
+ - allow to run as non-root user in Docker (@agrevtcev)
50
+ - Extend http source configurations to include read_timeout value
51
+ - model for bdcom-based fiberstore switches (@candlerb)
52
+ - enterasys800 model for enterasys 800-series fe/ge switches (@javichumellamo)
53
+ - add ES3526XA-V2 support in EdgeCOS model (@moisseev)
54
+ - model for eltex mes-series switches (@glaubway)
55
+ - model for zte c300 and c320 olt (@glaubway)
56
+ - model for LANCOM (@systeembeheerder)
57
+ - model for Aruba CX switches (@jmurphy5)
58
+ - model for FortiWLC WLAn Controller (@MrMarioMichel)
59
+ - model for NEC IX devices (@mikenowak)
60
+ - Added docs for Dell/EMC Networking OS10 devices (@davromaniak)
61
+ - model for Zyxel 1308 OLTs (@baldoarturo)
62
+ - model for Linksys SRW switches (@glance-)
63
+ - Added exec hook variables to retrieve verbose node's failure reason and type
64
+ - model for Cambium ePMP radios (@martydingo)
65
+ - Added GaiaOS support for virtual systems (@rwxd)
66
+ - Added new `group_map` configuration option (@mjbnz)
67
+ - Dockerfile rebased to phusion/baseimage-docker focal-1.2.0
68
+ - model for Lenovo Network OS (@seros1521)
69
+ - new option: use_max_threads
70
+ - model for ADVA devices (@stephrdev)
71
+ - model for YAMAHA NVR/RTX Series (@bluekirin55)
72
+ - model for ZPE Nodegrid OS (@euph333)
73
+ - model for H3C switches
74
+ - model for Cisco Catalyst Express switches (@unemongod)
75
+ - extended mysql source configuration to include tls options (@glaubway)
76
+ - updated rugged in gemspec for ruby 3.0 support (@firefishy)
77
+ - Added exec hook for MS Teams webhook (@systeembeheerder)
78
+
79
+ ### Changed
80
+
81
+ - Better manage of the enable mode in edgeswitch.rb (@agabellini)
82
+ - Adds paging support to Enterasys B3/C3 (@piterpunk)
83
+ - Allows "Username" as username prompt in Brocade ICX-series devices (@piterpunk)
84
+ - Add show-sensitive flag on export command on Mikrotik RouterOS when remove_secret is off (@kedare)
85
+ - rubocop dependency now ~> 0.81.0, the last one with ruby 2.3 support
86
+ - change pfSense secret scrubbing to handle new format in 2.4.5+
87
+ - Dockerfile rebased to phusion/baseimage-docker bionic-1.0.0
88
+ - scrub PoE related messages from routeros config output (@pioto)
89
+ - support for d-link dgs-1100 series switches in dlink model (@glaubway)
90
+ - enterasys model now works with both ro and rw access (@sargon)
91
+ - restore including last configuration change IOS if the change is done by real user. Resolves #1921 (@raunz)
92
+ - Additional scrubbing for SonicOS v7 devices (@gerard780)
93
+ - improved Telnet support for enterasys (@jplitza)
94
+ - Include "show version" output for enterasys (@jplitza)
95
+ - xmppdiff now also shows diffs with only removed or only added lines (@jplitza)
96
+ - xmppdiff now persists its connection to the XMPP server and MUC (@jplitza)
97
+ - routeros no longer backups infos on available updates (@jplitza)
98
+ - avoid /humidity hardware field in tmos (F5) to be reported (@albsga)
99
+ - read all configurations in partition folder for tmos (F5) (@dalamanster)
100
+ - version information or OPNsense and PFsense models is now included as XML comments (@pv2b)
101
+ - netscaler, backup all partitions (@smallsam)
102
+ - only runs SSH proxy commands if the ssh_proxy configuration item has been defined (@jameskirsop)
103
+ - updated vrp.rb to correctly parse huawei devices
104
+ - asa: information about the configuration change time is deleted
105
+ - Extended groups configuration to support models vars within a group (@mjbnz)
106
+ - Extended `remote_repo` configuration to allow repo specific ssh keys (@mjbnz)
107
+ - sonicos: added scrubbing for hashed values (@televat0rs)
108
+ - nxos: Additional scrubbing for nxos device passwords (@derekivey)
109
+ - nxos: Fix password match to avoid stripping out the user role. (@derekivey)
110
+ - OpenBSD: Include bgpd, ospfd and ospf6d files (@woopstar)
111
+ - scrub often changing values in junos license output (@matejv)
112
+ - comware: support for enable(super) login password added (@delvta)
113
+ - use slack-ruby-client instead of slack-api for slackdiff hook (@0xmc)
114
+ - ios: Add support for RBAC in IOS model (@jameskirsop)
115
+ - hide unsupported-transceiver license key in Arista EOS (@davidc)
116
+ - edgecos: add support for FS S3900-48T6S-R (@cgsecurity)
117
+
118
+ ### Fixed
119
+
120
+ - fixed an issue for IOSXR devices which can't allocate pty because of problem with forwarding agent.
121
+ - fixed an issue with the TrueNAS model where the configuration would come up blank when TrueNAS was also using it. (@neilschelly)
122
+ - fixed on issue where Oxidized could not pull config from Opengear devices #1899 (@rikard0)
123
+ - fixed an issue where Oxidized could not pull config from XOS-devices operating in stacked mode (@DarkCatapulter)
124
+ - fixed an issue where Oxidized could not pull config from XOS-devices that have not saved their configuration (@DarkCatapulter)
125
+ - improved scrubbing of show chassis in ironware model (@michaelpsomiadis)
126
+ - fixed snmp secret handling in netgear model (@CirnoT)
127
+ - generalise fortiOS to support new versions and VM based products e.g. FortiManager, FortiAnalyzer and FortiMail, which requires keyboard-interactive auth method. Includes trial-and-error cmd list to retrieve most infromative config. Fixes #2227. Moved 'system ha status' to 'config global' section to support clusters with virtual domains.
128
+ - filter next periodic save schedule time in xos model output (@sargon)
129
+ - Fix when auto-saved is configured on xos switches (@trappiz)
130
+ - fixed ArubaOS-CX enviroment/system inconsistent values #2297 (@raunz)
131
+ - further improvements to ArubaOS-CX environment values (@olemyhre)
132
+ - Update AirFiber prompt regex (@murrant)
133
+ - System time and running time are now stripped from tplink model output (@spike77453)
134
+ - <?xml... line is no longer improperly stripped from OPNsense and PFsense backups (@pv2b)
135
+ - fixed an issue where Oxidized timeouts in Brocade ICX-series devices (@piterpunk)
136
+ - fixed an issue where EOS config was truncated. Fixes #2038 (@jake2184 @fhibler)
137
+ - fixed missing output from routeros version command (@mjbnz)
138
+ - stopped `clear: true` from removing all commands (@mjbnz)
139
+ - Updated fastiron enable password prompt regex (@pepperoni-pi)
140
+ - fixed an issue where the pfsense model would not report errors in case it was unable to download the configuration e.g. due to insufficient permissions
141
+ - added a missing check for whether to send `enable` commands to Adtran devices (@repnop)
142
+ - fixed an issue where ADVA devices with a configured prompt != `ADVA-->` couldn't be polled (@momorientes)
143
+ - ensure local time and system up time are filtered for ADVA devices (@stephrdev)
144
+ - fixed an issue with FortiOS that didn't accurately match `set ca` lines #2567 (@neilschelly)
145
+ - removed unwanted current date from slxos model
146
+ - fixed secret handling for rip authentication in casa model #2648 (@grahamjohnston)
147
+ - stripped IoT-detect version for Fortigate devices
148
+ - Fix expect usage in models on telnet. Tested with Netgear GS108T. (@arrjay)
149
+ - Fix Sonicwall SonicOS "system-uptime" omission from log (@lazynooblet)
150
+ - purityos: at least v6.3.5 needs other terminal settings (@elliot64)
151
+ - purityos: remove purealerts and VEEAM snapshots from backed up config (@elliot64)
152
+
9
153
  ## [0.28.0 - 2020-05-18]
10
154
 
11
155
  ### Added
@@ -40,7 +184,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
40
184
  - fortios model strips uptime even without remove_secrets (@jplitza)
41
185
  - HP ProCurve now accepts ">" as apart of the prompt (@magnuslarsen)
42
186
  - fix IOS SNMP notification community hiding for informs and v3 (@moisseev)
43
- - fixed issue where the regex-pattern for XOS-prompts used invalid syntax (@darkcatapulter)
187
+ - fixed issue where the regex-pattern for XOS-prompts used invalid syntax (@DarkCatapulter)
188
+ - set terminal width in EdgeCOS model (@moisseev)
189
+ - suppress errors for commands that are not supported on some devices in EdgeCOS model (@moisseev)
190
+ - revert including command names in the output of the EdgeCOS model (@moisseev)
44
191
 
45
192
  ## [0.27.0] - 2019-10-27
46
193
 
@@ -392,7 +539,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
392
539
 
393
540
  ### Fixed
394
541
 
395
- - debugging, tests (by @ElvinEfendi)
542
+ - debugging, tests (by @ElvinEfendi)
396
543
  - nos, panos, acos, procurve, eos, edgeswitch, aosw, fortios updates
397
544
 
398
545
  ## [0.14.3] - 2016-05-25