1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|lb] Added error pages to the model

This commit is contained in:
Brian Hartsock 2011-12-16 11:40:44 -05:00
parent 87778f5436
commit eb046bf24d
2 changed files with 30 additions and 0 deletions

View file

@ -160,6 +160,21 @@ module Fog
connection.get_load_balancer_usage(identity, options).body
end
def error_page
requires :identity
connection.get_error_page(identity).body['errorpage']['content']
end
def error_page=(content)
requires :identity
connection.set_error_page identity, content
end
def reset_error_page
requires :identity
connection.remove_error_page identity
end
private
def create
requires :name, :protocol, :port, :virtual_ips, :nodes

View file

@ -109,6 +109,21 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer', ['rackspace']) do
@instance.disable_session_persistence
end
@instance.wait_for { ready? }
tests("#error_page").succeeds do
@instance.error_page
end
@instance.wait_for { ready? }
tests("#error_page = 'asdf'").succeeds do
@instance.error_page = 'asdf'
end
@instance.wait_for { ready? }
tests("#reset_error_page").succeeds do
@instance.reset_error_page
end
@instance.wait_for { ready? }
end