| Offline |
| Sysop |
Joined: Sat Nov 27, 2010 3:32 am Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
|
|
|
You would just delete every config profile and disk image.
So linode.disk.list(), iterate over disk images and linode.disk.delete() each. Then do a linode.config.list(), iterate over each and run linode.config.delete().
You would then do linode.disk.createfromstackscript() as well as linode.disk.create() to create your swap image. Then you'd want to create your configuration profile using linode.config.create().
I don't have any example code to show as this would depend which library you use to interact with the Linode API. You could either use the Linode binding, or something like 'requests' to make the HTTPS requests and handle the responses on your own.
-Tim
_________________ 'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra 'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch
|
|