Collections

A high level interface to each cloud is provided through collections, such as images and servers.
You can see a list of available collections by calling collections on the connection object.
You can try it out using the fog command:

Models

Many of the collection methods return individual objects, which also provide common methods:

destroy - will destroy the persisted object from the provider

save - persist the object to the provider

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

As you might imagine, testing code using Fog can be slow and expensive, constantly turning on and and shutting down instances.
Mocking allows skipping this overhead by providing an in memory representation resources as you make requests.
Enabling mocking easy to use, before you run other commands, simply run:

It will return an excon response, which has body, headers and status. Both return nice hashes.

Go forth and conquer

Play around and use the console to explore or check out fog.io and the provider documentation
for more details and examples. Once you are ready to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.

geemus says: "That should give you everything you need to get started, but let me know if there is anything I can do to help!"

Versioning

Fog library aims to adhere to Semantic Versioning 2.0.0, although it does not
address challenges of multi-provider libraries. Semantic versioning is only guaranteed for
the common API, not any provider-specific extensions. You may also need to update your
configuration from time to time (even between Fog releases) as providers update or deprecate
services.

However, we still aim for forwards compatibility within Fog major versions. As a result of this policy, you can (and
should) specify a dependency on this gem using the Pessimistic Version
Constraint with two digits of precision. For example:

spec.add_dependency'fog','~> 1.0'

This means your project is compatible with Fog 1.0 up until 2.0. You can also set a higher minimum version: