Models

Many of the collection methods return individual objects, which provide
destroy, save and wait_for methods.

destroy will destroy the persisted object from the cloud

save will persist the object to the cloud

wait_for takes a block and waits for either the block to return true for
the object or for a timeout (defaults to 10 minutes)

Mocks

Mocking provides an in memory representation of clouds as you make
different requests. This representation allows subsequent calls to mimic
the behavior of the cloud while eliminating the cost and time needed to
actually run tests against various providers. Mocking is easy to use, just
write any functions as you normally would and then in your tests ensure you
call:

Fog.mock!

Make sure you call it first (before you initialize any connections) and all
your calls should now run in mock mode. If you run into the edges of mock
implementation it should let you know that they haven't been
implemented yet.

Requests

Requests allow you to dive deeper when the models just can't cut it.
For instance, ec2 provides methods related to reserved instances that
don't have any models (yet anyway). You can get a description of your
reserved instances like this:

Copyright

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.