Aruba has a long way to go to catch up on this front. It feels like they're really trying to give us a modern toolset, and I appriciate that. However, it isn't here yet; or, if it is, the documentation isn't. The rest api is a great idea that just falls short in practice and the documentation is terrible.
Switches don't support ssh command execution, so simple one-time paramiko commands won't work. You have to spawn a shell. When you do spawn a shell, the vt100 control characters will make expect scripting a nightmare. local-terminal settings will get you around that but you have the added overhead of setting that and hoping to get it set back before a disconnect or error. The API is far from intuitive and the documentation is lacking. eg. you will find out that ../rest/v3/cli doesn't support copy commands only after you try it, and that ../rest/v3/file-transfer doesn't support tftp only after it tells you that tftp://... isn't a valid url and you spend some time with google. It uses options like "FTT_CONFIG" that we assume is startup-config but could be running-config, "FTA_UPLOAD" which I will assume is from the perspective of the switch so it's uploading to the backup server. If your wrong about that last one and the file exists on the server, you just restored your config instead of backing it up. I'm sure your boss will understand.
Someone at Aruba took the time to build some Ansible modules, and I appriciate their work. However, they're built using the rest api, so they have the same limitations, and again with the documentation. One of the modules is name arubaoss_config_bkup, but it is a back/restore module. Again, hope your boss is understanding. The documentation for the "state" option for this one is...
state:
description:
- Adding or reading data
default: create
required: false
What is Adding? What is Reading? And which is "create?" And what is the other option? I tried "destroy." Not it. Let's take a guess that adding is putting data somewhere. Is it putting the config data on the backup server or a backup config on the switch; and visa versa?
I'm sorry if I sound bitter, but I used to be a full Cisco shop with a massive custom codebase that served me flawlessly for years. Now I'm here.