From 8b1e2f5199d15891e91a0098c05a070ec4f7398b Mon Sep 17 00:00:00 2001 From: Benton Roberts Date: Fri, 2 Sep 2011 11:59:50 -0400 Subject: [PATCH] [aws|acs] Update CacheSecurityGroup API to public beta 2011-07-15 --- lib/fog/aws/acs.rb | 4 ++-- lib/fog/aws/models/acs/security_group.rb | 2 +- lib/fog/aws/parsers/acs/security_group_parser.rb | 2 +- lib/fog/aws/requests/acs/create_cache_security_group.rb | 2 +- tests/aws/requests/acs/helper.rb | 2 +- tests/aws/requests/acs/security_group_tests.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/fog/aws/acs.rb b/lib/fog/aws/acs.rb index f7e9911a8..9ef6c1d80 100644 --- a/lib/fog/aws/acs.rb +++ b/lib/fog/aws/acs.rb @@ -55,7 +55,7 @@ module Fog options[:region] ||= 'us-east-1' @host = options[:host] || case options[:region] when 'us-east-1' - 'acsvc.us-east-1.amazonaws.com' + 'elasticache.us-east-1.amazonaws.com' #TODO: Support other regions else raise ArgumentError, "Unknown region: #{options[:region].inspect}" @@ -105,7 +105,7 @@ module Fog when 'CacheSecurityGroupAlreadyExists' raise Fog::AWS::ACS::IdentifierTaken when 'InvalidParameterValue' - raise Fog::AWS::ACE::InvalidInstance + raise Fog::AWS::ACS::InvalidInstance else raise end diff --git a/lib/fog/aws/models/acs/security_group.rb b/lib/fog/aws/models/acs/security_group.rb index 8f74a8de9..fed2e4467 100644 --- a/lib/fog/aws/models/acs/security_group.rb +++ b/lib/fog/aws/models/acs/security_group.rb @@ -7,7 +7,7 @@ module Fog class SecurityGroup < Fog::Model identity :id, :aliases => 'CacheSecurityGroupName' - attribute :description, :aliases => 'CacheSecurityGroupDescription' + attribute :description, :aliases => 'Description' attribute :ec2_groups, :aliases => 'EC2SecurityGroups', :type => :array attribute :owner_id, :aliases => 'OwnerId' diff --git a/lib/fog/aws/parsers/acs/security_group_parser.rb b/lib/fog/aws/parsers/acs/security_group_parser.rb index 052a749e9..cf577121b 100644 --- a/lib/fog/aws/parsers/acs/security_group_parser.rb +++ b/lib/fog/aws/parsers/acs/security_group_parser.rb @@ -24,7 +24,7 @@ module Fog def end_element(name) case name - when 'CacheSecurityGroupDescription', 'CacheSecurityGroupName', 'OwnerId' + when 'Description', 'CacheSecurityGroupName', 'OwnerId' @security_group[name] = value when 'EC2SecurityGroup' @security_group["#{name}s"] << @ec2_group unless @ec2_group.empty? diff --git a/lib/fog/aws/requests/acs/create_cache_security_group.rb b/lib/fog/aws/requests/acs/create_cache_security_group.rb index 24e2723cf..7c504cb2e 100644 --- a/lib/fog/aws/requests/acs/create_cache_security_group.rb +++ b/lib/fog/aws/requests/acs/create_cache_security_group.rb @@ -17,7 +17,7 @@ module Fog request({ 'Action' => 'CreateCacheSecurityGroup', 'CacheSecurityGroupName' => name, - 'CacheSecurityGroupDescription' => description, + 'Description' => description, :parser => Fog::Parsers::AWS::ACS::SingleSecurityGroup.new }) end diff --git a/tests/aws/requests/acs/helper.rb b/tests/aws/requests/acs/helper.rb index 3c4d9758e..e6cdfca75 100644 --- a/tests/aws/requests/acs/helper.rb +++ b/tests/aws/requests/acs/helper.rb @@ -9,7 +9,7 @@ class AWS SECURITY_GROUP = { 'EC2SecurityGroups' => Array, 'CacheSecurityGroupName' => String, - 'CacheSecurityGroupDescription' => String, + 'Description' => String, 'OwnerId' => String } diff --git a/tests/aws/requests/acs/security_group_tests.rb b/tests/aws/requests/acs/security_group_tests.rb index 4a7b9880c..e443c3752 100644 --- a/tests/aws/requests/acs/security_group_tests.rb +++ b/tests/aws/requests/acs/security_group_tests.rb @@ -10,7 +10,7 @@ Shindo.tests('AWS::ACS | security group requests', ['aws', 'acs']) do body = AWS[:acs].create_cache_security_group(name, description).body group = body['CacheSecurityGroup'] returns(name) { group['CacheSecurityGroupName'] } - returns(description) { group['CacheSecurityGroupDescription'] } + returns(description) { group['Description'] } returns([], "no authorized security group") { group['EC2SecurityGroups'] } body end