class Fog::Compute::Voxel::Mock

Public Class Methods

data() click to toggle source
# File lib/fog/compute/voxel.rb, line 31
def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {
        :last_modified => { :servers => {}, :statuses => {}, :images => {} },
        :servers => [],
        :statuses => {},
        :images  => [
            {'id' => 1,   'name' => "CentOS 4, 32-bit, base install"},
            {'id' => 2,   'name' => "CentOS 4, 64-bit, base install"},
            {'id' => 3,   'name' => "CentOS 5, 32-bit, base install"},
            {'id' => 4,   'name' => "CentOS 5, 64-bit, base install"},
            {'id' => 7,   'name' => "Fedora 10, 32-bit, base install"},
            {'id' => 8,   'name' => "Fedora 10, 64-bit, base install"},
            {'id' => 10,  'name' => "OpenSUSE 11, 64-bit, base install"},
            {'id' => 11,  'name' => "Debian 5.0 \"lenny\", 32-bit, base install"},
            {'id' => 12,  'name' => "Debian 5.0 \"lenny\", 64-bit, base install"},
            {'id' => 13,  'name' => "Ubuntu 8.04 \"Hardy\", 32-bit, base install"},
            {'id' => 14,  'name' => "Ubuntu 8.04 \"Hardy\", 64-bit, base install"},
            {'id' => 15,  'name' => "Voxel Server Environment (VSE), 32-bit, base install"},
            {'id' => 16,  'name' => "Voxel Server Environment (VSE), 64-bit, base install"},
            {'id' => 32,  'name' => "Pantheon Official Mercury Stack for Drupal (based on VSE/64)"},
            {'id' => 55,  'name' => "Ubuntu 10.04 \"Lucid\", 64-bit, base install"} ]
    }
  end
end
new(options={}) click to toggle source
# File lib/fog/compute/voxel.rb, line 61
def initialize(options={})
  @voxel_api_key = options[:voxel_api_key]
end
reset() click to toggle source
# File lib/fog/compute/voxel.rb, line 57
def self.reset
  @data = nil
end

Public Instance Methods

data() click to toggle source
# File lib/fog/compute/voxel.rb, line 65
def data
  self.class.data[@voxel_api_key]
end
reset_data() click to toggle source
# File lib/fog/compute/voxel.rb, line 69
def reset_data
  self.class.data.delete(@voxel_api_key)
end