Sha256: b15eeb0ca4e9b5e74e5d2778125d9ff40d73591bee7b8f512dacddc229f0dc44

Contents?: true

Size: 603 Bytes

Versions: 7

Compression:

Stored size: 603 Bytes

Contents

require 'fog/core/collection'
require 'fog/compute/models/ninefold/server'

module Fog
  module Compute
    class Ninefold

      class Servers < Fog::Collection

        model Fog::Compute::Ninefold::Server

        def all
          data = connection.list_virtual_machines
          load(data)
        end

        def get(identifier)
          return nil if identifier.nil? || identifier == ""
          data = connection.list_virtual_machines(:id => identifier)
          if data.empty?
            nil
          else
            new(data[0])
          end
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/servers.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/servers.rb
fog-0.11.0 lib/fog/compute/models/ninefold/servers.rb
fog-0.10.0 lib/fog/compute/models/ninefold/servers.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/ninefold/servers.rb
fog4encbs-0.9.0 lib/fog/compute/models/ninefold/servers.rb
fog-0.9.0 lib/fog/compute/models/ninefold/servers.rb