mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[elb] cleanup
This commit is contained in:
parent
70f120af47
commit
0e90decc4e
2 changed files with 11 additions and 5 deletions
|
@ -44,14 +44,14 @@ module Fog
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
@hmac = HMAC::SHA256.new(@aws_secret_access_key)
|
@hmac = HMAC::SHA256.new(@aws_secret_access_key)
|
||||||
@host = options[:host] || case options[:region]
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-southeast-1'
|
||||||
|
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
||||||
when 'eu-west-1'
|
when 'eu-west-1'
|
||||||
'elasticloadbalancing.eu-west-1.amazonaws.com'
|
'elasticloadbalancing.eu-west-1.amazonaws.com'
|
||||||
when 'us-east-1'
|
when 'us-east-1'
|
||||||
'elasticloadbalancing.us-east-1.amazonaws.com'
|
'elasticloadbalancing.us-east-1.amazonaws.com'
|
||||||
when 'us-west-1'
|
when 'us-west-1'
|
||||||
'elasticloadbalancing.us-west-1.amazonaws.com'
|
'elasticloadbalancing.us-west-1.amazonaws.com'
|
||||||
when 'ap-southeast-1'
|
|
||||||
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
|
||||||
else
|
else
|
||||||
'elasticloadbalancing.amazonaws.com'
|
'elasticloadbalancing.amazonaws.com'
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,9 +36,7 @@ module Fog
|
||||||
# * 'AvailabilityZones'<~Array> - list of availability zones covered by this load balancer
|
# * 'AvailabilityZones'<~Array> - list of availability zones covered by this load balancer
|
||||||
# * 'Instances'<~Array> - list of instances that the load balancer balances between
|
# * 'Instances'<~Array> - list of instances that the load balancer balances between
|
||||||
def describe_load_balancers(lb_name = [])
|
def describe_load_balancers(lb_name = [])
|
||||||
lb_name = [lb_name] if lb_name.instance_of?(String)
|
params = AWS.indexed_param('LoadBalancerNames.member', [*lb_name])
|
||||||
lb_name.unshift(nil)
|
|
||||||
params = AWS.indexed_param('LoadBalancerNames.member', lb_name)
|
|
||||||
request({
|
request({
|
||||||
'Action' => 'DescribeLoadBalancers',
|
'Action' => 'DescribeLoadBalancers',
|
||||||
:parser => Fog::Parsers::AWS::ELB::DescribeLoadBalancers.new
|
:parser => Fog::Parsers::AWS::ELB::DescribeLoadBalancers.new
|
||||||
|
@ -46,6 +44,14 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Mock
|
||||||
|
|
||||||
|
def describe_load_balancers(lb_name = [])
|
||||||
|
raise MockNotImplemented.new("Contributions welcome!")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue