napalm-automation-community / napalm-aruba-cx

NAPALM driver for Aruba AOS-CX
Apache License 2.0
14 stars 7 forks source link

Add use_cli optional argument to allow for CLI output format for get_config #30

Open johanek opened 7 months ago

johanek commented 7 months ago

Hello,

Sometimes it's desirable to have CLI style output for get_config - I want it to be able to use nautobot golden config to manage consistency checks and device remediation.

I couldn't find a way for the Aruba API to return the config in this format. So this change adds an optional argument use_cli to get the configs via a SSH session instead. By default the existing behaviour of reporting the JSON output is kept.

I felt this would be the simplest way to get the functionality I needed with minimal changes to current behaviour, but I'm open to suggestions for improvement,

Thanks!