Sha256: 112fd4ea01a7c2c55abd76f73c8e7203caab721e471c60704f0a2734f1b5add4

Contents?: true

Size: 601 Bytes

Versions: 5

Compression:

Stored size: 601 Bytes

Contents

require 'fog/core/collection'

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

        model Fog::OracleCloud::Java::Server

        def all(service_name)
          data = service.list_servers(service_name).body['servers']
          data.each { |s| s['service_name'] = service_name }
          load(data)
        end

        def get(service_name, server_name)
          data = service.get_server(service_name, server_name).body['servers'].first
          data['service_name'] = service_name          
          new(data)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.17 lib/fog/oraclecloud/models/java/servers.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/models/java/servers.rb
fog-oraclecloud-0.1.15 lib/fog/oraclecloud/models/java/servers.rb
fog-oraclecloud-0.1.14 lib/fog/oraclecloud/models/java/servers.rb
fog-oraclecloud-0.1.13 lib/fog/oraclecloud/models/java/servers.rb