mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|acs] Update CacheSecurityGroup API to public beta 2011-07-15
This commit is contained in:
parent
580d49e8ff
commit
8b1e2f5199
6 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -17,7 +17,7 @@ module Fog
|
|||
request({
|
||||
'Action' => 'CreateCacheSecurityGroup',
|
||||
'CacheSecurityGroupName' => name,
|
||||
'CacheSecurityGroupDescription' => description,
|
||||
'Description' => description,
|
||||
:parser => Fog::Parsers::AWS::ACS::SingleSecurityGroup.new
|
||||
})
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class AWS
|
|||
SECURITY_GROUP = {
|
||||
'EC2SecurityGroups' => Array,
|
||||
'CacheSecurityGroupName' => String,
|
||||
'CacheSecurityGroupDescription' => String,
|
||||
'Description' => String,
|
||||
'OwnerId' => String
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue