From abe0929fe9433a1faf82b8990721f100ada4895b Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Fri, 6 Jul 2012 16:24:12 +0100 Subject: [PATCH] fix not pulling InstanceProtocol from the xml --- .../aws/parsers/elb/describe_load_balancers.rb | 2 +- tests/aws/requests/elb/helper.rb | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/fog/aws/parsers/elb/describe_load_balancers.rb b/lib/fog/aws/parsers/elb/describe_load_balancers.rb index b125032b4..c9b92f72c 100644 --- a/lib/fog/aws/parsers/elb/describe_load_balancers.rb +++ b/lib/fog/aws/parsers/elb/describe_load_balancers.rb @@ -83,7 +83,7 @@ module Fog @in_listeners = false when 'PolicyNames' @in_policy_names = false - when 'Protocol', 'SSLCertificateId' + when 'Protocol', 'SSLCertificateId', 'InstanceProtocol' @listener_description['Listener'][name] = value when 'LoadBalancerPort', 'InstancePort' @listener_description['Listener'][name] = value.to_i diff --git a/tests/aws/requests/elb/helper.rb b/tests/aws/requests/elb/helper.rb index 178372440..9fe19ce3d 100644 --- a/tests/aws/requests/elb/helper.rb +++ b/tests/aws/requests/elb/helper.rb @@ -14,13 +14,22 @@ class AWS "DNSName" => String, "HealthCheck" => {"HealthyThreshold" => Integer, "Timeout" => Integer, "UnhealthyThreshold" => Integer, "Interval" => Integer, "Target" => String}, "Instances" => Array, - "ListenerDescriptions" => Array, + "ListenerDescriptions" => [{ + 'PolicyNames' => Array, + 'Listener' => { + 'InstancePort' => Integer, + 'InstanceProtocol' => String, + 'LoadBalancerPort' => Integer, + 'Protocol' => String, + 'SSLCertificateId' => Fog::Nullable::String + } + }], "LoadBalancerName" => String, "Policies" => {"LBCookieStickinessPolicies" => Array, "AppCookieStickinessPolicies" => Array}, "Scheme" => String, - "SecurityGroups" => Fog::Nullable::String, + "SecurityGroups" => [Fog::Nullable::String], "SourceSecurityGroup" => {"GroupName" => String, "OwnerAlias" => String}, - "Subnets" => Fog::Nullable::String + "Subnets" => [Fog::Nullable::String] } CREATE_LOAD_BALANCER = BASIC.merge({