You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: The rewritten GetConfig replaces the base scrapligocfg path with an explicit runningConfigCmds allowlist, and that map omits cisco_asa, which scrapligocfg v1.0.0 supported with a core driver (alongside the five platforms that are present).
Trigger:clab save on a lab with a cisco_asav node: nodes/cisco_asav/cisco_asav.go sets scrapliPlatformName = "cisco_asa", embeds clabnodes.VRNode with no SaveConfig override, so VRNode.SaveConfig (nodes/vr_node.go:129-130) calls GetConfig with "cisco_asa" and hits the unsupported-platform branch.
Impact: A user-visible regression: clab save on cisco_asavnodes previously produced the running config and now returns retrieving the running config of the "cisco_asa" platform is not supported.
Suggested correction: Add "cisco_asa": "show running-config" to runningConfigCmds. While there, verify the remaining VRNode-inherited platforms (cisco_ftd, aruba_aoscx, paloalto_panos, dell_emc) against scrapligocfg v1's supported device list and include any that had community config drivers.
P3 - Swapped log.Errorf arguments in SpawnCLIviaExec
Problem: The call is log.Errorf("failed to fetch platform instance for device %s; error: %+v\n", err, contName) — the error value is passed as the device-name argument and the container name as the error argument, producing logs like failed to fetch platform instance for device <error text>; error: clab-node-name. The pair was carried over from the base code, but this PR rewrites the whole function, making it the natural place to fix it.
Trigger: Any failure constructing the scrapligocli.Cli instance inside SpawnCLIviaExec.
Impact: Misleading operator-facing logs; the error text appears in the device slot and the container name in the error slot, hampering diagnosis. No functional consequence.
Suggested correction: Swap the arguments: log.Errorf("failed to fetch platform instance for device %s; error: %+v\n", contName, err).
P4 - SaveRunningConfig keeps an unused 5th parameter
Problem: The signature func SaveRunningConfig(ctx context.Context, addr, username, password, _ string) error retains the scrapli platform parameter that scrapli v1 call sites consumed; in the scrapli v2 implementation it is dead, yet callers in nodes/xrd/xrd.go:136, nodes/c8000/c8000.go:83, nodes/vr_sros/vr-sros.go:267, and nodes/sros/sros.go:1705 still pass it.
Trigger: Any reader of the SaveRunningConfig call sites must infer what the final string argument does when it does nothing.
Impact: Maintainability only; the dead parameter invites meaningless copy-paste arguments at new call sites.
Suggested correction: Remove the fifth parameter from SaveRunningConfig and drop the argument at the four call sites.
P4 - No runnable check guards the new platform-to-command gating in GetConfig
Problem:runningConfigCmds is now the decision table for which node kinds can be saved via VRNode.SaveConfig, and nothing in the repo pins it to the platforms registered by the nodes package; no unit test covers the new GetConfig code path (only unrelated VRNode tests mention scrapli).
Trigger: Adding or renaming a VRNode-based kind, or editing runningConfigCmds, without noticing that a registered platform is missing from the map.
Impact: Silent per-kind regressions of clab save discovered only by users — exactly how the cisco_asa omission slipped through.
Suggested correction: Add one small test: a table test that calls GetConfig with each registered VRNode platform name and asserts either that the name is present in runningConfigCmds (or a fake-injected equivalent) or, for known-unsupported ones, that the explicit "not supported" error is returned.
review conditions
Source inspection only; PR code, tests, and benchmarks were not executed.
Source-only review; tests were not executed. All 17 changed paths from the manifest were inspected along with relevant callers and base counterparts.
The snapshot does not include scrapli v2 module sources, so library-dependent behaviors could only be assessed by inference: (1) whether Cli.Open() on a single scrapligocli.Cli instance is safe to retry after a failed Open — the base SpawnCLIviaExec built a fresh platform and driver per retry, the head version reuses one instance in an unbounded retry loop that also uses context.Background() (unchanged behavior); (2) whether WithBinTransportOverrideArgs splits the space-joined openArgs string into argv elements; (3) whether dropping WithAuthNoStrictKey() everywhere is safe because scrapli v2 disables strict host-key checking by default — if not, every SSH2 session would fail loudly; (4) whether the nokia_srlinux, vyos_vyos, and nokia_sros_classic platform definitions all exist under scrapli v2 naming.
The base sros code wrapped addresses as fmt.Sprintf("[%s]") for netconf (SaveRunningConfig, MultiExec) and SSH CLI connections; the head passes the bare address. The purpose of the brackets under scrapli v1 could not be determined; if it was a v1 address-parsing workaround, IPv6 management-address scenarios should be validated.
VRNode-inherited kinds whose platforms are absent from runningConfigCmds (cisco_ftd, aruba_aoscx, paloalto_panos, dell_emc, ipinfusion_ocnos, notsupported for checkpoint_cloudguard) now fail with the explicit "not supported" error; whether these succeeded under scrapligocfg v1 community drivers could not be verified. cisco_vios ("cisco_ios") and huawei_vrp were already broken under v1's platform naming, so those are unchanged in practice.
Deferred Close placements were reviewed for all looped call sites (sonic_vm.deploySSHKeys, vr_sros.applyPartialConfig, ceos.ceosPostDeploy, vyos.PostDeploy) and are correct; the vyos change moving the debug log after the err check removes a potential nil-pointer dereference on resp.JoinedResult() that existed in the base.
No topology-schema changes are part of this PR, so no clab.schema.json review was needed; no release-note file under docs/rn/ was touched. Docs contain no stale vyatta_vyos references after the vyos_vyos platform rename.
Totally unrelated comment, but ToFaRev is a great name. 😂
took me 5 seconds to come up with it as it was a natural fit :D
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experiment. Won't merge until we do manual tests