August 4th, 2008
API Update (Version 1.4)
Today we are updating the API with a few features that have been asked for repeatedly. The first feature is the ability to create or rebuild slices from backups.
We have also enabled the ability to destroy slices, but you must enable that ability from the SliceManager, which you may also disable at any time as well.
We've set a user-definable limit of maximum # of slices built in a day, which can be a safeguard against an accidental infinite loop.
Slices also have a number of new attributes:
- Status
- Bandwidth Usage
- All IPs associated
- Progress (when building, rebuilding, etc)
Backward Compatibility
We strive to make each release of the API as backwards-compatible as possible, however there is one small change you may have to make for your Slice models to work.
If you're using Ruby's ActiveResource::Base class, Slices now require an Address class. Since we include one or more IP addresses in an array, ActiveResource requires that it have it's own class. You can simply add on line though:
class Address < String; end
Since the IP addresses are nothing more than strings, this is the easiest way to use them.
August 7th, 2008 at 02:17 PM Tim Morgan
This is great stuff! Thanks for adding this functionality.
Just curious about specifying a backup to build from… Does it matter that backups have a non-numeric id? I didn’t seem to have any luck doing a Backup.find(‘3-1234’) sort of query, so I was afraid a build would croak, too.
Of course I can just try it and see what happens, but it might be nice to acknowledge the non-numeric id thing in the docs.
Thanks again for always making SliceHost even better.
August 7th, 2008 at 05:24 PM Jared
Tim, try it again. I just fixed a bug in the matching code for that id.
August 7th, 2008 at 07:03 PM Tim Morgan
Thanks! It works now. I’m excited to try a build from a backup.