mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Tested against AWS. Needed this. Apparently SSLCertificateId == Arn.
This commit is contained in:
parent
b320294c30
commit
db5a0ee9ef
3 changed files with 5 additions and 3 deletions
|
@ -57,7 +57,7 @@ module Fog
|
|||
|
||||
raise Fog::AWS::ELB::IdentifierTaken if self.data[:load_balancers].has_key? lb_name
|
||||
|
||||
certificate_ids = ::AWS[:iam].list_server_certificates.body['Certificates'].collect { |c| c['ServerCertificateId'] }
|
||||
certificate_ids = ::AWS[:iam].list_server_certificates.body['Certificates'].collect { |c| c['Arn'] }
|
||||
|
||||
listeners = [*listeners].map do |listener|
|
||||
if listener['SSLCertificateId'] and !certificate_ids.include? listener['SSLCertificateId']
|
||||
|
|
|
@ -52,7 +52,7 @@ module Fog
|
|||
if load_balancer = self.data[:load_balancers][lb_name]
|
||||
response = Excon::Response.new
|
||||
|
||||
certificate_ids = ::AWS[:iam].list_server_certificates.body['Certificates'].collect { |c| c['ServerCertificateId'] }
|
||||
certificate_ids = ::AWS[:iam].list_server_certificates.body['Certificates'].collect { |c| c['Arn'] }
|
||||
|
||||
listeners.each do |listener|
|
||||
if listener['SSLCertificateId'] and !certificate_ids.include? listener['SSLCertificateId']
|
||||
|
|
|
@ -19,9 +19,11 @@ Shindo.tests('AWS::ELB | listener_tests', ['aws', 'elb']) do
|
|||
AWS[:elb].delete_load_balancer_listeners(@load_balancer_id, ports).body
|
||||
end
|
||||
|
||||
# This is sort of fucked up, but it may or may not fail, thanks AWS
|
||||
tests("#create_load_balancer_listeners with SSL certificate").formats(AWS::ELB::Formats::BASIC) do
|
||||
sleep 1 unless Fog.mocking?
|
||||
listeners = [
|
||||
{'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['ServerCertificateId']},
|
||||
{'Protocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'InstancePort' => 443, 'SSLCertificateId' => @certificate['Arn']},
|
||||
]
|
||||
AWS[:elb].create_load_balancer_listeners(@load_balancer_id, listeners).body
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue