Sha256: 90bd3a7a68529eaf5a100e1bf257b0f8c946d5bf549dbe238b5c3ce35592f0a4

Contents?: true

Size: 461 Bytes

Versions: 5

Compression:

Stored size: 461 Bytes

Contents

require 'fog_extensions/vsphere/mini_server'

module FogExtensions
  module Vsphere
    class MiniServers

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

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

      private
      attr_reader :client, :dc
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/lib/fog_extensions/vsphere/mini_servers.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/lib/fog_extensions/vsphere/mini_servers.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/lib/fog_extensions/vsphere/mini_servers.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/lib/fog_extensions/vsphere/mini_servers.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/lib/fog_extensions/vsphere/mini_servers.rb