Open kikSaki opened 3 months ago
Thank you @kikSaki for bringing this to our attention! I'll work on bringing this to our internal team and will update the issue when there's an update!
@kikSaki can you also share which pyaoscx version you're using?
I'm pretty sure I'm on the latest pyaoscx version: 2.6.0 I can double check in in a few days.
I checked the pyaoscx version.
pyaoscx: Version: 2.6.0
I checked the pyaoscx code and possibly found where the problem is.
In the file pyaoscx/configuration.py
in the function backup_configuration()
when doing a local backup the following function is called: config_json = self.get_full_config()
The function defaults to running config since it doesn't receive an input: def get_full_config(self, config_name="running-config"):
So when doing backups locally it should be:
File: pyaoscx/configuration.py
at the end of function: backup_configuration()
else:
config_json = self.get_full_config(config_name)
with open(output_file, "w") as to_file:
formatted_file = json.dumps(config_json, indent=4)
to_file.write(formatted_file)
success = True
Hey,
in the aoscx_backup_config module there is an option to specify the config_name to backup, yet it always returns the running-config.
Collection:
arubanetworks.aoscx 4.4.0
Ansible Version:
ansible [core 2.16.7]
CX switch:
Aruba CX 6200F, Version ArubaOS-CX ML.10.10.1060
This is my playbook:
This was tested with the names of the startup-config and checkpoints, but it always returned the running-config
This is a part of the output from debug with -vvv:
I also tested the switch REST API with Postman using the API /fullconfigs/{name} and /configs/{name}.
Tested with
https://<ip-address>/rest/v10.10/fullconfigs/startup-config
which returns the correct configuration.https://<ip-address>/rest/v10.10/configs/startup-config
returns the correct configuration as well.Another nice thing would be to be able to save the CLI version of the config locally via API, or at least have the option to display it in the output for better readability without using SSH.