Sha256: 058397c228581b69ec1ad41ebb881058e10e186aa4843c69d2ec3fa6e476ed33

Contents?: true

Size: 840 Bytes

Versions: 13

Compression:

Stored size: 840 Bytes

Contents

require 'mccloud/type/forwarding'
module Mccloud
  module Type
    
  class Lb
    attr_accessor :provider
    attr_accessor :provider_options
    attr_accessor :name
    
    attr_accessor :members
    
    attr_accessor :instance
    
    def initialize
    end
    
    def instance
      if @this_instance.nil?
        begin
          @this_instance=Mccloud.session.config.providers[provider].servers.get(Mccloud.session.all_servers[name.to_s])
        rescue Fog::Service::Error => e
          puts "Error: #{e.message}"
          puts "We could not request the information from your provider #{provider}. We suggest you check your credentials."
          puts "Check configuration file: #{File.join(ENV['HOME'],".fog")}"
          exit -1
        end
      end
      return @this_instance
    end
    
  end
  
end
end #Module Mccloud

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mccloud-0.0.13 lib/mccloud/type/lb.rb
mccloud-0.0.12 lib/mccloud/type/lb.rb
mccloud-0.0.11 lib/mccloud/type/lb.rb
mccloud-0.0.10 lib/mccloud/type/lb.rb
mccloud-0.0.9 lib/mccloud/type/lb.rb
mccloud-0.0.8 lib/mccloud/type/lb.rb
mccloud-0.0.7 lib/mccloud/type/lb.rb
mccloud-0.0.6 lib/mccloud/type/lb.rb
mccloud-0.0.5 lib/mccloud/type/lb.rb
mccloud-0.0.4 lib/mccloud/type/lb.rb
mccloud-0.0.3 lib/mccloud/type/lb.rb
mccloud-0.0.2 lib/mccloud/type/lb.rb
mccloud-0.0.1 lib/mccloud/type/lb.rb