Sha256: 122f98d35e714a5041c41ee00b3295ef43a5990f9d6ba3cc83341a9904bfef91

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents

require 'fog/core/collection'

module Fog
  module OracleCloud
    class Java
      class Instances < Fog::Collection

      	model Fog::OracleCloud::Java::Instance

      	def all
          data = service.list_instances().body['services']
          load(data)
        end

        def get(service_name)
        	begin
            new(service.get_instance(service_name).body)
          rescue Fog::OracleCloud::Java::NotFound
            nil
          end
        end

      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.1 lib/fog/oraclecloud/models/java/instances.rb