My CloudVPS

Article overview

/ Fog library for Ruby

Fog is a general-purpose cloud-library for Ruby. The CloudVPS Object Store can be accessed using its OpenStack driver as follows:

require 'fog'

auth_url = ''
password = 'YOUR_PASSWORD'
project_id = 'YOUR_PROJECTID'

client = :provider => 'OpenStack',
                          :openstack_auth_url => auth_url,
                          :openstack_username => user,
                          :openstack_api_key  => password,
                          :openstack_tenant => project_id
# Proof of concept: puts all container names
response = client.get_containers()
response.body.each do |container|
  puts container["name"]

Share this article