Class: Miasma::Models::LoadBalancer

Inherits:
Types::Api show all
Defined in:
lib/miasma/models/load_balancer.rb,
lib/miasma/contrib/aws/load_balancer.rb,
lib/miasma/models/load_balancer/balancer.rb,
lib/miasma/models/load_balancer/balancers.rb,
lib/miasma/contrib/rackspace/load_balancer.rb

Overview

Abstract load balancer API

Direct Known Subclasses

Aws, Rackspace

Defined Under Namespace

Classes: Aws, Balancer, Balancers, Rackspace

Instance Method Summary collapse

Methods inherited from Types::Api

#api_for, #connect, #connection, #endpoint, #format_response, #initialize, #make_request, #provider, #request

Methods included from Utils::Memoization

#_memo, #clear_memoizations!, #memoize, #unmemoize

Methods included from Utils::Lazy

included

Constructor Details

This class inherits a constructor from Miasma::Types::Api

Instance Method Details

#balancer_all(options = {}) ⇒ Array<Models::LoadBalancer::Balancer>

Return all load balancers

Parameters:

  • options (Hash) (defaults to: {})

    filter

Returns:

Raises:

  • (NotImplementedError)


49
50
51
# File 'lib/miasma/models/load_balancer.rb', line 49

def balancer_all(options={})
  raise NotImplementedError
end

#balancer_destroy(balancer) ⇒ TrueClass, FalseClass

Delete load balancer

Parameters:

Returns:

  • (TrueClass, FalseClass)

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/miasma/models/load_balancer.rb', line 41

def balancer_destroy(balancer)
  raise NotImplementedError
end

#balancer_reload(balancer) ⇒ Models::LoadBalancer::Balancer

Reload the balancer data from the API

Parameters:

Returns:

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/miasma/models/load_balancer.rb', line 33

def balancer_reload(balancer)
  raise NotImplementedError
end

#balancer_save(balancer) ⇒ Models::LoadBalancer::Balancer

Save load balancer

Parameters:

Returns:

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/miasma/models/load_balancer.rb', line 25

def balancer_save(balancer)
  raise NotImplementedError
end

#balancers(filter = {}) ⇒ Types::Collection<Models::LoadBalancer::Balancer>

Load balancers

Parameters:

  • filter (Hash) (defaults to: {})

    filtering options

Returns:



15
16
17
18
19
# File 'lib/miasma/models/load_balancer.rb', line 15

def balancers(filter={})
  memoize(:balancers) do
    Balancers.new(self)
  end
end