Friday, March 8, 2019

Advantages of NX-API over SSH (use with Ansible)

I'm starting to get into working with Nexus 9k devices and managing them via Ansible and I'm trying to understand what the advantage of using the NX-API over purely issuing commands over SSH.

In about every case I can accomplish the same thing by just using the ios_command module and sending a cli command over ssh.

The only advantage I can immediately see is that I can get the results of API calls back in JSON. That makes it easier working with key/value pairs if I'm then going to process the data further. (But even then, I've accomplished parsing the results of SSH with regex or conditional searching with python.

Am I missing something obvious? I just don't see the allure of the NX-API as opposed to programmatically sending SSH CLI commands.



No comments:

Post a Comment