feat: Add ansible-inventory credential support for save command#2925
feat: Add ansible-inventory credential support for save command#2925fullstopdev wants to merge 6 commits intosrl-labs:mainfrom
Conversation
- Create inventory_parser.go to parse ansible-inventory.yml - Modify save command to load per-node/per-kind credentials - Use dynamic approach: skip only non-network node kinds - Credentials loaded in-memory, not persisted to topology - Supports host-level and group-level credential fallback Closes srl-labs#2924
|
Ansible inventory example: nokia_srsim:
|
|
can be tested with other username than admin which should have administrative rights: |
core/save.go
Outdated
| netconfKinds := []string{ | ||
| "nokia_sros", "vr-sros", "nokia_srsim", // Nokia SROS variants | ||
| "nokia_srlinux", "srl", // Nokia SRL (for consistency, though uses local CLI) | ||
| "c8000", // Cisco 8000 |
There was a problem hiding this comment.
Those are not conform with the schema and should not use deprecated kinds
There was a problem hiding this comment.
we can keep only : "nokia_sros", "nokia_srsim"
|
Personally, I think this feature is very niche and will not fly well across multiple types of nodes. I see multiple conditional statements per node that will make maintenance of this feature a bit complex |
thanks for feedback, can we limit the use to only nokia_sros and nokia_srsim? this will reduce the complexity |
fullstopdev
left a comment
There was a problem hiding this comment.
i simplified the logic and the scope of the changes to only impact nokia_sros and nokia_srsim
core/save.go
Outdated
| netconfKinds := []string{ | ||
| "nokia_sros", "vr-sros", "nokia_srsim", // Nokia SROS variants | ||
| "nokia_srlinux", "srl", // Nokia SRL (for consistency, though uses local CLI) | ||
| "c8000", // Cisco 8000 |
There was a problem hiding this comment.
we can keep only : "nokia_sros", "nokia_srsim"
Uh oh!
There was an error while loading. Please reload this page.