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.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +30 -4
- data/.github/ISSUE_TEMPLATE/feature_request.md +10 -3
- data/.github/ISSUE_TEMPLATE/support-request.md +30 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +3 -1
- data/.github/workflows/codeql.yml +4 -4
- data/.github/workflows/publishdocker.yml +2 -2
- data/.github/workflows/ruby.yml +10 -3
- data/.github/workflows/stale.yml +1 -1
- data/.rubocop_todo.yml +2 -8
- data/AGENTS.md +174 -0
- data/CHANGELOG.md +101 -0
- data/CONTRIBUTING.md +78 -44
- data/Dockerfile +8 -4
- data/README.md +8 -1
- data/docs/Creating-Models.md +5 -5
- data/docs/DeviceSimulation.md +80 -51
- data/docs/Docker.md +49 -0
- data/docs/Inputs.md +81 -5
- data/docs/Issues.md +49 -13
- data/docs/Model-Notes/FTD.md +64 -0
- data/docs/Model-Notes/HPEAruba.md +5 -0
- data/docs/Model-Notes/ITMGOS.md +40 -0
- data/docs/Model-Notes/PanOS_API.md +20 -1
- data/docs/Model-Notes/TPLink.md +75 -0
- data/docs/Outputs.md +1 -0
- data/docs/Release.md +43 -21
- data/docs/Ruby-API.md +231 -9
- data/docs/Supported-OS-Types.md +10 -5
- data/docs/Troubleshooting.md +8 -9
- data/extra/device2yaml.rb +21 -5
- data/extra/hooks/modelrulesadvanced.rb +2 -3
- data/extra/oxidized.service +0 -1
- data/extra/syslog.rb +1 -1
- data/lib/oxidized/cli/support.rb +4 -7
- data/lib/oxidized/config/vars.rb +2 -1
- data/lib/oxidized/core.rb +20 -0
- data/lib/oxidized/hook/ciscosparkdiff.rb +1 -1
- data/lib/oxidized/hook/slackdiff.rb +1 -1
- data/lib/oxidized/hook/xmppdiff.rb +2 -2
- data/lib/oxidized/input/cli.rb +14 -2
- data/lib/oxidized/input/http.rb +22 -7
- data/lib/oxidized/input/scp.rb +3 -1
- data/lib/oxidized/input/sshbase.rb +43 -12
- data/lib/oxidized/input/telnet.rb +2 -2
- data/lib/oxidized/model/acos.rb +2 -2
- data/lib/oxidized/model/acsw.rb +1 -1
- data/lib/oxidized/model/adtran.rb +1 -1
- data/lib/oxidized/model/aireos.rb +3 -3
- data/lib/oxidized/model/aoscx.rb +7 -3
- data/lib/oxidized/model/aosw.rb +8 -13
- data/lib/oxidized/model/arbos.rb +1 -1
- data/lib/oxidized/model/aricentiss.rb +1 -1
- data/lib/oxidized/model/asa.rb +1 -1
- data/lib/oxidized/model/asternos.rb +1 -1
- data/lib/oxidized/model/audiocodesmp.rb +1 -1
- data/lib/oxidized/model/awplus.rb +4 -3
- data/lib/oxidized/model/bdcom.rb +1 -1
- data/lib/oxidized/model/br6910.rb +1 -1
- data/lib/oxidized/model/c4cmts.rb +1 -1
- data/lib/oxidized/model/ciscosmb.rb +0 -1
- data/lib/oxidized/model/cnos.rb +10 -1
- data/lib/oxidized/model/comnetms.rb +1 -1
- data/lib/oxidized/model/coriantgroove.rb +1 -1
- data/lib/oxidized/model/dellx.rb +1 -1
- data/lib/oxidized/model/dlink.rb +1 -1
- data/lib/oxidized/model/dlinknextgen.rb +1 -1
- data/lib/oxidized/model/dnos.rb +2 -2
- data/lib/oxidized/model/eatonnetwork.rb +33 -32
- data/lib/oxidized/model/eciapollo.rb +1 -1
- data/lib/oxidized/model/edgeos.rb +3 -3
- data/lib/oxidized/model/enterasys.rb +1 -1
- data/lib/oxidized/model/eos.rb +1 -0
- data/lib/oxidized/model/fastiron.rb +10 -1
- data/lib/oxidized/model/fiberdriver.rb +1 -1
- data/lib/oxidized/model/firelinuxos.rb +1 -1
- data/lib/oxidized/model/fortigate.rb +15 -2
- data/lib/oxidized/model/fortios.rb +1 -1
- data/lib/oxidized/model/ftd.rb +183 -0
- data/lib/oxidized/model/ftos.rb +2 -2
- data/lib/oxidized/model/garderos.rb +16 -5
- data/lib/oxidized/model/hpebladesystem.rb +1 -1
- data/lib/oxidized/model/ibos.rb +1 -2
- data/lib/oxidized/model/ingate.rb +15 -1
- data/lib/oxidized/model/iosxr.rb +9 -3
- data/lib/oxidized/model/ironware.rb +1 -1
- data/lib/oxidized/model/itmgos.rb +74 -0
- data/lib/oxidized/model/junos.rb +8 -2
- data/lib/oxidized/model/kornfeldos.rb +2 -4
- data/lib/oxidized/model/lancom.rb +2 -2
- data/lib/oxidized/model/masteros.rb +1 -1
- data/lib/oxidized/model/mlnxos.rb +1 -1
- data/lib/oxidized/model/model.rb +5 -2
- data/lib/oxidized/model/mtrlrfs.rb +1 -1
- data/lib/oxidized/model/ndms.rb +1 -1
- data/lib/oxidized/model/necix.rb +1 -1
- data/lib/oxidized/model/netgear.rb +1 -1
- data/lib/oxidized/model/netscaler.rb +1 -1
- data/lib/oxidized/model/nxos.rb +11 -2
- data/lib/oxidized/model/ocnos.rb +1 -1
- data/lib/oxidized/model/onefinity.rb +1 -1
- data/lib/oxidized/model/oneos.rb +0 -1
- data/lib/oxidized/model/openbsd.rb +1 -1
- data/lib/oxidized/model/os10.rb +2 -2
- data/lib/oxidized/model/os6.rb +3 -2
- data/lib/oxidized/model/panos.rb +1 -1
- data/lib/oxidized/model/panos_api.rb +42 -14
- data/lib/oxidized/model/procurve.rb +63 -31
- data/lib/oxidized/model/routeros.rb +2 -1
- data/lib/oxidized/model/screenos.rb +2 -2
- data/lib/oxidized/model/sgos.rb +1 -1
- data/lib/oxidized/model/siklu.rb +2 -2
- data/lib/oxidized/model/slxos.rb +1 -1
- data/lib/oxidized/model/sonicos.rb +2 -2
- data/lib/oxidized/model/tdre.rb +2 -2
- data/lib/oxidized/model/telco.rb +1 -1
- data/lib/oxidized/model/tmos.rb +11 -2
- data/lib/oxidized/model/tplink.rb +4 -4
- data/lib/oxidized/model/viptela.rb +1 -1
- data/lib/oxidized/model/voltaire.rb +1 -1
- data/lib/oxidized/model/vrp.rb +14 -8
- data/lib/oxidized/model/vsololt.rb +93 -0
- data/lib/oxidized/model/vyatta.rb +3 -3
- data/lib/oxidized/model/vyos.rb +5 -1
- data/lib/oxidized/model/xos.rb +1 -1
- data/lib/oxidized/model/zhoneolt.rb +1 -1
- data/lib/oxidized/node.rb +9 -9
- data/lib/oxidized/nodes.rb +5 -13
- data/lib/oxidized/output/git.rb +72 -81
- data/lib/oxidized/output/gitcrypt.rb +13 -32
- data/lib/oxidized/redact.rb +18 -0
- data/lib/oxidized/signals.rb +2 -16
- data/lib/oxidized/source/source.rb +5 -1
- data/lib/oxidized/source/sql.rb +1 -0
- data/lib/oxidized/version.rb +2 -2
- data/lib/oxidized.rb +1 -0
- data/lib/refinements.rb +7 -3
- data/oxidized.gemspec +20 -11
- metadata +69 -29
data/docs/Issues.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Writing good issues
|
|
2
2
|
If you're experiencing a problem with Oxidized or need a new feature, you can
|
|
3
|
-
[submit an issue on
|
|
3
|
+
[submit an issue on GitHub](https://github.com/ytti/oxidized/issues). We have
|
|
4
4
|
a great community where users help each other through the issue system.
|
|
5
5
|
|
|
6
6
|
This guide provides tips on writing your issue to make it easier for the
|
|
@@ -18,8 +18,9 @@ could be invested in new code. Therefore, issues will be worked on with the
|
|
|
18
18
|
following rules:
|
|
19
19
|
|
|
20
20
|
- Use the predefined templates for bugs, feature requests and support requests.
|
|
21
|
-
- If
|
|
22
|
-
|
|
21
|
+
- If important information is missing (read this file, fill in the questions in
|
|
22
|
+
the templates), maintainers may ask you to provide the missing details or
|
|
23
|
+
close the issue.
|
|
23
24
|
- Inactive issues will be marked "stale" automatically after 90 days. Issues
|
|
24
25
|
are not closed automatically; this is a manual action by a maintainer.
|
|
25
26
|
- A feature request may be closed after some time of inactivity, as obviously
|
|
@@ -52,12 +53,12 @@ If you can, please also test against the latest git version, or at least read
|
|
|
52
53
|
## Format your issue
|
|
53
54
|
- Use [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) to format your issue.
|
|
54
55
|
- Preview your text before submitting to ensure it renders correctly.
|
|
55
|
-
- Avoid screenshots of text. Instead, use [code
|
|
56
|
+
- Avoid screenshots of text. Instead, use [code formatting](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code) for any relevant code snippets.
|
|
56
57
|
|
|
57
58
|
## Choose your title well
|
|
58
59
|
Keep the title brief yet descriptive. Aim to summarize the main issue or request in a few words.
|
|
59
60
|
|
|
60
|
-
## Provide
|
|
61
|
+
## Provide detailed information
|
|
61
62
|
Include as many relevant details as possible. At a minimum, specify:
|
|
62
63
|
|
|
63
64
|
- Oxidized version and operating system.
|
|
@@ -66,6 +67,21 @@ Include as many relevant details as possible. At a minimum, specify:
|
|
|
66
67
|
- Output of the error, if relevant.
|
|
67
68
|
- For issues related to specific devices, consider creating a YAML Simulation file (instructions below).
|
|
68
69
|
|
|
70
|
+
Please include the output of `oxidized --support` whenever possible. Run the
|
|
71
|
+
command in the same environment and as the same user as the regular Oxidized
|
|
72
|
+
process so that it finds the correct configuration, environment and gems. For
|
|
73
|
+
Docker installations, run it inside the running container as the `oxidized`
|
|
74
|
+
user, for example:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
docker exec --user oxidized <container-name> oxidized --support
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The command prints the Oxidized version, operating system, Ruby environment, a
|
|
81
|
+
sanitized copy of your configuration and the relevant installed gems. Sensitive
|
|
82
|
+
keys (passwords, tokens, ...) are redacted, but please review the output and
|
|
83
|
+
remove any remaining sensitive data before sharing it.
|
|
84
|
+
|
|
69
85
|
Also, provide clear steps to reproduce the issue, if applicable.
|
|
70
86
|
|
|
71
87
|
## Making feature requests
|
|
@@ -73,13 +89,33 @@ Feature requests are welcome, but please understand that unaddressed requests
|
|
|
73
89
|
may be closed after some time. If you need a feature urgently, consider
|
|
74
90
|
contributing code via a pull request (PR) or hiring a developer.
|
|
75
91
|
|
|
76
|
-
##
|
|
92
|
+
## Submit a YAML Simulation File
|
|
77
93
|
To help developers troubleshoot device-specific issues, you may be asked to submit a
|
|
78
|
-
[YAML simulation file](/docs/DeviceSimulation.md
|
|
94
|
+
[YAML simulation file](/docs/DeviceSimulation.md) for your device.
|
|
95
|
+
|
|
96
|
+
By submitting a YAML simulation file (or any other contribution), you agree that
|
|
97
|
+
it may be integrated into the project and distributed under its license
|
|
98
|
+
(Apache-2.0). Always remove sensitive information (passwords, IP addresses,
|
|
99
|
+
serial numbers) before sharing.
|
|
100
|
+
|
|
101
|
+
The easiest way to produce a simulation file is to enable the `yaml` debug
|
|
102
|
+
option in your Oxidized configuration. This is the preferred method when the
|
|
103
|
+
issue can be reproduced with the current Oxidized model unchanged, because it
|
|
104
|
+
captures the real Oxidized backup session:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
input:
|
|
108
|
+
debug: yaml
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
After the next backup, the file is written to `~/.config/oxidized/logs/`. See
|
|
112
|
+
[Creating a YAML Simulation File with the debug option](/docs/DeviceSimulation.md#creating-a-yaml-simulation-file-with-the-debug-option)
|
|
113
|
+
for details.
|
|
79
114
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
115
|
+
Alternatively, you can generate the file with the `extra/device2yaml.rb` script
|
|
116
|
+
when you need to capture a specific command list manually. Here's a brief
|
|
117
|
+
overview how to do it, you can find more details in the link above.
|
|
118
|
+
- Fork Oxidized on GitHub
|
|
83
119
|
- Install dependencies (git and Ruby's Net::SSH):
|
|
84
120
|
```
|
|
85
121
|
# Adapt when not using a debian-based distro
|
|
@@ -99,7 +135,7 @@ show version
|
|
|
99
135
|
show vtp status
|
|
100
136
|
show inventory
|
|
101
137
|
show running-config
|
|
102
|
-
exit" -o spec/model/data/ios
|
|
138
|
+
exit" -o spec/model/data/ios#C8200L_16.12.1#simulation.yaml
|
|
103
139
|
```
|
|
104
140
|
|
|
105
141
|
- The script waits 5 seconds between commands, and outputs the response of the
|
|
@@ -107,9 +143,9 @@ exit" -o spec/model/data/ios:C8200L_16.12.1:simulation.yaml
|
|
|
107
143
|
command without waiting for the timeout.
|
|
108
144
|
- The result will be stored in `spec/model/data/`.
|
|
109
145
|
- Replace any sensitive information with placeholder values in the output file.
|
|
110
|
-
- Commit & push the file to
|
|
146
|
+
- Commit & push the file to GitHub
|
|
111
147
|
```
|
|
112
|
-
git add spec/model/data/ios
|
|
148
|
+
git add spec/model/data/ios#C8200L_16.12.1#simulation.yaml
|
|
113
149
|
git commit -m "Device simulation for C8200L"
|
|
114
150
|
git push
|
|
115
151
|
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Cisco FTD via HTTP
|
|
2
|
+
|
|
3
|
+
Back up Cisco FTD firewalls via the [HTTP API](https://www.cisco.com/c/en/us/td/docs/security/firepower/ftd-api/guide/ftd-rest-api/ftd-rest-api-intro.html). This model uses the [configexport](https://www.cisco.com/c/en/us/td/docs/security/firepower/ftd-api/guide/ftd-rest-api/ftd-api-import-export.html#id_108006) method to export the configuration as a zip file, then extracts the JSON configuration from this file.
|
|
4
|
+
|
|
5
|
+
Make sure the `rubyzip` gem is installed with your oxidized host (it is included in the Docker image).
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
Ensure that the HTTP input is enabled in the Oxidized configuration, e.g.:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
input:
|
|
13
|
+
default: ssh, http
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Oxidized will need to use the FTD's admin login. Set the username at the model level:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
models:
|
|
20
|
+
ftd:
|
|
21
|
+
username: admin
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
When integrating with LibreNMS, you may need to override the IP address used by Oxidized (e.g. if SNMP and the HTTP API are listening on different interfaces on your FTD). This can be done with a mapping rule, e.g.:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
lnms config:set oxidized.maps.ip.hostname.+ '{"match": "HOSTNAME", "value": "IP"}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
(Where `HOSTNAME` is the hostname/IP address used when adding the device to LibreNMS, and `IP` is the IP address for the HTTP API.)
|
|
31
|
+
|
|
32
|
+
The port for the HTTP API can be overridden with a variable. For example, create a mapping rule to assign the device to a group, e.g.:
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
lnms config:set oxidized.maps.group.hostname.+ '{"match": "HOSTNAME", "value": "GROUP"}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
(Where `HOSTNAME` is the hostname/IP address used when adding the device to LibreNMS, and `GROUP` is an appropriate group name.)
|
|
39
|
+
|
|
40
|
+
Then set the port variable at the group level. You can also override the password here if necessary, e.g.:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
groups:
|
|
44
|
+
GROUP:
|
|
45
|
+
vars:
|
|
46
|
+
ftd_api_port: 8443
|
|
47
|
+
password: secret
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Variables
|
|
51
|
+
|
|
52
|
+
The following variables can be used to control the behaviour of the model:
|
|
53
|
+
|
|
54
|
+
- ftd\_api\_endpoint: URL path to the FTD API (default: /api/fdm/latest)
|
|
55
|
+
- ftd\_api\_port: HTTPS port for the FTD API (default: 443)
|
|
56
|
+
- ftd\_config\_filename: Filename to use for the configexport method call (default: oxidized.zip)
|
|
57
|
+
- ftd\_polls: Number of times to poll the status of the configexport job (default: 10, minimum: 1)
|
|
58
|
+
- ftd\_poll\_wait: Seconds to wait between polls (default: 10, minimum: 1)
|
|
59
|
+
|
|
60
|
+
## Limitations
|
|
61
|
+
|
|
62
|
+
If your FTDs are in an HA pair, then backups will only succeed on the active device.
|
|
63
|
+
|
|
64
|
+
Back to [Model-Notes](README.md)
|
|
@@ -30,3 +30,8 @@ Older Devices like [ProCurve](/lib/oxidized/model/procurve.rb) or 3Com/Comware
|
|
|
30
30
|
are listed under the Vendor "HP" in the
|
|
31
31
|
[Supported OS Types](/docs/Supported-OS-Types.md) list.
|
|
32
32
|
|
|
33
|
+
HPE Aruba switches running ArubaOS-Switch (the line that succeeded ProCurve -
|
|
34
|
+
e.g. the 2530, 2540, 2920, 2930F/2930M, 3810 and 5400R series) also use the
|
|
35
|
+
[procurve](/lib/oxidized/model/procurve.rb) model, even though they are branded
|
|
36
|
+
"Aruba".
|
|
37
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Lantronix IT Management Gateway OS (ITMGOS)
|
|
2
|
+
|
|
3
|
+
The `itmgos` model backs up Lantronix console servers and gateways that run the IT
|
|
4
|
+
Management Gateway OS CLI: SLC 8000, SLC 9000, EMG 8500/7500 and SLB.
|
|
5
|
+
|
|
6
|
+
The configuration is the device's own export, `admin config commands copypaste`: a list
|
|
7
|
+
of CLI commands that the device restores with `admin config batch`. The model answers the
|
|
8
|
+
export's confirmation prompt, and adds `admin version` (hardware, firmware, installed
|
|
9
|
+
modules) as comments, without the uptime and last-boot lines.
|
|
10
|
+
|
|
11
|
+
## Authentication
|
|
12
|
+
|
|
13
|
+
SLC 9000 units accept SSH logins only through keyboard-interactive authentication, which Oxidized
|
|
14
|
+
doesn't try by default. Enable it for the model:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
models:
|
|
18
|
+
itmgos:
|
|
19
|
+
vars:
|
|
20
|
+
auth_methods: [ "none", "publickey", "password", "keyboard-interactive" ]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Secrets
|
|
24
|
+
|
|
25
|
+
The export prints passwords, community strings and other secrets in cleartext. Set
|
|
26
|
+
`remove_secret: true` (as a var, for the model or globally) so the model replaces them before
|
|
27
|
+
the configuration is stored:
|
|
28
|
+
|
|
29
|
+
- secrets the export writes on the two lines after their command, such as
|
|
30
|
+
`set tacacs+ secret`, `set snmp v3password`, `set ldap bindpassword`, `admin ftp password`,
|
|
31
|
+
`set site chapsecret <site>` and the per-port and USB modem CHAP and dial-out passwords
|
|
32
|
+
- SNMP read, write and trap communities, including the community of trap event actions
|
|
33
|
+
- local user password hashes
|
|
34
|
+
|
|
35
|
+
## Session
|
|
36
|
+
|
|
37
|
+
On login the model runs `set cli terminallines disable` to turn off paging. This is a CLI
|
|
38
|
+
setting of the user Oxidized logs in as.
|
|
39
|
+
|
|
40
|
+
Tested on an SLC 9016 (SLC9016-16U-16E) with firmware 9.7.0.0R21.
|
|
@@ -6,9 +6,28 @@ Logs in using username and password and fetches an API key.
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Create a user with a `Superuser (read-only)` admin role in Panorama or PanOS
|
|
9
|
+
- Create a user with a `Superuser (read-only)` admin role in Panorama or PanOS.
|
|
10
|
+
A custom admin role needs the XML API permission `Operational Requests`
|
|
11
|
+
(or `Export` when using `panos_api_candidate`).
|
|
10
12
|
- Make sure the `nokogiri` gem is installed with your oxidized host
|
|
11
13
|
|
|
14
|
+
## Running vs. candidate configuration
|
|
15
|
+
|
|
16
|
+
The model backs up the running configuration (`show config running`), so
|
|
17
|
+
uncommitted changes are not included.
|
|
18
|
+
|
|
19
|
+
Previous versions of the model backed up the candidate configuration,
|
|
20
|
+
including uncommitted changes (see
|
|
21
|
+
[#2759](https://github.com/ytti/oxidized/issues/2759)). To keep this behaviour,
|
|
22
|
+
set the variable `panos_api_candidate` to `true`:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
models:
|
|
26
|
+
panos_api:
|
|
27
|
+
vars:
|
|
28
|
+
panos_api_candidate: true
|
|
29
|
+
```
|
|
30
|
+
|
|
12
31
|
## Configuration
|
|
13
32
|
|
|
14
33
|
Make sure the following is configured in the oxidized config:
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# TP-Link Configuration
|
|
2
|
+
|
|
3
|
+
The `tplink` model is used for TP-Link JetStream managed switches and the
|
|
4
|
+
DeltaStream GPON OLT. The notes below apply to all of them.
|
|
5
|
+
|
|
6
|
+
## SSH authentication: avoid public-key authentication
|
|
7
|
+
|
|
8
|
+
Some TP-Link devices (the DeltaStream GPON OLT for example) **abort the SSH
|
|
9
|
+
connection if the client attempts public-key authentication before the
|
|
10
|
+
password**. By default net-ssh offers any key from the SSH agent or the default
|
|
11
|
+
identity files first, so when the Oxidized host has SSH keys the device closes the
|
|
12
|
+
connection before the password is ever tried:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
connection closed by remote host (Net::SSH::Disconnect)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This is why the same device may connect fine from one host (no SSH keys) and fail
|
|
19
|
+
from another (keys present). Tell Oxidized to skip `publickey` with the
|
|
20
|
+
`auth_methods` variable (see [SSH Auth Methods](../Inputs.md#ssh-auth-methods)).
|
|
21
|
+
It can be set globally, by group, by model or by node, e.g. for every `tplink`
|
|
22
|
+
device:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
models:
|
|
26
|
+
tplink:
|
|
27
|
+
vars:
|
|
28
|
+
auth_methods: ["none", "password"]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Capturing a simulation with device2yaml.rb
|
|
32
|
+
|
|
33
|
+
`extra/device2yaml.rb` has no `auth_methods` option, but net-ssh reads
|
|
34
|
+
`~/.ssh/config`, so add a host block for the device to force password
|
|
35
|
+
authentication:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Host <device-ip>
|
|
39
|
+
PreferredAuthentications password
|
|
40
|
+
PubkeyAuthentication no
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This CLI also submits a command only on a carriage return, so run device2yaml with
|
|
44
|
+
`-n '\r\n'`; otherwise the commands are echoed but never executed.
|
|
45
|
+
|
|
46
|
+
## Enable mode
|
|
47
|
+
|
|
48
|
+
Devices such as the DeltaStream GPON OLT only expose their configuration in
|
|
49
|
+
privileged (enable) mode. The model enters enable mode through the standard
|
|
50
|
+
`enable` variable:
|
|
51
|
+
|
|
52
|
+
- `enable: true` — switch to enable with **no** password (TP-Link devices enable
|
|
53
|
+
without a password by default).
|
|
54
|
+
- `enable: <password>` — switch to enable and send `<password>` when prompted.
|
|
55
|
+
|
|
56
|
+
Set it globally, per model or per node, e.g. in the configuration:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
models:
|
|
60
|
+
tplink:
|
|
61
|
+
vars:
|
|
62
|
+
enable: true
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
or as the 6th column of a CSV `router.db` line (the CSV source maps the string
|
|
66
|
+
`true` to the boolean `true`):
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
tplink-olt:tplink:10.0.0.1:admin:secret:true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Without the `enable` variable the model stays in user mode (`>`) and privileged
|
|
73
|
+
commands return `Error: Bad command`.
|
|
74
|
+
|
|
75
|
+
Back to [Model-Notes](README.md)
|
data/docs/Outputs.md
CHANGED
data/docs/Release.md
CHANGED
|
@@ -7,38 +7,59 @@ Oxidized versions are numbered like major.minor.patch
|
|
|
7
7
|
- minor is incremented when releasing new features.
|
|
8
8
|
- patch is incremented when releasing fixes only.
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
## Overview
|
|
11
|
+
The release is done in two steps, each with its own branch:
|
|
12
|
+
1. A review branch, where all the fixes are made. Once it is merged into
|
|
13
|
+
master, GitHub automatically builds a container image, which is used for
|
|
14
|
+
testing.
|
|
15
|
+
2. A release branch, which only bumps the version and finalizes the
|
|
16
|
+
CHANGELOG.
|
|
17
|
+
|
|
18
|
+
## Step 1: Review branch
|
|
19
|
+
### Create a review branch
|
|
20
|
+
Name the review branch `review-for-0.xx.yy`
|
|
21
|
+
|
|
22
|
+
### Review changes
|
|
14
23
|
Run `git diff 0.30.0` (where `0.30.0` is to be changed to the last release) and review
|
|
15
24
|
all the changes that have been done. Have a specific look at changes you don't understand.
|
|
16
25
|
|
|
17
26
|
For a graphical compare, use `git difftool -d 0.30.0`.
|
|
18
27
|
|
|
19
|
-
Commit fixes to the
|
|
28
|
+
Commit fixes to the review branch
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
### Update the gem dependencies to the latest versions
|
|
22
31
|
```
|
|
23
32
|
bundle outdated
|
|
24
33
|
bundle update
|
|
25
34
|
bundle outdated
|
|
26
35
|
```
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
### Update rubocup .rubocop_todo.yml
|
|
29
38
|
Run `bundle exec rubocop --auto-gen-config`,
|
|
30
39
|
and make sure `bundle exec rake` passes after it.
|
|
31
40
|
|
|
32
|
-
If you change some code => Restart the release process at the beginning ;-)
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
Run `bundle exec rake chmod`
|
|
42
|
+
### Make sure the file permissions are correct
|
|
43
|
+
Run `bundle exec rake chmod`, then `git status`
|
|
44
|
+
|
|
45
|
+
### Merge the review branch
|
|
46
|
+
Upload the branch to github, make a Pull Request for it and make sure it passes
|
|
47
|
+
all GitHub CI. Merge it into master.
|
|
48
|
+
|
|
49
|
+
GitHub automatically builds the container image from master.
|
|
36
50
|
|
|
37
|
-
##
|
|
38
|
-
Test the git code and the container
|
|
39
|
-
environments as you can.
|
|
51
|
+
## Step 2: Tests
|
|
52
|
+
Test the git code (master) and the container image built from master against
|
|
53
|
+
as much device types and environments as you can.
|
|
54
|
+
|
|
55
|
+
If you need to fix something, do it in a new review branch (go back to
|
|
56
|
+
Step 1).
|
|
57
|
+
|
|
58
|
+
## Step 3: Release branch
|
|
59
|
+
### Create a release branch
|
|
60
|
+
Name the release branch `release/0.xx.yy`
|
|
40
61
|
|
|
41
|
-
|
|
62
|
+
### Bump the version
|
|
42
63
|
Update CHANGELOG.md:
|
|
43
64
|
- review it
|
|
44
65
|
- add release notes
|
|
@@ -48,10 +69,10 @@ Change the version in `lib/oxidized/version.rb`
|
|
|
48
69
|
|
|
49
70
|
Upload the branch to github, make a Pull Request for it.
|
|
50
71
|
|
|
51
|
-
|
|
72
|
+
### Make sure you pass all GitHub CI
|
|
52
73
|
They test different ruby versions an run security checks on the code (codeql).
|
|
53
74
|
|
|
54
|
-
|
|
75
|
+
### Prepare the release in your working repository
|
|
55
76
|
1. Merge the Pull Request into master with the commit message
|
|
56
77
|
`chore(release): release version 0.3x.y`
|
|
57
78
|
2. `git pull` on master
|
|
@@ -64,7 +85,8 @@ gem install --user-install pkg/oxidized-0.xx.yy.gem
|
|
|
64
85
|
~/.local/share/gem/ruby/3.3.0/bin/oxidized
|
|
65
86
|
```
|
|
66
87
|
|
|
67
|
-
##
|
|
88
|
+
## Step 4: Publish the release
|
|
89
|
+
### Release in github
|
|
68
90
|
Push the tag to github:
|
|
69
91
|
```
|
|
70
92
|
git push origin 0.xx.yy
|
|
@@ -82,13 +104,13 @@ Make a release from the tag in github.
|
|
|
82
104
|
|
|
83
105
|
Close the corresponding milestone in github.
|
|
84
106
|
|
|
85
|
-
|
|
86
|
-
Push the gem with
|
|
107
|
+
### Release in rubygems
|
|
108
|
+
Push the gem with `rake push`
|
|
87
109
|
|
|
88
|
-
|
|
110
|
+
### Release in docker.io
|
|
89
111
|
The OCI-Containter is automatically build and pushed to docker.io by github
|
|
90
112
|
|
|
91
|
-
|
|
113
|
+
### Update CHANGELOG.md for next release
|
|
92
114
|
Add
|
|
93
115
|
```
|
|
94
116
|
## [Unreleased]
|