Sha256: 0ad4e8161de31597a98072af38537805dcf8533e3381f9943f81bee3514c4584

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 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

1 entries across 1 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.12 lib/fog/oraclecloud/models/java/servers.rb