Sha256: 5ca30bc949be6ad1afe63be19d2b07057e11319881e1e1936c8c881c8b437906

Contents?: true

Size: 535 Bytes

Versions: 4

Compression:

Stored size: 535 Bytes

Contents

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

module Fog
  module Compute
    class Ecloud
      class OperatingSystems < Fog::Ecloud::Collection
        model Fog::Compute::Ecloud::OperatingSystem

        identity :data

        def all
          load(data)
        end

        def get(uri)
          if data = service.get_operating_system(uri)
            new(data.body)
          end
        rescue ServiceError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 2 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/operating_systems.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/operating_systems.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/operating_systems.rb
fog-ecloud-0.3.0 lib/fog/compute/ecloud/models/operating_systems.rb