mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|lb] fix for #650 - Connection logging now loads appropriately
This commit is contained in:
parent
71d52a51bf
commit
67655f924a
2 changed files with 7 additions and 7 deletions
|
@ -70,10 +70,6 @@ module Fog
|
|||
virtual_ips.load(new_virtual_ips)
|
||||
end
|
||||
|
||||
def connection_logging
|
||||
attributes[:connection_logging]
|
||||
end
|
||||
|
||||
def enable_connection_logging
|
||||
requires :identity
|
||||
connection.set_connection_logging identity, true
|
||||
|
@ -200,16 +196,15 @@ module Fog
|
|||
def connection_logging=(new_value)
|
||||
if !new_value.nil? and new_value.is_a?(Hash)
|
||||
attributes[:connection_logging] = case new_value['enabled']
|
||||
when 'true'
|
||||
when true,'true'
|
||||
true
|
||||
when 'false'
|
||||
when false,'false'
|
||||
false
|
||||
end
|
||||
else
|
||||
attributes[:connection_logging] = new_value
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,6 +25,11 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer', ['rackspace']) do
|
|||
returns(true) { @instance.connection_logging }
|
||||
end
|
||||
|
||||
tests('#enable_connection_logging after reload').succeeds do
|
||||
@instance.reload
|
||||
returns(true) { @instance.connection_logging }
|
||||
end
|
||||
|
||||
@instance.wait_for { ready? }
|
||||
tests('#disable_connection_logging').succeeds do
|
||||
@instance.disable_connection_logging
|
||||
|
|
Loading…
Reference in a new issue