Sha256: 26fdfd69f1d404e7bbcb75c6aee9aff874388a8eaa42defcb20096ca9703ad68

Contents?: true

Size: 569 Bytes

Versions: 6

Compression:

Stored size: 569 Bytes

Contents

require File.expand_path("../physical_device", __FILE__)

module Fog
  module Compute
    class Ecloud
      class PhysicalDevices < Fog::Ecloud::Collection
        identity :href

        model Fog::Compute::Ecloud::PhysicalDevice

        def all
          data = service.get_physical_devices(href).body[:PhysicalDevice] || []
          load(data)
        end

        def get(uri)
          if data = service.get_physical_device(uri)
            new(data.body)
          end
        rescue Fog::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-ecloud-0.1.1/lib/fog/compute/ecloud/models/physical_devices.rb
fog-ecloud-0.2.0 lib/fog/compute/ecloud/models/physical_devices.rb
fog-ecloud-0.1.3 lib/fog/compute/ecloud/models/physical_devices.rb
fog-ecloud-0.1.2 lib/fog/compute/ecloud/models/physical_devices.rb
fog-ecloud-0.1.1 lib/fog/compute/ecloud/models/physical_devices.rb
fog-ecloud-0.1.0 lib/fog/compute/ecloud/models/physical_devices.rb