This is the plugin Gem to talk to gridscale clouds via fog.
Add this line to your application's Gemfile:
gem 'fog-gridscale'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fog-gridscale
You'll need a gridscale account, user uuid and an API token to use this provider.
Get one from https://my.gridscale.io/APIs/
Write down the Access Token.
.
First, create a connection to the host:
require 'fog/gridscale'
require 'pp'
gridscale = Fog::Compute.new({
:provider => 'gridscale',
:api_token => 'your token',
:user_uuid => 'your user uuid',
})
Listing servers and attributes:
gridscale.servers.each do |server|
puts server.object_uuid
puts server.name
puts server.cores
puts server.memory
end
Creating a new server:
server = gridscale.servers.create :name => 'foobar',
:cores => 2,
:memory => 4,
gridscale.servers.get(server_uuid)
gridscale.server_update(server_uuid, payload)