We have been trying to use the API + Python to automate regular snapshot creation for all or some of the servers in a specific DC. We are having some difficulty (one, that we are not phyton experts :) ...yet)
Any pointers of samples on how to accomplish this would be greta.
The main idea is to deleted old snapshots and create new one. Ideally we then would automate this script to run once a week o month based on a disaster recovery/back schedule.
If you're trying to use Python with our API, I would strongly suggest you to take a look at the Python SDK. I would also not recommend you to take a snapshot of your volumes very often, since the snapshot is a clone of the entire volume and not an incremental/differential image of your previous one. For a backup purpose, I would advise you to implement a backup solution using a 3rd party tool like Amanda, R1soft, Bacula, BitCalm etc., something specialized in backups.
A way to approach the problem would be by having two separate scrips, one for deletion and one for creation. You can run a cron job(linux) or a planned Task(windows) for the two scripts on a weekly basis. You could also combine the two procedures in the same script.
Creating Snapshots: For the desired datacenter, you could identify the volumes(volume_id) and create_snapshot(snapshot_id):