oxidized 0.29.0 → 0.29.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) 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 +3 -1
  5. data/.github/workflows/stale.yml +16 -0
  6. data/.rubocop_todo.yml +3 -3
  7. data/CHANGELOG.md +10 -0
  8. data/Dockerfile +2 -0
  9. data/README.md +3 -6
  10. data/docs/Creating-Models.md +14 -15
  11. data/docs/Ruby-API.md +12 -8
  12. data/lib/oxidized/model/acmepacket.rb +2 -0
  13. data/lib/oxidized/model/acos.rb +3 -1
  14. data/lib/oxidized/model/acsw.rb +2 -0
  15. data/lib/oxidized/model/adtran.rb +2 -0
  16. data/lib/oxidized/model/adva.rb +2 -0
  17. data/lib/oxidized/model/aen.rb +2 -0
  18. data/lib/oxidized/model/aireos.rb +2 -0
  19. data/lib/oxidized/model/airfiber.rb +2 -0
  20. data/lib/oxidized/model/airos.rb +2 -0
  21. data/lib/oxidized/model/alteonos.rb +2 -0
  22. data/lib/oxidized/model/alvarion.rb +2 -0
  23. data/lib/oxidized/model/aos.rb +2 -0
  24. data/lib/oxidized/model/aos7.rb +2 -0
  25. data/lib/oxidized/model/aoscx.rb +2 -0
  26. data/lib/oxidized/model/aosw.rb +3 -1
  27. data/lib/oxidized/model/apc_aos.rb +2 -0
  28. data/lib/oxidized/model/arbos.rb +2 -0
  29. data/lib/oxidized/model/aricentiss.rb +2 -0
  30. data/lib/oxidized/model/asa.rb +2 -0
  31. data/lib/oxidized/model/asyncos.rb +2 -0
  32. data/lib/oxidized/model/audiocodes.rb +2 -0
  33. data/lib/oxidized/model/audiocodesmp.rb +2 -0
  34. data/lib/oxidized/model/awplus.rb +2 -0
  35. data/lib/oxidized/model/axos.rb +2 -0
  36. data/lib/oxidized/model/bdcom.rb +2 -0
  37. data/lib/oxidized/model/boss.rb +3 -1
  38. data/lib/oxidized/model/br6910.rb +2 -0
  39. data/lib/oxidized/model/c4cmts.rb +2 -0
  40. data/lib/oxidized/model/cambium.rb +2 -0
  41. data/lib/oxidized/model/cambiumepmp.rb +2 -0
  42. data/lib/oxidized/model/casa.rb +2 -0
  43. data/lib/oxidized/model/catos.rb +2 -0
  44. data/lib/oxidized/model/ciscoce.rb +2 -0
  45. data/lib/oxidized/model/cisconga.rb +2 -0
  46. data/lib/oxidized/model/ciscosma.rb +2 -0
  47. data/lib/oxidized/model/ciscosmb.rb +2 -0
  48. data/lib/oxidized/model/ciscovpn3k.rb +2 -0
  49. data/lib/oxidized/model/cnos.rb +2 -0
  50. data/lib/oxidized/model/comnetms.rb +2 -0
  51. data/lib/oxidized/model/comtrol.rb +2 -0
  52. data/lib/oxidized/model/comware.rb +1 -0
  53. data/lib/oxidized/model/coriant8600.rb +2 -0
  54. data/lib/oxidized/model/coriantgroove.rb +2 -0
  55. data/lib/oxidized/model/corianttmos.rb +2 -0
  56. data/lib/oxidized/model/cumulus.rb +2 -0
  57. data/lib/oxidized/model/datacom.rb +2 -0
  58. data/lib/oxidized/model/dcnos.rb +2 -0
  59. data/lib/oxidized/model/dellx.rb +2 -0
  60. data/lib/oxidized/model/dlink.rb +2 -0
  61. data/lib/oxidized/model/dnos.rb +2 -0
  62. data/lib/oxidized/model/eciapollo.rb +2 -0
  63. data/lib/oxidized/model/edgecos.rb +2 -0
  64. data/lib/oxidized/model/edgeos.rb +2 -0
  65. data/lib/oxidized/model/edgeswitch.rb +2 -0
  66. data/lib/oxidized/model/eltex.rb +2 -0
  67. data/lib/oxidized/model/enterasys.rb +2 -0
  68. data/lib/oxidized/model/enterasys800.rb +2 -0
  69. data/lib/oxidized/model/eos.rb +2 -0
  70. data/lib/oxidized/model/fabricos.rb +2 -0
  71. data/lib/oxidized/model/fastiron.rb +2 -0
  72. data/lib/oxidized/model/fiberdriver.rb +2 -0
  73. data/lib/oxidized/model/firebrick.rb +2 -0
  74. data/lib/oxidized/model/firelinuxos.rb +2 -0
  75. data/lib/oxidized/model/firewareos.rb +2 -0
  76. data/lib/oxidized/model/fortios.rb +2 -0
  77. data/lib/oxidized/model/fortiwlc.rb +2 -0
  78. data/lib/oxidized/model/ftos.rb +2 -0
  79. data/lib/oxidized/model/fujitsupy.rb +2 -0
  80. data/lib/oxidized/model/gaiaos.rb +2 -0
  81. data/lib/oxidized/model/gcombnps.rb +2 -0
  82. data/lib/oxidized/model/grandstream.rb +2 -0
  83. data/lib/oxidized/model/h3c.rb +2 -0
  84. data/lib/oxidized/model/hatteras.rb +2 -0
  85. data/lib/oxidized/model/hios.rb +2 -0
  86. data/lib/oxidized/model/hirschmann.rb +2 -0
  87. data/lib/oxidized/model/hpebladesystem.rb +2 -0
  88. data/lib/oxidized/model/hpemsa.rb +2 -0
  89. data/lib/oxidized/model/hpmsm.rb +2 -0
  90. data/lib/oxidized/model/ibos.rb +2 -0
  91. data/lib/oxidized/model/icotera.rb +2 -0
  92. data/lib/oxidized/model/ios.rb +2 -0
  93. data/lib/oxidized/model/iosxr.rb +2 -0
  94. data/lib/oxidized/model/ipos.rb +2 -0
  95. data/lib/oxidized/model/ironware.rb +2 -0
  96. data/lib/oxidized/model/isam.rb +2 -0
  97. data/lib/oxidized/model/junos.rb +2 -0
  98. data/lib/oxidized/model/lancom.rb +2 -0
  99. data/lib/oxidized/model/lenovonos.rb +2 -0
  100. data/lib/oxidized/model/linksyssrw.rb +2 -0
  101. data/lib/oxidized/model/linuxgeneric.rb +2 -0
  102. data/lib/oxidized/model/masteros.rb +2 -0
  103. data/lib/oxidized/model/mlnxos.rb +2 -0
  104. data/lib/oxidized/model/model.rb +6 -5
  105. data/lib/oxidized/model/mtrlrfs.rb +2 -0
  106. data/lib/oxidized/model/ndms.rb +3 -1
  107. data/lib/oxidized/model/necix.rb +2 -0
  108. data/lib/oxidized/model/netgear.rb +2 -0
  109. data/lib/oxidized/model/netonix.rb +2 -0
  110. data/lib/oxidized/model/netscaler.rb +2 -0
  111. data/lib/oxidized/model/nodegrid.rb +2 -0
  112. data/lib/oxidized/model/nos.rb +2 -0
  113. data/lib/oxidized/model/nsxconfig.rb +2 -0
  114. data/lib/oxidized/model/nsxfirewall.rb +2 -0
  115. data/lib/oxidized/model/nxos.rb +2 -0
  116. data/lib/oxidized/model/oneos.rb +2 -0
  117. data/lib/oxidized/model/openbsd.rb +2 -0
  118. data/lib/oxidized/model/opengear.rb +2 -0
  119. data/lib/oxidized/model/openwrt.rb +2 -0
  120. data/lib/oxidized/model/opnsense.rb +2 -0
  121. data/lib/oxidized/model/os10.rb +2 -0
  122. data/lib/oxidized/model/outputs.rb +2 -0
  123. data/lib/oxidized/model/panos.rb +2 -0
  124. data/lib/oxidized/model/panos_api.rb +2 -0
  125. data/lib/oxidized/model/pfsense.rb +2 -0
  126. data/lib/oxidized/model/planet.rb +2 -0
  127. data/lib/oxidized/model/powerconnect.rb +2 -0
  128. data/lib/oxidized/model/procurve.rb +2 -0
  129. data/lib/oxidized/model/purityos.rb +2 -0
  130. data/lib/oxidized/model/qtech.rb +2 -0
  131. data/lib/oxidized/model/quantaos.rb +2 -0
  132. data/lib/oxidized/model/raisecom.rb +2 -0
  133. data/lib/oxidized/model/routeros.rb +2 -0
  134. data/lib/oxidized/model/saos.rb +2 -0
  135. data/lib/oxidized/model/screenos.rb +2 -0
  136. data/lib/oxidized/model/sgos.rb +2 -0
  137. data/lib/oxidized/model/siklu.rb +2 -0
  138. data/lib/oxidized/model/slxos.rb +2 -0
  139. data/lib/oxidized/model/smartax.rb +2 -0
  140. data/lib/oxidized/model/smartcs.rb +2 -0
  141. data/lib/oxidized/model/sonicos.rb +2 -0
  142. data/lib/oxidized/model/speedtouch.rb +2 -0
  143. data/lib/oxidized/model/sros.rb +3 -1
  144. data/lib/oxidized/model/srosmd.rb +2 -0
  145. data/lib/oxidized/model/stoneos.rb +2 -0
  146. data/lib/oxidized/model/swos.rb +2 -0
  147. data/lib/oxidized/model/tdre.rb +2 -0
  148. data/lib/oxidized/model/telco.rb +2 -0
  149. data/lib/oxidized/model/tmos.rb +3 -1
  150. data/lib/oxidized/model/tplink.rb +2 -0
  151. data/lib/oxidized/model/trango.rb +2 -0
  152. data/lib/oxidized/model/truenas.rb +2 -0
  153. data/lib/oxidized/model/ucs.rb +2 -0
  154. data/lib/oxidized/model/viptela.rb +2 -0
  155. data/lib/oxidized/model/voltaire.rb +2 -0
  156. data/lib/oxidized/model/voss.rb +2 -0
  157. data/lib/oxidized/model/vrp.rb +2 -0
  158. data/lib/oxidized/model/vyatta.rb +2 -0
  159. data/lib/oxidized/model/weos.rb +2 -0
  160. data/lib/oxidized/model/xos.rb +2 -0
  161. data/lib/oxidized/model/yamaha.rb +2 -0
  162. data/lib/oxidized/model/zhoneolt.rb +2 -0
  163. data/lib/oxidized/model/zteolt.rb +2 -0
  164. data/lib/oxidized/model/zy1308.rb +2 -0
  165. data/lib/oxidized/model/zynos.rb +2 -0
  166. data/lib/oxidized/model/zynoscli.rb +2 -0
  167. data/lib/oxidized/model/zynosgs.rb +2 -0
  168. data/lib/oxidized/output/git.rb +2 -1
  169. data/lib/oxidized/version.rb +2 -2
  170. data/lib/oxidized.rb +1 -1
  171. data/lib/refinements.rb +43 -0
  172. metadata +6 -4
  173. data/.github/no-response.yml +0 -13
  174. data/lib/oxidized/string.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dfae187ce90fc83fde6d62b7044eac15ca5a803aa05f2064d99ffe04aea938d
4
- data.tar.gz: d5de2f1a1770c966168ed3385623376f5d335461a6c9403a1ef44bfcbc504a57
3
+ metadata.gz: d5f60756df10959016092e920b8d30c1752a54c902c25dd5753f73cf9982dbbe
4
+ data.tar.gz: 32e8b6918df95cc21e0a7cdcfb2934385f362a70f5035c70a2271390254826d7
5
5
  SHA512:
6
- metadata.gz: '0515586ff98c993834c1aaf40638e8078fb55fa44b120ceffd0c7164216b4307eb6b39145fbff0aeb0d11519f3ee10d2fb82fea73498e243808f2e0eda130e39'
7
- data.tar.gz: 6afbfb306289a65a8c89799a87b920880547c06e0372f56bbbbafd5b4e85d13d452de5e1593eb2c13320d830a04159dd1046ec4c93e0a20ee7bca2669ac79b53
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,5 +1,7 @@
1
1
  name: Publish Docker
2
- on: [push]
2
+ on:
3
+ push:
4
+ branches: [ "master" ]
3
5
  jobs:
4
6
  build:
5
7
  if: github.repository_owner == 'ytti'
@@ -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_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-04-03 06:53:54 UTC using RuboCop version 1.48.1.
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
@@ -32,7 +32,7 @@ Metrics/PerceivedComplexity:
32
32
  # Offense count: 1
33
33
  Naming/AccessorMethodName:
34
34
  Exclude:
35
- - 'lib/oxidized/string.rb'
35
+ - 'lib/refinements.rb'
36
36
 
37
37
  # Offense count: 8
38
38
  Naming/ConstantName:
@@ -50,7 +50,7 @@ Naming/ConstantName:
50
50
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
51
51
  Naming/MemoizedInstanceVariableName:
52
52
  Exclude:
53
- - 'lib/oxidized/string.rb'
53
+ - 'lib/refinements.rb'
54
54
 
55
55
  # Offense count: 9
56
56
  # This cop supports safe autocorrection (--autocorrect).
data/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ 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
+
9
19
  ## [0.29.0 - 2023-04-13]
10
20
 
11
21
  - Ensure Docker Builds are tagged with latest and version (using `git describe --tags`) (@aschaber1)
data/Dockerfile CHANGED
@@ -22,6 +22,8 @@ WORKDIR /tmp/oxidized
22
22
 
23
23
  # docker automated build gets shallow copy, but non-shallow copy cannot be unshallowed
24
24
  RUN git fetch --unshallow || true
25
+
26
+ # Ensure rugged is built with ssh support
25
27
  RUN CMAKE_FLAGS='-DUSE_SSH=ON' rake install
26
28
 
27
29
  # web interface
data/README.md CHANGED
@@ -220,12 +220,9 @@ services:
220
220
  environment:
221
221
  CONFIG_RELOAD_INTERVAL: 600
222
222
  volumes:
223
- - config:/home/oxidized/.config/oxidized/config
224
- - router.db:/home/oxidized/.config/oxidized/router.db
225
- - model:/home/oxidized/.config/oxidized/model
226
- # if git is use as input
227
- - data:/home/oxidized/.config/oxidized/backupcfg/
228
-
223
+ - config:/home/oxidized/.config/oxidized/
224
+ volumes:
225
+ config:
229
226
  ```
230
227
 
231
228
  Create the `/etc/oxidized/router.db` (see [CSV Source](docs/Sources.md#source-csv) for further info):
@@ -18,6 +18,7 @@ A bare-bone example for a fictional model running the OS type `rootware` could b
18
18
 
19
19
  ```ruby
20
20
  class RootWare < Oxidized::Model
21
+ using Refinements
21
22
 
22
23
  cmd 'show complete-config'
23
24
  ```
@@ -50,11 +51,11 @@ require 'oxidized/model/junos.rb'
50
51
 
51
52
 
52
53
  class JunOS
54
+ using Refinements
53
55
 
54
-
55
- cmd 'show interfaces diagnostics optics' do |cfg|
56
- comment cfg
57
- end
56
+ cmd 'show interfaces diagnostics optics' do |cfg|
57
+ comment cfg
58
+ end
58
59
 
59
60
 
60
61
  end
@@ -92,19 +93,17 @@ require 'oxidized/model/junos.rb'
92
93
 
93
94
 
94
95
  class JunOS
96
+ using Refinements
95
97
 
98
+ cmd 'show interface diagnostic optics' do |cfg|
99
+ comment cfg
100
+ end
96
101
 
97
- cmd 'show interface diagnostic optics' do |cfg|
98
- comment cfg
99
- end
100
-
101
- cmd 'show configuration | display set' do |cfg|
102
- cfg.type = "junos-set"
103
- cfg.name = "set"
104
- cfg
105
- end
106
-
107
-
102
+ cmd 'show configuration | display set' do |cfg|
103
+ cfg.type = "junos-set"
104
+ cfg.name = "set"
105
+ cfg
106
+ end
108
107
  end
109
108
  ```
110
109
 
data/docs/Ruby-API.md CHANGED
@@ -8,12 +8,14 @@ The following objects exist in Oxidized.
8
8
  * must implement 'connect', 'get', 'cmd'
9
9
  * 'ssh', 'telnet', 'ftp', 'tftp', 'http' implemented
10
10
 
11
- #### http
12
- * Communicates with a device over http/https
13
- * Configurable variables from within model @username, @password, @headers.
14
- * @username,@password are used in a Basic Authentication method.
15
- * @headers is a Hash of key value pairs of headers to pass along with the request.
16
- * Within the sources config under input you define a YAML stanza like the below, this will tell Oxidized to validate certificates on the request
11
+ ### http
12
+
13
+ * Communicates with a device over http/https
14
+ * Configurable variables from within model @username, @password, @headers.
15
+ * @username,@password are used in a Basic Authentication method.
16
+ * @headers is a Hash of key value pairs of headers to pass along with the request.
17
+ * Within the sources config under input you define a YAML stanza like the below, this will tell Oxidized to validate certificates on the request
18
+
17
19
  ```yaml
18
20
  input:
19
21
  http:
@@ -177,10 +179,12 @@ Resets the existing block, allowing the user to completely override its contents
177
179
  Ensures that the contents of the block are prepended, rather than appended (the
178
180
  default) to an existing block.
179
181
 
180
- ### `String` convenience methods
182
+ ### Refinements
183
+
184
+ #### `String` convenience methods
181
185
 
182
186
  Since configuration processing tasks are occasionally similar across models,
183
- Oxidized provides an extended [`String`](/lib/oxidized/string.rb) class with the
187
+ Oxidized provides an refined [`String`](../lib/refinements.rb) class with the
184
188
  intention of providing convenience methods and eliminating code duplication.
185
189
 
186
190
  #### `cut_tail`
@@ -1,4 +1,6 @@
1
1
  class ACMEPACKET < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Oracle ACME Packet 3k, 4k, 6k series
3
5
 
4
6
  prompt /^\r*([\w.@()-\/]+[#>]\s?)$/
@@ -1,7 +1,9 @@
1
1
  class ACOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # A10 ACOS model for AX and Thunder series
3
5
 
4
- comment '! '
6
+ comment '! '
5
7
 
6
8
  # ACOS prompt changes depending on the state of the device
7
9
  prompt /^([-\w.\/:?\[\]()]+[#>]\s?)$/
@@ -1,4 +1,6 @@
1
1
  class ACSW < Oxidized::Model
2
+ using Refinements
3
+
2
4
  prompt /([\w.@()\/\\-]+[#>]\s?)/
3
5
  comment '! '
4
6
 
@@ -1,4 +1,6 @@
1
1
  class Adtran < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Adtran
3
5
 
4
6
  prompt /([\w.@-]+[#>]\s?)$/
@@ -4,6 +4,8 @@
4
4
  # for the user that is used to fetch the configuration.
5
5
 
6
6
  class ADVA < Oxidized::Model
7
+ using Refinements
8
+
7
9
  prompt /\w+\-+[#>]\s?$/
8
10
  comment '# '
9
11
 
@@ -1,4 +1,6 @@
1
1
  class AEN < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Accedian
3
5
 
4
6
  comment '# '
@@ -1,4 +1,6 @@
1
1
  class Aireos < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # AireOS (at least I think that is what it's called, hard to find data)
3
5
  # Used in Cisco WLC 5500
4
6
 
@@ -1,4 +1,6 @@
1
1
  class Airfiber < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Ubiquiti Airfiber (tested with Airfiber 11FX)
3
5
 
4
6
  prompt /^AF[\w\.-]+#/i
@@ -1,4 +1,6 @@
1
1
  class Airos < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Ubiquiti AirOS circa 5.x
3
5
 
4
6
  prompt /^[^#]+# /
@@ -1,4 +1,6 @@
1
1
  class ALTEONOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  prompt /^\(?.+\)?\s?[#>]/
3
5
 
4
6
  comment '! '
@@ -1,4 +1,6 @@
1
1
  class Alvarion < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Used in Alvarion wisp equipment
3
5
 
4
6
  # Run this command as an instance of Model so we can access node
@@ -1,4 +1,6 @@
1
1
  class AOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Alcatel-Lucent Operating System
3
5
  # used in OmniSwitch
4
6
 
@@ -1,4 +1,6 @@
1
1
  class AOS7 < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Alcatel-Lucent Operating System Version 7 (Linux based)
3
5
  # used in OmniSwitch 6900/10k
4
6
 
@@ -1,4 +1,6 @@
1
1
  class Aoscx < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # previous command is repeated followed by "\eE", which sometimes ends up on last line
3
5
  # ssh switches prompt may start with \r, followed by the prompt itself, regex ([\w\s.-]+[#>] ), which ends the line
4
6
  # telnet switchs may start with various vt100 control characters, regex (\e\[24;[0-9][hH]), follwed by the prompt, followed
@@ -1,4 +1,6 @@
1
1
  class AOSW < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # AOSW Aruba Wireless, IAP, Instant Controller and Mobility Access Switches
3
5
  # Used in Alcatel OAW-4750 WLAN controller
4
6
  # Also Dell controllers
@@ -9,7 +11,7 @@ class AOSW < Oxidized::Model
9
11
  # Support for Mobility Access Switches tested with S2500-48P & S2500-24P running 7.4.1.4_54199 and S2500-24P running 7.4.1.7_57823
10
12
  # All IAPs connected to a Instant Controller will have the same config output. Only the controller needs to be monitored.
11
13
 
12
- comment '# '
14
+ comment '# '
13
15
  prompt /^([\w\(:.@-]+(\)?\s?)[#>]\s?)$/
14
16
 
15
17
  cmd :all do |cfg|
@@ -1,4 +1,6 @@
1
1
  class Apc_aos < Oxidized::Model # rubocop:disable Naming/ClassAndModuleCamelCase
2
+ using Refinements
3
+
2
4
  cmd 'config.ini' do |cfg|
3
5
  cfg.gsub! /^; Configuration file, generated on.*/, ''
4
6
  end
@@ -1,4 +1,6 @@
1
1
  class ARBOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Arbor OS model #
3
5
 
4
6
  prompt /^[\S\s]+\n([\w.@-]+[:\/#>]+)\s?$/
@@ -4,6 +4,8 @@
4
4
  # 0 SSE-G48-TG4 (P2-01) 1.0.16-9
5
5
 
6
6
  class AricentISS < Oxidized::Model
7
+ using Refinements
8
+
7
9
  prompt /^(\e\[27m)?[ \r]*[\w-]+# ?$/
8
10
 
9
11
  cfg :ssh do
@@ -1,4 +1,6 @@
1
1
  class ASA < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Cisco ASA model #
3
5
  # Only SSH supported for the sake of security
4
6
 
@@ -1,4 +1,6 @@
1
1
  class AsyncOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # ESA prompt "(mail.example.com)> " or "mail.example.com> "
3
5
  prompt /^\r*([(]?[\w. ]+[)]?[#>]\s+)$/
4
6
  comment '! '
@@ -1,4 +1,6 @@
1
1
  class AudioCodes < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Pull config from AudioCodes Mediant devices from version > 7.0
3
5
 
4
6
  prompt /^\r?([\w.@() -]+[#>]\s?)$/
@@ -1,4 +1,6 @@
1
1
  class AudioCodesMP < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # AudioCodes MediaPack MP1xx and Mediant 1000 devices (firmware v4.xx, v5.xx, v6.xx) by pedjajks@gmail.com
3
5
 
4
6
  prompt /^\/\w*>/
@@ -1,4 +1,6 @@
1
1
  class AWPlus < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Allied Telesis Alliedware Plus Model#
3
5
  # https://www.alliedtelesis.com/products/software/AlliedWare-Plus
4
6
 
@@ -1,4 +1,6 @@
1
1
  class AxOS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  prompt /(\x1b\[\?7h)?([\w.@()-]+[#]\s?)$/
3
5
  comment '! '
4
6
 
@@ -1,4 +1,6 @@
1
1
  class BDCOM < Oxidized::Model
2
+ using Refinements
3
+
2
4
  comment '! '
3
5
 
4
6
  cmd :secret do |cfg|
@@ -1,11 +1,13 @@
1
1
  class Boss < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Extreme Baystack Operating System Software(BOSS)
3
5
  # Created by danielcoxman@gmail.com
4
6
  # May 15, 2017
5
7
  # This was tested on ers3510, ers5530, ers4850, ers5952
6
8
  # ssh and telnet were tested with banner and without
7
9
 
8
- comment '! '
10
+ comment '! '
9
11
 
10
12
  prompt /^[^\s#>]+[#>]$/
11
13
 
@@ -1,4 +1,6 @@
1
1
  class BR6910 < Oxidized::Model
2
+ using Refinements
3
+
2
4
  prompt /^([\w.@()-]+[#>]\s?)$/
3
5
  comment '! '
4
6
 
@@ -1,4 +1,6 @@
1
1
  class C4CMTS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Arris C4 CMTS
3
5
 
4
6
  prompt /^([\w.@:\/-]+[#>]\s?)$/
@@ -1,4 +1,6 @@
1
1
  class Cambium < Oxidized::Model
2
+ using Refinements
3
+
2
4
  cfg_cb = lambda do
3
5
  c_page = @m.click @m_page.link_with(text: "Configuration")
4
6
  u_page = @m.click c_page.link_with(text: "Unit Settings")
@@ -1,4 +1,6 @@
1
1
  class CambiumePMP < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Cambium ePMP Radios
3
5
 
4
6
  prompt /.*>/
@@ -1,4 +1,6 @@
1
1
  class Casa < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Casa Systems CMTS
3
5
 
4
6
  prompt /^([\w.@()-]+[#>]\s?)$/
@@ -1,4 +1,6 @@
1
1
  class Catos < Oxidized::Model
2
+ using Refinements
3
+
2
4
  prompt /^[\w.@-]+>\s?(\(enable\) )?$/
3
5
  comment '# '
4
6
 
@@ -1,5 +1,7 @@
1
1
  # Supporting Cisco Catalyst Express Switches and IOS using the basic web interface
2
2
  class CiscoCE < Oxidized::Model
3
+ using Refinements
4
+
3
5
  cmd "/level/15/exec/-/show/startup-config" do |cfg|
4
6
  output = cfg.gsub(/\A.+<DL>(.+)<\/DL>.+\z/m, '\1') # Strip configuration file from within HTML response.
5
7
  output
@@ -1,4 +1,6 @@
1
1
  class CiscoNGA < Oxidized::Model
2
+ using Refinements
3
+
2
4
  comment '# '
3
5
  prompt /([\w.@-]+[#>]\s?)$/
4
6
 
@@ -1,4 +1,6 @@
1
1
  class CiscoSMA < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # SMA prompt "mail.example.com> "
3
5
  prompt /^\r*([-\w. ]+\.[-\w. ]+\.[-\w. ]+[#>]\s+)$/
4
6
  comment '! '
@@ -1,4 +1,6 @@
1
1
  class CiscoSMB < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Cisco Small Business 300, 500, and ESW2 series switches
3
5
  # http://www.cisco.com/c/en/us/support/switches/small-business-300-series-managed-switches/products-release-notes-list.html
4
6
 
@@ -1,4 +1,6 @@
1
1
  class CiscoVPN3k < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Used in Cisco VPN3000 concentrators
3
5
  # it have buggy code 227 reply with whitespace before trailing bracket
4
6
  # "227 Passive mode OK (172,16,0,9,4,9 )"
@@ -1,5 +1,7 @@
1
1
  # model for Centec Networks CNOS based switches
2
2
  class CNOS < Oxidized::Model
3
+ using Refinements
4
+
3
5
  comment '! '
4
6
 
5
7
  cmd :all do |cfg|
@@ -1,4 +1,6 @@
1
1
  class ComnetMS < Oxidized::Model
2
+ using Refinements
3
+
2
4
  # Comnet Microsemi Switch
3
5
  prompt /^\r?([\w.@()-]+[#>]\s?)$/
4
6
  comment '! '