Sha256: 87ae376111e75aa1387f9269f1a344d5c4267bb4de1b811679530d551ff86ce1

Contents?: true

Size: 516 Bytes

Versions: 1

Compression:

Stored size: 516 Bytes

Contents

require 'fog/core/collection'

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

      	model Fog::OracleCloud::Database::Instance

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

        def get(id)
          begin
            new(service.get_instance(id).body)
          rescue Fog::OracleCloud::Database::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/database/instances.rb