fix(config): read what retrieve asks in the REST-to-SSH fallback
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 25s
driver / types (pull_request) Successful in 1m15s
driver / test (3.12) (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 2m54s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 25s
driver / types (pull_request) Successful in 1m15s
driver / test (3.12) (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 2m54s
driver / publish (pull_request) Skipped
A switch whose REST API has no configuration is read over a temporary SSH session. That path read the running config only, whatever retrieve asked for, and returned an empty startup config. It now reads through the same code as the SSH transport: running and/or startup as asked, "show config" where "show startup-config" is unknown, and a part that could not be read raises. Closes #25
This commit is contained in:
1 parent
f3da8944a3
commit
e0ff997d1b
6 files changed
+141
-29
No files matched your search
@@ -60,6 +60,10 @@ All notable changes to this driver. The format follows
|
||||
PoE on a switch without it.
|
||||
- `get_config` raises when neither the REST API nor the SSH fallback could read the
|
||||
configuration. It returned an empty running configuration.
|
||||
- `get_config` on a switch whose REST API has no configuration (2530 / YA series) reads
|
||||
over SSH what `retrieve` asks for, the startup configuration included (#25). That
|
||||
fallback read the running configuration only, whatever was asked, and reported the
|
||||
startup configuration as empty.
|
||||
- `cli()` over the REST API raises when the request fails. It returned
|
||||
`"Error: HTTP <status>"` as if that were the command's output.
|
||||
|
||||
|
||||
Reference in new issue
Block a user