From d2e06e96ca231767aee805965b5c3cf89cfa854d Mon Sep 17 00:00:00 2001 From: geemus Date: Thu, 4 Aug 2011 16:21:22 -0500 Subject: [PATCH] [rackspace|loadbalancers] cleanup pluralize service name use multi_json fix directory structure for consistency --- lib/fog/bin/rackspace.rb | 6 ++++-- lib/fog/providers/rackspace.rb | 2 +- .../{load_balancer.rb => load_balancers.rb} | 12 ++++++------ .../models/{ => load_balancers}/access_rule.rb | 8 ++++---- .../models/{ => load_balancers}/access_rules.rb | 6 +++--- .../models/{ => load_balancers}/load_balancer.rb | 8 ++++---- .../models/{ => load_balancers}/load_balancers.rb | 10 +++++----- .../rackspace/models/{ => load_balancers}/node.rb | 2 +- .../rackspace/models/{ => load_balancers}/nodes.rb | 8 ++++---- .../models/{ => load_balancers}/virtual_ip.rb | 2 +- .../models/{ => load_balancers}/virtual_ips.rb | 6 +++--- .../{ => load_balancers}/create_access_rule.rb | 4 ++-- .../{ => load_balancers}/create_load_balancer.rb | 4 ++-- .../requests/{ => load_balancers}/create_node.rb | 4 ++-- .../{ => load_balancers}/create_virtual_ip.rb | 4 ++-- .../{ => load_balancers}/delete_access_rule.rb | 2 +- .../{ => load_balancers}/delete_all_access_rules.rb | 2 +- .../{ => load_balancers}/delete_load_balancer.rb | 2 +- .../requests/{ => load_balancers}/delete_node.rb | 2 +- .../requests/{ => load_balancers}/delete_nodes.rb | 2 +- .../{ => load_balancers}/delete_virtual_ip.rb | 2 +- .../{ => load_balancers}/get_connection_logging.rb | 2 +- .../get_connection_throttling.rb | 2 +- .../{ => load_balancers}/get_load_balancer.rb | 2 +- .../{ => load_balancers}/get_load_balancer_usage.rb | 2 +- .../requests/{ => load_balancers}/get_monitor.rb | 2 +- .../requests/{ => load_balancers}/get_node.rb | 2 +- .../{ => load_balancers}/get_session_persistence.rb | 2 +- .../requests/{ => load_balancers}/get_usage.rb | 2 +- .../{ => load_balancers}/list_access_rules.rb | 2 +- .../requests/{ => load_balancers}/list_algorithms.rb | 2 +- .../{ => load_balancers}/list_load_balancers.rb | 2 +- .../requests/{ => load_balancers}/list_nodes.rb | 2 +- .../requests/{ => load_balancers}/list_protocols.rb | 2 +- .../{ => load_balancers}/list_virtual_ips.rb | 2 +- .../remove_connection_throttling.rb | 2 +- .../requests/{ => load_balancers}/remove_monitor.rb | 2 +- .../remove_session_persistence.rb | 2 +- .../{ => load_balancers}/set_connection_logging.rb | 4 ++-- .../set_connection_throttling.rb | 4 ++-- .../requests/{ => load_balancers}/set_monitor.rb | 4 ++-- .../{ => load_balancers}/set_session_persistence.rb | 4 ++-- .../{ => load_balancers}/update_load_balancer.rb | 4 ++-- .../requests/{ => load_balancers}/update_node.rb | 4 ++-- tests/rackspace/helper.rb | 2 +- tests/rackspace/load_balancer_tests.rb | 4 ++-- tests/rackspace/models/access_list_tests.rb | 2 +- tests/rackspace/models/access_lists_tests.rb | 2 +- tests/rackspace/models/load_balancer_tests.rb | 2 +- tests/rackspace/models/load_balancers_tests.rb | 2 +- tests/rackspace/models/node_tests.rb | 2 +- tests/rackspace/models/nodes_tests.rb | 2 +- tests/rackspace/models/virtual_ip_tests.rb | 2 +- tests/rackspace/models/virtual_ips_tests.rb | 2 +- tests/rackspace/requests/access_list_tests.rb | 2 +- tests/rackspace/requests/algorithm_tests.rb | 2 +- tests/rackspace/requests/connection_logging_tests.rb | 2 +- .../requests/connection_throttling_tests.rb | 2 +- tests/rackspace/requests/load_balancer_tests.rb | 2 +- .../rackspace/requests/load_balancer_usage_tests.rb | 2 +- tests/rackspace/requests/monitor_tests.rb | 2 +- tests/rackspace/requests/node_tests.rb | 2 +- tests/rackspace/requests/protocol_tests.rb | 2 +- .../rackspace/requests/session_persistence_tests.rb | 2 +- tests/rackspace/requests/usage_tests.rb | 2 +- tests/rackspace/requests/virtual_ip_tests.rb | 2 +- 66 files changed, 102 insertions(+), 100 deletions(-) rename lib/fog/rackspace/{load_balancer.rb => load_balancers.rb} (94%) rename lib/fog/rackspace/models/{ => load_balancers}/access_rule.rb (84%) rename lib/fog/rackspace/models/{ => load_balancers}/access_rules.rb (80%) rename lib/fog/rackspace/models/{ => load_balancers}/load_balancer.rb (96%) rename lib/fog/rackspace/models/{ => load_balancers}/load_balancers.rb (63%) rename lib/fog/rackspace/models/{ => load_balancers}/node.rb (98%) rename lib/fog/rackspace/models/{ => load_balancers}/nodes.rb (74%) rename lib/fog/rackspace/models/{ => load_balancers}/virtual_ip.rb (97%) rename lib/fog/rackspace/models/{ => load_balancers}/virtual_ips.rb (84%) rename lib/fog/rackspace/requests/{ => load_balancers}/create_access_rule.rb (88%) rename lib/fog/rackspace/requests/{ => load_balancers}/create_load_balancer.rb (90%) rename lib/fog/rackspace/requests/{ => load_balancers}/create_node.rb (91%) rename lib/fog/rackspace/requests/{ => load_balancers}/create_virtual_ip.rb (88%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_access_rule.rb (93%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_all_access_rules.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_load_balancer.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_node.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_nodes.rb (95%) rename lib/fog/rackspace/requests/{ => load_balancers}/delete_virtual_ip.rb (95%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_connection_logging.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_connection_throttling.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_load_balancer.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_load_balancer_usage.rb (96%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_monitor.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_node.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_session_persistence.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/get_usage.rb (95%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_access_rules.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_algorithms.rb (91%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_load_balancers.rb (93%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_nodes.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_protocols.rb (91%) rename lib/fog/rackspace/requests/{ => load_balancers}/list_virtual_ips.rb (94%) rename lib/fog/rackspace/requests/{ => load_balancers}/remove_connection_throttling.rb (93%) rename lib/fog/rackspace/requests/{ => load_balancers}/remove_monitor.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/remove_session_persistence.rb (93%) rename lib/fog/rackspace/requests/{ => load_balancers}/set_connection_logging.rb (85%) rename lib/fog/rackspace/requests/{ => load_balancers}/set_connection_throttling.rb (89%) rename lib/fog/rackspace/requests/{ => load_balancers}/set_monitor.rb (92%) rename lib/fog/rackspace/requests/{ => load_balancers}/set_session_persistence.rb (86%) rename lib/fog/rackspace/requests/{ => load_balancers}/update_load_balancer.rb (90%) rename lib/fog/rackspace/requests/{ => load_balancers}/update_node.rb (91%) diff --git a/lib/fog/bin/rackspace.rb b/lib/fog/bin/rackspace.rb index 1a4be3553..01564558b 100644 --- a/lib/fog/bin/rackspace.rb +++ b/lib/fog/bin/rackspace.rb @@ -9,8 +9,8 @@ class Rackspace < Fog::Bin Fog::Compute::Rackspace when :storage Fog::Storage::Rackspace - when :load_balancer - Fog::Rackspace::LoadBalancer + when :load_balancers + Fog::Rackspace::LoadBalancers else raise ArgumentError, "Unrecognized service: #{key}" end @@ -27,6 +27,8 @@ class Rackspace < Fog::Bin Fog::Compute.new(:provider => 'Rackspace') when :dns Fog::DNS.new(:provider => 'Rackspace') + when :load_balancers + Fog::Rackspace::LoadBalancers.new when :storage Formatador.display_line("[yellow][WARN] Rackspace[:storage] is deprecated, use Storage[:rackspace] instead[/]") Fog::Storage.new(:provider => 'Rackspace') diff --git a/lib/fog/providers/rackspace.rb b/lib/fog/providers/rackspace.rb index 197706bbd..6d3d175b6 100644 --- a/lib/fog/providers/rackspace.rb +++ b/lib/fog/providers/rackspace.rb @@ -8,7 +8,7 @@ module Fog service(:cdn, 'cdn/rackspace') service(:compute, 'compute/rackspace') service(:storage, 'storage/rackspace') - service(:load_balancer, 'rackspace/load_balancer') + service(:load_balancers, 'rackspace/load_balancers') def self.authenticate(options) rackspace_auth_url = options[:rackspace_auth_url] || "auth.api.rackspacecloud.com" diff --git a/lib/fog/rackspace/load_balancer.rb b/lib/fog/rackspace/load_balancers.rb similarity index 94% rename from lib/fog/rackspace/load_balancer.rb rename to lib/fog/rackspace/load_balancers.rb index 5c2c6576c..59254472e 100644 --- a/lib/fog/rackspace/load_balancer.rb +++ b/lib/fog/rackspace/load_balancers.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer < Fog::Service + class LoadBalancers < Fog::Service class ServiceError < Fog::Errors::Error attr_reader :response_data @@ -10,7 +10,7 @@ module Fog data = nil message = nil else - data = JSON.parse(error.response.body) + data = MultiJson.decode(error.response.body) message = data['message'] end @@ -43,7 +43,7 @@ module Fog recognizes :rackspace_auth_url recognizes :rackspace_auth_token - model_path 'fog/rackspace/models' + model_path 'fog/rackspace/models/load_balancers' collection :load_balancers model :load_balancer collection :nodes @@ -53,7 +53,7 @@ module Fog collection :access_rules model :access_rule - request_path 'fog/rackspace/requests' + request_path 'fog/rackspace/requests/load_balancers' request :create_load_balancer request :get_load_balancer request :list_load_balancers @@ -90,7 +90,7 @@ module Fog class Real def initialize(options={}) - require 'json' + require 'multi_json' @rackspace_api_key = options[:rackspace_api_key] @rackspace_username = options[:rackspace_username] @rackspace_auth_url = options[:rackspace_auth_url] @@ -135,7 +135,7 @@ module Fog raise ServiceError.slurp error end unless response.body.empty? - response.body = JSON.parse(response.body) + response.body = MultiJson.decode(response.body) end response end diff --git a/lib/fog/rackspace/models/access_rule.rb b/lib/fog/rackspace/models/load_balancers/access_rule.rb similarity index 84% rename from lib/fog/rackspace/models/access_rule.rb rename to lib/fog/rackspace/models/load_balancers/access_rule.rb index 66cf1f80e..2ff10ec2a 100644 --- a/lib/fog/rackspace/models/access_rule.rb +++ b/lib/fog/rackspace/models/load_balancers/access_rule.rb @@ -2,7 +2,7 @@ require 'fog/core/model' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class AccessRule < Fog::Model identity :id @@ -22,9 +22,9 @@ module Fog connection.create_access_rule(load_balancer.id, address, type) #Unfortunately, access rules creation doesn't return an ID, we require a subsequent list call and comparison - data = connection.list_access_rules(load_balancer.id).body['accessList'] - .select { |ar| ar['address'] == address and ar['type'] == type } - .first + data = connection.list_access_rules(load_balancer.id).body['accessList'].select do |ar| + ar['address'] == address && ar['type'] == type + end.first merge_attributes(data) true end diff --git a/lib/fog/rackspace/models/access_rules.rb b/lib/fog/rackspace/models/load_balancers/access_rules.rb similarity index 80% rename from lib/fog/rackspace/models/access_rules.rb rename to lib/fog/rackspace/models/load_balancers/access_rules.rb index f8d153b5d..7da4acfd5 100644 --- a/lib/fog/rackspace/models/access_rules.rb +++ b/lib/fog/rackspace/models/load_balancers/access_rules.rb @@ -1,11 +1,11 @@ require 'fog/core/collection' -require 'fog/rackspace/models/access_rule' +require 'fog/rackspace/models/load_balancers/access_rule' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class AccessRules < Fog::Collection - model Fog::Rackspace::LoadBalancer::AccessRule + model Fog::Rackspace::LoadBalancers::AccessRule attr_accessor :load_balancer diff --git a/lib/fog/rackspace/models/load_balancer.rb b/lib/fog/rackspace/models/load_balancers/load_balancer.rb similarity index 96% rename from lib/fog/rackspace/models/load_balancer.rb rename to lib/fog/rackspace/models/load_balancers/load_balancer.rb index 44f064d50..5122ddea3 100644 --- a/lib/fog/rackspace/models/load_balancer.rb +++ b/lib/fog/rackspace/models/load_balancers/load_balancer.rb @@ -2,7 +2,7 @@ require 'fog/core/model' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class LoadBalancer < Fog::Model #States @@ -36,7 +36,7 @@ module Fog def access_rules @access_rules ||= begin - Fog::Rackspace::LoadBalancer::AccessRules.new({ + Fog::Rackspace::LoadBalancers::AccessRules.new({ :connection => connection, :load_balancer => self}) end @@ -48,7 +48,7 @@ module Fog def nodes @nodes ||= begin - Fog::Rackspace::LoadBalancer::Nodes.new({ + Fog::Rackspace::LoadBalancers::Nodes.new({ :connection => connection, :load_balancer => self}) end @@ -60,7 +60,7 @@ module Fog def virtual_ips @virtual_ips ||= begin - Fog::Rackspace::LoadBalancer::VirtualIps.new({ + Fog::Rackspace::LoadBalancers::VirtualIps.new({ :connection => connection, :load_balancer => self}) end diff --git a/lib/fog/rackspace/models/load_balancers.rb b/lib/fog/rackspace/models/load_balancers/load_balancers.rb similarity index 63% rename from lib/fog/rackspace/models/load_balancers.rb rename to lib/fog/rackspace/models/load_balancers/load_balancers.rb index aab2005db..c61ff0741 100644 --- a/lib/fog/rackspace/models/load_balancers.rb +++ b/lib/fog/rackspace/models/load_balancers/load_balancers.rb @@ -1,13 +1,13 @@ require 'fog/core/collection' -require 'fog/rackspace/models/load_balancer' +require 'fog/rackspace/models/load_balancers/load_balancer' module Fog module Rackspace - class LoadBalancer + class LoadBalancers - class LoadBalancers < Fog::Collection + class LoadBalancerss < Fog::Collection - model Fog::Rackspace::LoadBalancer::LoadBalancer + model Fog::Rackspace::LoadBalancers::LoadBalancer def all data = connection.list_load_balancers.body['loadBalancers'] @@ -18,7 +18,7 @@ module Fog if load_balancer = connection.get_load_balancer(load_balancer_id).body['loadBalancer'] new(load_balancer) end - rescue Fog::Rackspace::LoadBalancer::NotFound + rescue Fog::Rackspace::LoadBalancers::NotFound nil end end diff --git a/lib/fog/rackspace/models/node.rb b/lib/fog/rackspace/models/load_balancers/node.rb similarity index 98% rename from lib/fog/rackspace/models/node.rb rename to lib/fog/rackspace/models/load_balancers/node.rb index 9da5e38ad..337602272 100644 --- a/lib/fog/rackspace/models/node.rb +++ b/lib/fog/rackspace/models/load_balancers/node.rb @@ -2,7 +2,7 @@ require 'fog/core/model' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Node < Fog::Model identity :id diff --git a/lib/fog/rackspace/models/nodes.rb b/lib/fog/rackspace/models/load_balancers/nodes.rb similarity index 74% rename from lib/fog/rackspace/models/nodes.rb rename to lib/fog/rackspace/models/load_balancers/nodes.rb index c93809f63..2e7bcdad2 100644 --- a/lib/fog/rackspace/models/nodes.rb +++ b/lib/fog/rackspace/models/load_balancers/nodes.rb @@ -1,11 +1,11 @@ require 'fog/core/collection' -require 'fog/rackspace/models/node' +require 'fog/rackspace/models/load_balancers/node' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Nodes < Fog::Collection - model Fog::Rackspace::LoadBalancer::Node + model Fog::Rackspace::LoadBalancers::Node attr_accessor :load_balancer @@ -20,7 +20,7 @@ module Fog if node = connection.get_node(load_balancer.id, node_id).body['node'] new(node) end - rescue Fog::Rackspace::LoadBalancer::NotFound + rescue Fog::Rackspace::LoadBalancers::NotFound nil end end diff --git a/lib/fog/rackspace/models/virtual_ip.rb b/lib/fog/rackspace/models/load_balancers/virtual_ip.rb similarity index 97% rename from lib/fog/rackspace/models/virtual_ip.rb rename to lib/fog/rackspace/models/load_balancers/virtual_ip.rb index c23ba9501..3d535efd9 100644 --- a/lib/fog/rackspace/models/virtual_ip.rb +++ b/lib/fog/rackspace/models/load_balancers/virtual_ip.rb @@ -2,7 +2,7 @@ require 'fog/core/model' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class VirtualIp < Fog::Model identity :id diff --git a/lib/fog/rackspace/models/virtual_ips.rb b/lib/fog/rackspace/models/load_balancers/virtual_ips.rb similarity index 84% rename from lib/fog/rackspace/models/virtual_ips.rb rename to lib/fog/rackspace/models/load_balancers/virtual_ips.rb index c373d3efb..71cbcf450 100644 --- a/lib/fog/rackspace/models/virtual_ips.rb +++ b/lib/fog/rackspace/models/load_balancers/virtual_ips.rb @@ -1,11 +1,11 @@ require 'fog/core/collection' -require 'fog/rackspace/models/virtual_ip' +require 'fog/rackspace/models/load_balancers/virtual_ip' module Fog module Rackspace - class LoadBalancer + class LoadBalancers class VirtualIps < Fog::Collection - model Fog::Rackspace::LoadBalancer::VirtualIp + model Fog::Rackspace::LoadBalancers::VirtualIp attr_accessor :load_balancer diff --git a/lib/fog/rackspace/requests/create_access_rule.rb b/lib/fog/rackspace/requests/load_balancers/create_access_rule.rb similarity index 88% rename from lib/fog/rackspace/requests/create_access_rule.rb rename to lib/fog/rackspace/requests/load_balancers/create_access_rule.rb index f4df6d439..c3ed27598 100644 --- a/lib/fog/rackspace/requests/create_access_rule.rb +++ b/lib/fog/rackspace/requests/load_balancers/create_access_rule.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def create_access_rule(load_balancer_id, address, type) #TODO - This can actually support adding multiple access rules. @@ -12,7 +12,7 @@ module Fog } ]} request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :method => 'POST', :path => "loadbalancers/#{load_balancer_id}/accesslist" diff --git a/lib/fog/rackspace/requests/create_load_balancer.rb b/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb similarity index 90% rename from lib/fog/rackspace/requests/create_load_balancer.rb rename to lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb index 519adec7a..192b65a2d 100644 --- a/lib/fog/rackspace/requests/create_load_balancer.rb +++ b/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def create_load_balancer(name, protocol, port, virtual_ips, nodes) data = { @@ -14,7 +14,7 @@ module Fog } } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => 202, :method => 'POST', :path => 'loadbalancers.json' diff --git a/lib/fog/rackspace/requests/create_node.rb b/lib/fog/rackspace/requests/load_balancers/create_node.rb similarity index 91% rename from lib/fog/rackspace/requests/create_node.rb rename to lib/fog/rackspace/requests/load_balancers/create_node.rb index 95b0b72c8..b1cb6de52 100644 --- a/lib/fog/rackspace/requests/create_node.rb +++ b/lib/fog/rackspace/requests/load_balancers/create_node.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def create_node(load_balancer_id, address, port, condition, options = {}) data = { @@ -15,7 +15,7 @@ module Fog data['nodes'][0]['weight'] = options[:weight] end request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :method => 'POST', :path => "loadbalancers/#{load_balancer_id}/nodes.json" diff --git a/lib/fog/rackspace/requests/create_virtual_ip.rb b/lib/fog/rackspace/requests/load_balancers/create_virtual_ip.rb similarity index 88% rename from lib/fog/rackspace/requests/create_virtual_ip.rb rename to lib/fog/rackspace/requests/load_balancers/create_virtual_ip.rb index 8ab79d134..f29c9e9ad 100644 --- a/lib/fog/rackspace/requests/create_virtual_ip.rb +++ b/lib/fog/rackspace/requests/load_balancers/create_virtual_ip.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def create_virtual_ip(load_balancer_id, type) data = { @@ -8,7 +8,7 @@ module Fog 'ipVersion' => 'IPV6' } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :method => 'POST', :path => "loadbalancers/#{load_balancer_id}/virtualips.json" diff --git a/lib/fog/rackspace/requests/delete_access_rule.rb b/lib/fog/rackspace/requests/load_balancers/delete_access_rule.rb similarity index 93% rename from lib/fog/rackspace/requests/delete_access_rule.rb rename to lib/fog/rackspace/requests/load_balancers/delete_access_rule.rb index 269886053..8b4d9c50e 100644 --- a/lib/fog/rackspace/requests/delete_access_rule.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_access_rule.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_access_rule(load_balancer_id, access_rule_id) request( diff --git a/lib/fog/rackspace/requests/delete_all_access_rules.rb b/lib/fog/rackspace/requests/load_balancers/delete_all_access_rules.rb similarity index 92% rename from lib/fog/rackspace/requests/delete_all_access_rules.rb rename to lib/fog/rackspace/requests/load_balancers/delete_all_access_rules.rb index 7c064890a..5e316a6a9 100644 --- a/lib/fog/rackspace/requests/delete_all_access_rules.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_all_access_rules.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_all_access_rules(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/delete_load_balancer.rb b/lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb similarity index 94% rename from lib/fog/rackspace/requests/delete_load_balancer.rb rename to lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb index fc7d055a9..a5ced4efe 100644 --- a/lib/fog/rackspace/requests/delete_load_balancer.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_load_balancer.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_load_balancer(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/delete_node.rb b/lib/fog/rackspace/requests/load_balancers/delete_node.rb similarity index 94% rename from lib/fog/rackspace/requests/delete_node.rb rename to lib/fog/rackspace/requests/load_balancers/delete_node.rb index a3ce6fd77..f59d66807 100644 --- a/lib/fog/rackspace/requests/delete_node.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_node.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_node(load_balancer_id, node_id) request( diff --git a/lib/fog/rackspace/requests/delete_nodes.rb b/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb similarity index 95% rename from lib/fog/rackspace/requests/delete_nodes.rb rename to lib/fog/rackspace/requests/load_balancers/delete_nodes.rb index 4172d29b2..4d2b12b0b 100644 --- a/lib/fog/rackspace/requests/delete_nodes.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_nodes.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_nodes(load_balancer_id, *node_ids) query_string = node_ids.collect { |node_id| "id=#{node_id}" }.join('&') diff --git a/lib/fog/rackspace/requests/delete_virtual_ip.rb b/lib/fog/rackspace/requests/load_balancers/delete_virtual_ip.rb similarity index 95% rename from lib/fog/rackspace/requests/delete_virtual_ip.rb rename to lib/fog/rackspace/requests/load_balancers/delete_virtual_ip.rb index 81172a482..198b3f9e1 100644 --- a/lib/fog/rackspace/requests/delete_virtual_ip.rb +++ b/lib/fog/rackspace/requests/load_balancers/delete_virtual_ip.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def delete_virtual_ip(load_balancer_id, virtual_ip_id) request( diff --git a/lib/fog/rackspace/requests/get_connection_logging.rb b/lib/fog/rackspace/requests/load_balancers/get_connection_logging.rb similarity index 92% rename from lib/fog/rackspace/requests/get_connection_logging.rb rename to lib/fog/rackspace/requests/load_balancers/get_connection_logging.rb index 0fd693c36..e9494b764 100644 --- a/lib/fog/rackspace/requests/get_connection_logging.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_connection_logging.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_connection_logging(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/get_connection_throttling.rb b/lib/fog/rackspace/requests/load_balancers/get_connection_throttling.rb similarity index 92% rename from lib/fog/rackspace/requests/get_connection_throttling.rb rename to lib/fog/rackspace/requests/load_balancers/get_connection_throttling.rb index 73fabce4f..8ec5465f2 100644 --- a/lib/fog/rackspace/requests/get_connection_throttling.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_connection_throttling.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_connection_throttling(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/get_load_balancer.rb b/lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb similarity index 94% rename from lib/fog/rackspace/requests/get_load_balancer.rb rename to lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb index ead2de8c5..40a8df42f 100644 --- a/lib/fog/rackspace/requests/get_load_balancer.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_load_balancer.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_load_balancer(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/get_load_balancer_usage.rb b/lib/fog/rackspace/requests/load_balancers/get_load_balancer_usage.rb similarity index 96% rename from lib/fog/rackspace/requests/get_load_balancer_usage.rb rename to lib/fog/rackspace/requests/load_balancers/get_load_balancer_usage.rb index d49577659..dc65c1ddf 100644 --- a/lib/fog/rackspace/requests/get_load_balancer_usage.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_load_balancer_usage.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_load_balancer_usage(load_balancer_id, options = {}) #TODO - Didn't implement usage/current. Not sure if it is needed diff --git a/lib/fog/rackspace/requests/get_monitor.rb b/lib/fog/rackspace/requests/load_balancers/get_monitor.rb similarity index 92% rename from lib/fog/rackspace/requests/get_monitor.rb rename to lib/fog/rackspace/requests/load_balancers/get_monitor.rb index 666cae516..0a6205ccb 100644 --- a/lib/fog/rackspace/requests/get_monitor.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_monitor.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_monitor(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/get_node.rb b/lib/fog/rackspace/requests/load_balancers/get_node.rb similarity index 94% rename from lib/fog/rackspace/requests/get_node.rb rename to lib/fog/rackspace/requests/load_balancers/get_node.rb index 22661a987..83d933c31 100644 --- a/lib/fog/rackspace/requests/get_node.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_node.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_node(load_balancer_id, node_id) request( diff --git a/lib/fog/rackspace/requests/get_session_persistence.rb b/lib/fog/rackspace/requests/load_balancers/get_session_persistence.rb similarity index 92% rename from lib/fog/rackspace/requests/get_session_persistence.rb rename to lib/fog/rackspace/requests/load_balancers/get_session_persistence.rb index 18d0494d6..fc7d81852 100644 --- a/lib/fog/rackspace/requests/get_session_persistence.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_session_persistence.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_session_persistence(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/get_usage.rb b/lib/fog/rackspace/requests/load_balancers/get_usage.rb similarity index 95% rename from lib/fog/rackspace/requests/get_usage.rb rename to lib/fog/rackspace/requests/load_balancers/get_usage.rb index a2c5d0805..1c2a117ec 100644 --- a/lib/fog/rackspace/requests/get_usage.rb +++ b/lib/fog/rackspace/requests/load_balancers/get_usage.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def get_usage(options = {}) if options.has_key? :start_time and options.has_key? :end_time diff --git a/lib/fog/rackspace/requests/list_access_rules.rb b/lib/fog/rackspace/requests/load_balancers/list_access_rules.rb similarity index 92% rename from lib/fog/rackspace/requests/list_access_rules.rb rename to lib/fog/rackspace/requests/load_balancers/list_access_rules.rb index 53071820a..41dd44700 100644 --- a/lib/fog/rackspace/requests/list_access_rules.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_access_rules.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_access_rules(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/list_algorithms.rb b/lib/fog/rackspace/requests/load_balancers/list_algorithms.rb similarity index 91% rename from lib/fog/rackspace/requests/list_algorithms.rb rename to lib/fog/rackspace/requests/load_balancers/list_algorithms.rb index 44bd11e41..1c743de57 100644 --- a/lib/fog/rackspace/requests/list_algorithms.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_algorithms.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_algorithms request( diff --git a/lib/fog/rackspace/requests/list_load_balancers.rb b/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb similarity index 93% rename from lib/fog/rackspace/requests/list_load_balancers.rb rename to lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb index a38c85b5b..a19094635 100644 --- a/lib/fog/rackspace/requests/list_load_balancers.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_load_balancers.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_load_balancers request( diff --git a/lib/fog/rackspace/requests/list_nodes.rb b/lib/fog/rackspace/requests/load_balancers/list_nodes.rb similarity index 94% rename from lib/fog/rackspace/requests/list_nodes.rb rename to lib/fog/rackspace/requests/load_balancers/list_nodes.rb index 2089d5428..8eeaa4c2d 100644 --- a/lib/fog/rackspace/requests/list_nodes.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_nodes.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_nodes(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/list_protocols.rb b/lib/fog/rackspace/requests/load_balancers/list_protocols.rb similarity index 91% rename from lib/fog/rackspace/requests/list_protocols.rb rename to lib/fog/rackspace/requests/load_balancers/list_protocols.rb index cecb285e8..8b00c8fdf 100644 --- a/lib/fog/rackspace/requests/list_protocols.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_protocols.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_protocols request( diff --git a/lib/fog/rackspace/requests/list_virtual_ips.rb b/lib/fog/rackspace/requests/load_balancers/list_virtual_ips.rb similarity index 94% rename from lib/fog/rackspace/requests/list_virtual_ips.rb rename to lib/fog/rackspace/requests/load_balancers/list_virtual_ips.rb index f888b014e..7cdbc075f 100644 --- a/lib/fog/rackspace/requests/list_virtual_ips.rb +++ b/lib/fog/rackspace/requests/load_balancers/list_virtual_ips.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def list_virtual_ips(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/remove_connection_throttling.rb b/lib/fog/rackspace/requests/load_balancers/remove_connection_throttling.rb similarity index 93% rename from lib/fog/rackspace/requests/remove_connection_throttling.rb rename to lib/fog/rackspace/requests/load_balancers/remove_connection_throttling.rb index 0074da2c0..b8fbdd8de 100644 --- a/lib/fog/rackspace/requests/remove_connection_throttling.rb +++ b/lib/fog/rackspace/requests/load_balancers/remove_connection_throttling.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def remove_connection_throttling(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/remove_monitor.rb b/lib/fog/rackspace/requests/load_balancers/remove_monitor.rb similarity index 92% rename from lib/fog/rackspace/requests/remove_monitor.rb rename to lib/fog/rackspace/requests/load_balancers/remove_monitor.rb index 03cf96afc..089bdf05a 100644 --- a/lib/fog/rackspace/requests/remove_monitor.rb +++ b/lib/fog/rackspace/requests/load_balancers/remove_monitor.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def remove_monitor(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/remove_session_persistence.rb b/lib/fog/rackspace/requests/load_balancers/remove_session_persistence.rb similarity index 93% rename from lib/fog/rackspace/requests/remove_session_persistence.rb rename to lib/fog/rackspace/requests/load_balancers/remove_session_persistence.rb index f93576e64..2f3471cfa 100644 --- a/lib/fog/rackspace/requests/remove_session_persistence.rb +++ b/lib/fog/rackspace/requests/load_balancers/remove_session_persistence.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def remove_session_persistence(load_balancer_id) request( diff --git a/lib/fog/rackspace/requests/set_connection_logging.rb b/lib/fog/rackspace/requests/load_balancers/set_connection_logging.rb similarity index 85% rename from lib/fog/rackspace/requests/set_connection_logging.rb rename to lib/fog/rackspace/requests/load_balancers/set_connection_logging.rb index 7e1f032a8..9d59d10d1 100644 --- a/lib/fog/rackspace/requests/set_connection_logging.rb +++ b/lib/fog/rackspace/requests/load_balancers/set_connection_logging.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def set_connection_logging(load_balancer_id, value) data = { @@ -9,7 +9,7 @@ module Fog } } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :path => "loadbalancers/#{load_balancer_id}/connectionlogging", :method => 'PUT' diff --git a/lib/fog/rackspace/requests/set_connection_throttling.rb b/lib/fog/rackspace/requests/load_balancers/set_connection_throttling.rb similarity index 89% rename from lib/fog/rackspace/requests/set_connection_throttling.rb rename to lib/fog/rackspace/requests/load_balancers/set_connection_throttling.rb index 1b8fb00b4..3918f94d9 100644 --- a/lib/fog/rackspace/requests/set_connection_throttling.rb +++ b/lib/fog/rackspace/requests/load_balancers/set_connection_throttling.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def set_connection_throttling(load_balancer_id, max_connections, min_connections, max_connection_rate, rate_interval) data = { @@ -10,7 +10,7 @@ module Fog 'rateInterval' => rate_interval } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :path => "loadbalancers/#{load_balancer_id}/connectionthrottle", :method => 'PUT' diff --git a/lib/fog/rackspace/requests/set_monitor.rb b/lib/fog/rackspace/requests/load_balancers/set_monitor.rb similarity index 92% rename from lib/fog/rackspace/requests/set_monitor.rb rename to lib/fog/rackspace/requests/load_balancers/set_monitor.rb index 9b7197016..b55a1f0ea 100644 --- a/lib/fog/rackspace/requests/set_monitor.rb +++ b/lib/fog/rackspace/requests/load_balancers/set_monitor.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def set_monitor(load_balancer_id, type, delay, timeout, attempsBeforeDeactivation, options = {}) data = { @@ -19,7 +19,7 @@ module Fog data['statusRegex'] = options[:status_regex] end request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :path => "loadbalancers/#{load_balancer_id}/healthmonitor", :method => 'PUT' diff --git a/lib/fog/rackspace/requests/set_session_persistence.rb b/lib/fog/rackspace/requests/load_balancers/set_session_persistence.rb similarity index 86% rename from lib/fog/rackspace/requests/set_session_persistence.rb rename to lib/fog/rackspace/requests/load_balancers/set_session_persistence.rb index 0ca1672df..d9ae4c5ef 100644 --- a/lib/fog/rackspace/requests/set_session_persistence.rb +++ b/lib/fog/rackspace/requests/load_balancers/set_session_persistence.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def set_session_persistence(load_balancer_id, persistence_type) data = { @@ -9,7 +9,7 @@ module Fog } } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :path => "loadbalancers/#{load_balancer_id}/sessionpersistence", :method => 'PUT' diff --git a/lib/fog/rackspace/requests/update_load_balancer.rb b/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb similarity index 90% rename from lib/fog/rackspace/requests/update_load_balancer.rb rename to lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb index 350f4eb6b..96fd40ecf 100644 --- a/lib/fog/rackspace/requests/update_load_balancer.rb +++ b/lib/fog/rackspace/requests/load_balancers/update_load_balancer.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def update_load_balancer(load_balancer_id, options = {}) data = { @@ -12,7 +12,7 @@ module Fog } } request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => 202, :method => 'PUT', :path => "loadbalancers/#{load_balancer_id}.json" diff --git a/lib/fog/rackspace/requests/update_node.rb b/lib/fog/rackspace/requests/load_balancers/update_node.rb similarity index 91% rename from lib/fog/rackspace/requests/update_node.rb rename to lib/fog/rackspace/requests/load_balancers/update_node.rb index 50cd68cb8..760102c87 100644 --- a/lib/fog/rackspace/requests/update_node.rb +++ b/lib/fog/rackspace/requests/load_balancers/update_node.rb @@ -1,6 +1,6 @@ module Fog module Rackspace - class LoadBalancer + class LoadBalancers class Real def update_node(load_balancer_id, node_id, options = {}) data = { @@ -14,7 +14,7 @@ module Fog end #TODO - Do anything if no valid options are passed in? request( - :body => data.to_json, + :body => MultiJson.encode(data), :expects => [200, 202], :method => 'PUT', :path => "loadbalancers/#{load_balancer_id}/nodes/#{node_id}.json" diff --git a/tests/rackspace/helper.rb b/tests/rackspace/helper.rb index a77e6505a..d1e05ef21 100644 --- a/tests/rackspace/helper.rb +++ b/tests/rackspace/helper.rb @@ -1,7 +1,7 @@ module Shindo class Tests def given_a_load_balancer_service(&block) - @service = Fog::Rackspace::LoadBalancer.new + @service = Fog::Rackspace::LoadBalancers.new instance_eval(&block) end def given_a_load_balancer(&block) diff --git a/tests/rackspace/load_balancer_tests.rb b/tests/rackspace/load_balancer_tests.rb index 0555efbd1..c2ed221da 100644 --- a/tests/rackspace/load_balancer_tests.rb +++ b/tests/rackspace/load_balancer_tests.rb @@ -1,6 +1,6 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers', ['rackspace']) do - @service = Fog::Rackspace::LoadBalancer.new + @service = Fog::Rackspace::LoadBalancers.new tests('#algorithms').succeeds do data = @service.algorithms diff --git a/tests/rackspace/models/access_list_tests.rb b/tests/rackspace/models/access_list_tests.rb index c3c3dd596..618af9eea 100644 --- a/tests/rackspace/models/access_list_tests.rb +++ b/tests/rackspace/models/access_list_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | access_list', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | access_list', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/models/access_lists_tests.rb b/tests/rackspace/models/access_lists_tests.rb index 9ccc41418..641fd1921 100644 --- a/tests/rackspace/models/access_lists_tests.rb +++ b/tests/rackspace/models/access_lists_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | access_lists', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | access_lists', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/models/load_balancer_tests.rb b/tests/rackspace/models/load_balancer_tests.rb index 1071dfe19..8587356de 100644 --- a/tests/rackspace/models/load_balancer_tests.rb +++ b/tests/rackspace/models/load_balancer_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | load_balancer', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer', ['rackspace']) do LOAD_BALANCER_ATTRIBUTES = { :name => 'fog' + Time.now.to_i.to_s, diff --git a/tests/rackspace/models/load_balancers_tests.rb b/tests/rackspace/models/load_balancers_tests.rb index 3e56f57d3..efa89c863 100644 --- a/tests/rackspace/models/load_balancers_tests.rb +++ b/tests/rackspace/models/load_balancers_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | load_balancers', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancers', ['rackspace']) do given_a_load_balancer_service do @lb_name = 'fog' + Time.now.to_i.to_s diff --git a/tests/rackspace/models/node_tests.rb b/tests/rackspace/models/node_tests.rb index 471c00341..eb802ab43 100644 --- a/tests/rackspace/models/node_tests.rb +++ b/tests/rackspace/models/node_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | node', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | node', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/models/nodes_tests.rb b/tests/rackspace/models/nodes_tests.rb index 1d2183979..4fe90a003 100644 --- a/tests/rackspace/models/nodes_tests.rb +++ b/tests/rackspace/models/nodes_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | nodes', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | nodes', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/models/virtual_ip_tests.rb b/tests/rackspace/models/virtual_ip_tests.rb index 040f1205d..2db16b750 100644 --- a/tests/rackspace/models/virtual_ip_tests.rb +++ b/tests/rackspace/models/virtual_ip_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | virtual_ip', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | virtual_ip', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/models/virtual_ips_tests.rb b/tests/rackspace/models/virtual_ips_tests.rb index 50d48f396..0e19df1b3 100644 --- a/tests/rackspace/models/virtual_ips_tests.rb +++ b/tests/rackspace/models/virtual_ips_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | virtual_ips', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | virtual_ips', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/access_list_tests.rb b/tests/rackspace/requests/access_list_tests.rb index 82dfcbded..fc331196d 100644 --- a/tests/rackspace/requests/access_list_tests.rb +++ b/tests/rackspace/requests/access_list_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | access_lists_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | access_lists_tests', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/algorithm_tests.rb b/tests/rackspace/requests/algorithm_tests.rb index 1999d70f8..b54b36047 100644 --- a/tests/rackspace/requests/algorithm_tests.rb +++ b/tests/rackspace/requests/algorithm_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | algorithm_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | algorithm_tests', ['rackspace']) do ALGORITHMS_FORMAT = { 'algorithms' => [ diff --git a/tests/rackspace/requests/connection_logging_tests.rb b/tests/rackspace/requests/connection_logging_tests.rb index 1c795eff7..f7665a42e 100644 --- a/tests/rackspace/requests/connection_logging_tests.rb +++ b/tests/rackspace/requests/connection_logging_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | connection_logging', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | connection_logging', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/connection_throttling_tests.rb b/tests/rackspace/requests/connection_throttling_tests.rb index 049606849..5ea542448 100644 --- a/tests/rackspace/requests/connection_throttling_tests.rb +++ b/tests/rackspace/requests/connection_throttling_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | connection_throttling', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | connection_throttling', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/load_balancer_tests.rb b/tests/rackspace/requests/load_balancer_tests.rb index da189b663..64edc97d9 100644 --- a/tests/rackspace/requests/load_balancer_tests.rb +++ b/tests/rackspace/requests/load_balancer_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | load_balancer_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace']) do given_a_load_balancer_service do tests('success') do diff --git a/tests/rackspace/requests/load_balancer_usage_tests.rb b/tests/rackspace/requests/load_balancer_usage_tests.rb index 743512eee..083ac0ecb 100644 --- a/tests/rackspace/requests/load_balancer_usage_tests.rb +++ b/tests/rackspace/requests/load_balancer_usage_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | load_balancer_usage', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_usage', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/monitor_tests.rb b/tests/rackspace/requests/monitor_tests.rb index 8ab2dbbcd..eaf98b599 100644 --- a/tests/rackspace/requests/monitor_tests.rb +++ b/tests/rackspace/requests/monitor_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | monitor', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | monitor', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/node_tests.rb b/tests/rackspace/requests/node_tests.rb index 851c23ef5..ed51f2d82 100644 --- a/tests/rackspace/requests/node_tests.rb +++ b/tests/rackspace/requests/node_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | load_balancer_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_tests', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/protocol_tests.rb b/tests/rackspace/requests/protocol_tests.rb index 878f417ac..052e45c1c 100644 --- a/tests/rackspace/requests/protocol_tests.rb +++ b/tests/rackspace/requests/protocol_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | protocol_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | protocol_tests', ['rackspace']) do PROTOCOLS_FORMAT = { 'protocols' => [ diff --git a/tests/rackspace/requests/session_persistence_tests.rb b/tests/rackspace/requests/session_persistence_tests.rb index bea78f8ed..2f9794795 100644 --- a/tests/rackspace/requests/session_persistence_tests.rb +++ b/tests/rackspace/requests/session_persistence_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | session_persistence', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | session_persistence', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do diff --git a/tests/rackspace/requests/usage_tests.rb b/tests/rackspace/requests/usage_tests.rb index 7c67bcb7e..516a5e3cf 100644 --- a/tests/rackspace/requests/usage_tests.rb +++ b/tests/rackspace/requests/usage_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | usage', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | usage', ['rackspace']) do given_a_load_balancer_service do tests('success') do diff --git a/tests/rackspace/requests/virtual_ip_tests.rb b/tests/rackspace/requests/virtual_ip_tests.rb index 67bcc288a..598f3d64c 100644 --- a/tests/rackspace/requests/virtual_ip_tests.rb +++ b/tests/rackspace/requests/virtual_ip_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Fog::Rackspace::LoadBalancer | virtual_ip_tests', ['rackspace']) do +Shindo.tests('Fog::Rackspace::LoadBalancers | virtual_ip_tests', ['rackspace']) do given_a_load_balancer_service do given_a_load_balancer do