Class: Fog::Voxel::Compute::Mock

Inherits:
Object
  • Object
show all
Includes:
Collections
Defined in:
lib/fog/compute/voxel.rb,
lib/fog/compute/requests/voxel/voxcloud_status.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



55
56
57
# File 'lib/fog/compute/voxel.rb', line 55

def initialize(options={})
  @data = self.class.data
end

Class Method Details

.dataObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fog/compute/voxel.rb', line 25

def self.data
  @data ||= {
    :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

.reset_data(keys = data.keys) ⇒ Object



49
50
51
52
53
# File 'lib/fog/compute/voxel.rb', line 49

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#voxcloud_status(device_id = nil) ⇒ Object



23
24
25
# File 'lib/fog/compute/requests/voxel/voxcloud_status.rb', line 23

def voxcloud_status(device_id = nil)
  Fog::Mock.not_implemented
end