Class: FogExtensions::Vsphere::MiniServers

Inherits:
Object
  • Object
show all
Defined in:
lib/fog_extensions/vsphere/mini_servers.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, dc) ⇒ MiniServers


7
8
9
10
# File 'lib/fog_extensions/vsphere/mini_servers.rb', line 7

def initialize client, dc
  @client = client
  @dc     = client.send(:find_datacenters, dc)[0]
end

Instance Method Details

#all(filters = { }) ⇒ Object


12
13
14
15
16
# File 'lib/fog_extensions/vsphere/mini_servers.rb', line 12

def all(filters = { })
  dc.vmFolder.childEntity.grep(RbVmomi::VIM::VirtualMachine).map do |server|
    MiniServer.new(server)
  end
end