mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[core] update parser to better handle whitespace
This commit is contained in:
parent
37499d7c65
commit
b452aa679d
181 changed files with 598 additions and 597 deletions
|
@ -16,6 +16,7 @@ class Parser < Nokogiri::XML::SAX::Document
|
|||
end
|
||||
|
||||
def characters(string)
|
||||
@value ||= ''
|
||||
@value << string.strip
|
||||
end
|
||||
|
||||
|
@ -29,10 +30,14 @@ class Parser < Nokogiri::XML::SAX::Document
|
|||
@response[:items] << @item
|
||||
@item = {}
|
||||
when 'key'
|
||||
@item[:key] = @value
|
||||
@item[:key] = value
|
||||
end
|
||||
end
|
||||
|
||||
def value
|
||||
@value.dup
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
data = <<-DATA
|
||||
|
@ -43,18 +48,22 @@ data = <<-DATA
|
|||
</items>
|
||||
DATA
|
||||
|
||||
COUNT = 100
|
||||
COUNT = 10_000
|
||||
|
||||
Benchmark.bmbm(25) do |bench|
|
||||
bench.report('parse') do
|
||||
parser = Parser.new
|
||||
Nokogiri::XML::SAX::Parser.new(parser).parse(data)
|
||||
parser.response
|
||||
COUNT.times do
|
||||
parser = Parser.new
|
||||
Nokogiri::XML::SAX::Parser.new(parser).parse(data)
|
||||
parser.response
|
||||
end
|
||||
end
|
||||
|
||||
bench.report('push') do
|
||||
parser = Parser.new
|
||||
Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
|
||||
parser.response
|
||||
COUNT.times do
|
||||
parser = Parser.new
|
||||
Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
|
||||
parser.response
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId', 'StackId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'EventId', 'LogicalResourceId', 'PhysicalResourceId', 'ResourceProperties', 'ResourceStatus', 'ResourceStatusReason', 'ResourceType', 'StackId', 'StackName'
|
||||
@event[name] = @value
|
||||
@event[name] = value
|
||||
when 'member'
|
||||
@response['StackEvents'] << @event
|
||||
@event = {}
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'Timestamp'
|
||||
@event[name] = Time.parse(@value)
|
||||
@event[name] = Time.parse(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'StackId', 'StackName', 'LogicalResourceId', 'PhysicalResourceId', 'ResourceType', 'ResourceStatus'
|
||||
@resource[name] = @value
|
||||
@resource[name] = value
|
||||
when 'member'
|
||||
@response['StackResources'] << @resource
|
||||
@resource = {}
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'Timestamp'
|
||||
@resource[name] = Time.parse(@value)
|
||||
@resource[name] = Time.parse(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ module Fog
|
|||
if @in_outputs
|
||||
case name
|
||||
when 'OutputKey', 'OutputValue'
|
||||
@output[name] = @value
|
||||
@output[name] = value
|
||||
when 'member'
|
||||
@stack['Outputs'] << @output
|
||||
@output = {}
|
||||
|
@ -36,7 +36,7 @@ module Fog
|
|||
elsif @in_parameters
|
||||
case name
|
||||
when 'ParameterKey', 'ParameterValue'
|
||||
@parameter[name] = @value
|
||||
@parameter[name] = value
|
||||
when 'member'
|
||||
@stack['Parameters'] << @parameter
|
||||
@parameter = {}
|
||||
|
@ -49,18 +49,18 @@ module Fog
|
|||
@response['Stacks'] << @stack
|
||||
@stack = { 'Outputs' => [], 'Parameters' => [] }
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'CreationTime'
|
||||
@stack[name] = Time.parse(@value)
|
||||
@stack[name] = Time.parse(value)
|
||||
when 'DisableRollback'
|
||||
case @value
|
||||
case value
|
||||
when 'false'
|
||||
@stack[name] = false
|
||||
when 'true'
|
||||
@stack[name] = true
|
||||
end
|
||||
when 'StackName', 'StackId', 'StackStatus'
|
||||
@stack[name] = @value
|
||||
@stack[name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId', 'TemplateBody'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -21,20 +21,20 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'DefaultValue', 'ParameterKey'
|
||||
@parameter[name] = @value
|
||||
@parameter[name] = value
|
||||
when 'Description'
|
||||
if @in_parameters
|
||||
@parameter[name] = @value
|
||||
@parameter[name] = value
|
||||
else
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'member'
|
||||
@response['Parameters'] << @parameter
|
||||
@parameter = {}
|
||||
when 'NoEcho'
|
||||
case @value
|
||||
case value
|
||||
when 'false'
|
||||
@parameter[name] = false
|
||||
when 'true'
|
||||
|
|
|
@ -17,15 +17,15 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Target'
|
||||
@health_check[name] = @value
|
||||
@health_check[name] = value
|
||||
when 'Interval', 'Timeout', 'UnhealthyThreshold', 'HealthyThreshold'
|
||||
@health_check[name] = @value.to_i
|
||||
@health_check[name] = value.to_i
|
||||
|
||||
when 'HealthCheck'
|
||||
@response['ConfigureHealthCheckResult'][name] = @health_check
|
||||
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'DNSName'
|
||||
@response['CreateLoadBalancerResult'][name] = @value
|
||||
@response['CreateLoadBalancerResult'][name] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'InstanceId'
|
||||
@response['DeregisterInstancesFromLoadBalancerResult']['Instances'] << {name => @value}
|
||||
@response['DeregisterInstancesFromLoadBalancerResult']['Instances'] << {name => value}
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Description', 'State', 'InstanceId', 'ReasonCode'
|
||||
@instance_state[name] = @value
|
||||
@instance_state[name] = value
|
||||
when 'member'
|
||||
@response['DescribeInstanceHealthResult']['InstanceStates'] << @instance_state
|
||||
@instance_state = {}
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@ module Fog
|
|||
case name
|
||||
when 'member'
|
||||
if @in_policy_names
|
||||
@listener_description['PolicyNames'] << @value
|
||||
@listener_description['PolicyNames'] << value
|
||||
elsif @in_availability_zones
|
||||
@load_balancer['AvailabilityZones'] << @value
|
||||
@load_balancer['AvailabilityZones'] << value
|
||||
elsif @in_listeners
|
||||
@load_balancer['ListenerDescriptions'] << @listener_description
|
||||
reset_listener_description
|
||||
|
@ -67,23 +67,23 @@ module Fog
|
|||
end
|
||||
|
||||
when 'LoadBalancerName', 'DNSName'
|
||||
@load_balancer[name] = @value
|
||||
@load_balancer[name] = value
|
||||
when 'CreatedTime'
|
||||
@load_balancer[name] = Time.parse(@value)
|
||||
@load_balancer[name] = Time.parse(value)
|
||||
|
||||
when 'ListenerDescriptions'
|
||||
@in_listeners = false
|
||||
when 'PolicyNames'
|
||||
@in_policy_names = false
|
||||
when 'Protocol'
|
||||
@listener_description['Listener'][name] = @value
|
||||
@listener_description['Listener'][name] = value
|
||||
when 'LoadBalancerPort', 'InstancePort'
|
||||
@listener_description['Listener'][name] = @value.to_i
|
||||
@listener_description['Listener'][name] = value.to_i
|
||||
|
||||
when 'Instances'
|
||||
@in_instances = false
|
||||
when 'InstanceId'
|
||||
@load_balancer['Instances'] << @value
|
||||
@load_balancer['Instances'] << value
|
||||
|
||||
when 'AvailabilityZones'
|
||||
@in_availability_zones = false
|
||||
|
@ -96,17 +96,17 @@ module Fog
|
|||
@in_lb_cookies = false
|
||||
|
||||
when 'Interval', 'HealthyThreshold', 'Timeout', 'UnhealthyThreshold'
|
||||
@load_balancer['HealthCheck'][name] = @value.to_i
|
||||
@load_balancer['HealthCheck'][name] = value.to_i
|
||||
when 'Target'
|
||||
@load_balancer['HealthCheck'][name] = @value
|
||||
@load_balancer['HealthCheck'][name] = value
|
||||
|
||||
when 'PolicyName', 'CookieName'
|
||||
@policy[name] = @value
|
||||
@policy[name] = value
|
||||
when 'CookieExpirationPeriod'
|
||||
@policy[name] = @value.to_i
|
||||
@policy[name] = value.to_i
|
||||
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
|
||||
when 'DescribeLoadBalancersResponse'
|
||||
@response['DescribeLoadBalancersResult'] = @results
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'member'
|
||||
@response['DisableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << @value
|
||||
@response['DisableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'member'
|
||||
@response['EnableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << @value
|
||||
@response['EnableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'InstanceId'
|
||||
@response['RegisterInstancesWithLoadBalancerResult']['Instances'] << {name => @value}
|
||||
@response['RegisterInstancesWithLoadBalancerResult']['Instances'] << {name => value}
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'AccessKeyId', 'UserName', 'SecretAccessKey', 'Status'
|
||||
@response['AccessKey'][name] = @value
|
||||
@response['AccessKey'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'GroupId', 'GroupName', 'Path'
|
||||
@response['Group'][name] = @value
|
||||
@response['Group'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'UserId', 'UserName', 'Path'
|
||||
@response['User'][name] = @value
|
||||
@response['User'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -25,25 +25,25 @@ module Fog
|
|||
case name
|
||||
when 'Arn'
|
||||
if @in_group
|
||||
@response['Group'][name] = @value
|
||||
@response['Group'][name] = value
|
||||
elsif @in_users
|
||||
@user[name] = @value
|
||||
@user[name] = value
|
||||
end
|
||||
when 'Group'
|
||||
@in_group = false
|
||||
when 'GroupName', 'GroupId'
|
||||
@response['Group'][name] = @value
|
||||
@response['Group'][name] = value
|
||||
when 'Users'
|
||||
@in_users = false
|
||||
when 'UserId', 'UserName', 'Path'
|
||||
@user[name] = @value
|
||||
@user[name] = value
|
||||
when 'member'
|
||||
@response['Users'] << @user
|
||||
@user = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'UserId', 'UserName', 'Path'
|
||||
@response['User'][name] = @value
|
||||
@response['User'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'UserName', 'PolicyName', 'PolicyDocument'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'AccessKeyId', 'Status', 'Username'
|
||||
@access_key[name] = @value
|
||||
@access_key[name] = value
|
||||
when 'member'
|
||||
@response['AccessKeys'] << @access_key
|
||||
@access_key = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'GroupId', 'GroupName', 'Path'
|
||||
@group[name] = @value
|
||||
@group[name] = value
|
||||
when 'member'
|
||||
@response['Groups'] << @group
|
||||
@group = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Path', 'GroupName', 'GroupId', 'Arn'
|
||||
@group_for_user[name] = @value
|
||||
@group_for_user[name] = value
|
||||
when 'member'
|
||||
@response['GroupsForUser'] << @group_for_user
|
||||
@group_for_user = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'member'
|
||||
@response['PolicyNames'] << @value
|
||||
@response['PolicyNames'] << value
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -17,16 +17,16 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'Path', 'ServerCertificateId', 'ServerCertificateName'
|
||||
@certificate[name] = @value
|
||||
@certificate[name] = value
|
||||
when 'UploadDate'
|
||||
@certificate[name] = Time.parse(@value)
|
||||
@certificate[name] = Time.parse(value)
|
||||
when 'member'
|
||||
@response['Certificates'] << @certificate
|
||||
reset_certificate
|
||||
when 'IsTrunctated'
|
||||
@response[name] = !!@value
|
||||
@response[name] = !!value
|
||||
when 'Marker'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'UserName', 'CertificateId', 'CertificateBody', 'Status'
|
||||
@signing_certificate[name] = @value
|
||||
@signing_certificate[name] = value
|
||||
when 'member'
|
||||
@response['SigningCertificates'] << @signing_certificate
|
||||
@signing_certificate = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'UserId', 'UserName', 'Path'
|
||||
@user[name] = @value
|
||||
@user[name] = value
|
||||
when 'member'
|
||||
@response['Users'] << @user
|
||||
@user = {}
|
||||
when 'IsTruncated'
|
||||
response[name] = (@value == 'true')
|
||||
response[name] = (value == 'true')
|
||||
when 'Marker', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'UserName'
|
||||
@response['LoginProfile']['UserName'] = @value
|
||||
@response['LoginProfile']['UserName'] = value
|
||||
when 'CreateDate'
|
||||
@response['LoginProfile']['CreateDate'] = Time.parse(@value)
|
||||
@response['LoginProfile']['CreateDate'] = Time.parse(value)
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'GroupId', 'GroupName', 'Path'
|
||||
@response['Group'][name] = @value
|
||||
@response['Group'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'UserId', 'UserName', 'Path'
|
||||
@response['User'][name] = @value
|
||||
@response['User'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'Arn', 'Path', 'ServerCertificateId', 'ServerCertificateName'
|
||||
@response['Certificate'][name] = @value
|
||||
@response['Certificate'][name] = value
|
||||
when 'UploadDate'
|
||||
@response['Certificate'][name] = Time.parse(@value)
|
||||
@response['Certificate'][name] = Time.parse(value)
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'CertificateId', 'UserName', 'CertificateBody', 'Status'
|
||||
@response['Certificate'][name] = @value
|
||||
@response['Certificate'][name] = value
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['AuthorizeDBSecurityGroupIngressResult']['DBSecurityGroup'] = @security_group
|
||||
@security_group = fresh_security_group
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['CreateDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['CreateDBInstanceReadReplicaResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -17,15 +17,15 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'DBParameterGroupFamily'
|
||||
@db_parameter_group['DBParameterGroupFamily'] = @value
|
||||
@db_parameter_group['DBParameterGroupFamily'] = value
|
||||
when 'Description'
|
||||
@db_parameter_group['Description'] = @value
|
||||
@db_parameter_group['Description'] = value
|
||||
when 'DBParameterGroupName'
|
||||
@db_parameter_group['DBParameterGroupName'] = @value
|
||||
@db_parameter_group['DBParameterGroupName'] = value
|
||||
when 'DBParameterGroup'
|
||||
@response['CreateDBParameterGroupResult']['DBParameterGroup']= @db_parameter_group
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['CreateDBSecurityGroupResult']['DBSecurityGroup'] = @security_group
|
||||
@security_group = fresh_security_group
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
@response['CreateDBSnapshotResult']['DBSnapshot'] = @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -41,14 +41,14 @@ module Fog
|
|||
case name
|
||||
|
||||
when 'LatestRestorableTime', 'InstanceCreateTime'
|
||||
@db_instance[name] = Time.parse @value
|
||||
@db_instance[name] = Time.parse value
|
||||
when 'Engine',
|
||||
'DBInstanceStatus', 'DBInstanceIdentifier', 'EngineVersion',
|
||||
'PreferredBackupWindow', 'PreferredMaintenanceWindow',
|
||||
'AvailabilityZone', 'MasterUsername', 'DBName'
|
||||
@db_instance[name] = @value
|
||||
@db_instance[name] = value
|
||||
when 'MultiAZ', 'AutoMinorVersionUpgrade'
|
||||
if @value == 'false'
|
||||
if value == 'false'
|
||||
@db_instance[name] = false
|
||||
else
|
||||
@db_instance[name] = true
|
||||
|
@ -61,27 +61,27 @@ module Fog
|
|||
@db_parameter_group = {}
|
||||
when 'ParameterApplyStatus', 'DBParameterGroupName'
|
||||
if @in_db_parameter_groups
|
||||
@db_parameter_group[name] = @value
|
||||
@db_parameter_group[name] = value
|
||||
end
|
||||
|
||||
when 'BackupRetentionPeriod'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = @value.to_i
|
||||
@pending_modified_values[name] = value.to_i
|
||||
else
|
||||
@db_instance[name] = @value.to_i
|
||||
@db_instance[name] = value.to_i
|
||||
end
|
||||
when 'DBInstanceClass', 'EngineVersion', 'MasterUserPassword', 'MultiAZ'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = @value
|
||||
@pending_modified_values[name] = value
|
||||
else
|
||||
@db_instance[name] = @value
|
||||
@db_instance[name] = value
|
||||
end
|
||||
when 'DBSecurityGroups'
|
||||
@in_db_security_groups = false
|
||||
@db_instance['DBSecurityGroups'] = @db_security_groups
|
||||
when 'Status', 'DBSecurityGroupName'
|
||||
if @in_db_security_groups
|
||||
@db_security_group[name]=@value
|
||||
@db_security_group[name]=value
|
||||
end
|
||||
when 'DBSecurityGroup'
|
||||
@db_security_groups << @db_security_group
|
||||
|
@ -89,17 +89,17 @@ module Fog
|
|||
|
||||
when 'AllocatedStorage'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = @value.to_i
|
||||
@pending_modified_values[name] = value.to_i
|
||||
else
|
||||
@db_instance[name] = @value.to_i
|
||||
@db_instance[name] = value.to_i
|
||||
end
|
||||
when 'Address'
|
||||
@endpoint[name] = @value
|
||||
@endpoint[name] = value
|
||||
when 'Port'
|
||||
if @in_pending_modified_values
|
||||
@pending_modified_values[name] = @value.to_i
|
||||
@pending_modified_values[name] = value.to_i
|
||||
elsif @in_endpoint
|
||||
@endpoint[name] = @value.to_i
|
||||
@endpoint[name] = value.to_i
|
||||
end
|
||||
|
||||
when 'PendingModifiedValues'
|
||||
|
@ -109,9 +109,9 @@ module Fog
|
|||
@in_endpoint = false
|
||||
@db_instance['Endpoint'] = @endpoint
|
||||
when 'ReadReplicaDBInstanceIdentifier'
|
||||
@db_instance['ReadReplicaDBInstanceIdentifiers'] << @value
|
||||
@db_instance['ReadReplicaDBInstanceIdentifiers'] << value
|
||||
when 'ReadReplicaSourceDBInstanceIdentifier'
|
||||
@db_instance['ReadReplicaSourceDBInstanceIdentifier'] = @value
|
||||
@db_instance['ReadReplicaSourceDBInstanceIdentifier'] = value
|
||||
when 'DBInstance'
|
||||
@db_instance = fresh_instance
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
@response['DeleteDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
when 'DBSnapshot'
|
||||
@response['DeleteDBSnapshotResult']['DBSnapshot'] = @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
|
|
|
@ -22,9 +22,9 @@ module Fog
|
|||
@response['DescribeDBInstancesResult']['DBInstances'] << @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'Marker'
|
||||
@response['DescribeDBInstancesResult']['Marker'] = @value
|
||||
@response['DescribeDBInstancesResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -16,16 +16,16 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBParameterGroupFamily' then @db_parameter_group['DBParameterGroupFamily'] = @value
|
||||
when 'Description' then @db_parameter_group['Description'] = @value
|
||||
when 'DBParameterGroupName' then @db_parameter_group['DBParameterGroupName'] = @value
|
||||
when 'DBParameterGroupFamily' then @db_parameter_group['DBParameterGroupFamily'] = value
|
||||
when 'Description' then @db_parameter_group['Description'] = value
|
||||
when 'DBParameterGroupName' then @db_parameter_group['DBParameterGroupName'] = value
|
||||
when 'DBParameterGroup' then
|
||||
@response['DescribeDBParameterGroupsResult']['DBParameterGroups'] << @db_parameter_group
|
||||
@db_parameter_group = {}
|
||||
when 'Marker'
|
||||
@response['DescribeDBParameterGroupsResult']['Marker'] = @value
|
||||
@response['DescribeDBParameterGroupsResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -17,24 +17,24 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'ParameterValue' then @parameter['ParameterValue'] = @value
|
||||
when 'DataType' then @parameter['DataType'] = @value
|
||||
when 'AllowedValues' then @parameter['AllowedValues'] = @value
|
||||
when 'Source' then @parameter['Source'] = @value
|
||||
when 'ParameterValue' then @parameter['ParameterValue'] = value
|
||||
when 'DataType' then @parameter['DataType'] = value
|
||||
when 'AllowedValues' then @parameter['AllowedValues'] = value
|
||||
when 'Source' then @parameter['Source'] = value
|
||||
when 'IsModifiable' then
|
||||
@parameter['IsModifiable'] = @value == 'true' ? true : false
|
||||
when 'Description' then @parameter['Description'] = @value
|
||||
when 'ApplyType' then @parameter['ApplyType'] = @value
|
||||
when 'ParameterName' then @parameter['ParameterName'] = @value
|
||||
@parameter['IsModifiable'] = value == 'true' ? true : false
|
||||
when 'Description' then @parameter['Description'] = value
|
||||
when 'ApplyType' then @parameter['ApplyType'] = value
|
||||
when 'ParameterName' then @parameter['ParameterName'] = value
|
||||
when 'Parameter'
|
||||
@parameters << @parameter
|
||||
@parameter = {}
|
||||
when 'Marker'
|
||||
@response['DescribeDBParametersResult']['Marker'] = @value
|
||||
@response['DescribeDBParametersResult']['Marker'] = value
|
||||
when 'Parameters'
|
||||
@response['DescribeDBParametersResult']['Parameters'] = @parameters
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,9 +22,9 @@ module Fog
|
|||
@response['DescribeDBSecurityGroupsResult']['DBSecurityGroups'] << @security_group
|
||||
@security_group = fresh_security_group
|
||||
when 'Marker'
|
||||
@response['DescribeDBSecurityGroupsResult']['Marker'] = @value
|
||||
@response['DescribeDBSecurityGroupsResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,9 +22,9 @@ module Fog
|
|||
@response['DescribeDBSnapshotsResult']['DBSnapshots'] << @db_snapshot
|
||||
@db_snapshot = fresh_snapshot
|
||||
when 'Marker'
|
||||
@response['DescribeDBSnapshotsResult']['Marker'] = @value
|
||||
@response['DescribeDBSnapshotsResult']['Marker'] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['ModifyDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -16,9 +16,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'DBParameterGroupName'
|
||||
@response['ModifyDBParameterGroupResult']['DBParameterGroupName'] = @value
|
||||
@response['ModifyDBParameterGroupResult']['DBParameterGroupName'] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ module Fog
|
|||
@response['RebootDBInstanceResult']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['RestoreDBInstanceFromDBSnapshot']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['RestoreDBInstanceToPointInTime']['DBInstance'] = @db_instance
|
||||
@db_instance = fresh_instance
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
@response['RevokeDBSecurityGroupIngressResult']['DBSecurityGroup'] = @security_group
|
||||
@security_group = fresh_security_group
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
else
|
||||
super
|
||||
end
|
||||
|
|
|
@ -23,13 +23,13 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'DBSecurityGroupDescription' then @security_group['DBSecurityGroupDescription'] = @value
|
||||
when 'DBSecurityGroupName' then @security_group['DBSecurityGroupName'] = @value
|
||||
when 'OwnerId' then @security_group['OwnerId'] = @value
|
||||
when 'DBSecurityGroupDescription' then @security_group['DBSecurityGroupDescription'] = value
|
||||
when 'DBSecurityGroupName' then @security_group['DBSecurityGroupName'] = value
|
||||
when 'OwnerId' then @security_group['OwnerId'] = value
|
||||
when 'EC2SecurityGroup', 'IPRange'
|
||||
@security_group["#{name}s"] << @ingress unless @ingress.empty?
|
||||
when 'EC2SecurityGroupName', 'EC2SecurityGroupOwnerId', 'CIDRIP', 'Status'
|
||||
@ingress[name] = @value
|
||||
@ingress[name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,17 +20,17 @@ module Fog
|
|||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'AllocatedStorage' then @db_snapshot['AllocatedStorage'] = @value.to_i
|
||||
when 'AvailabilityZone' then @db_snapshot['AvailabilityZone'] = @value
|
||||
when 'DBInstanceIdentifier' then @db_snapshot['DBInstanceIdentifier'] = @value
|
||||
when 'DBSnapshotIdentifier' then @db_snapshot['DBSnapshotIdentifier'] = @value
|
||||
when 'Engine' then @db_snapshot['Engine'] = @value
|
||||
when 'EngineVersion' then @db_snapshot['EngineVersion'] = @value
|
||||
when 'InstanceCreateTime' then @db_snapshot['InstanceCreateTime'] = Time.parse @value
|
||||
when 'MasterUsername' then @db_snapshot['MasterUsername'] = @value
|
||||
when 'Port' then @db_snapshot['Port'] = @value.to_i
|
||||
when 'SnapshotCreateTime' then @db_snapshot['SnapshotCreateTime'] = Time.parse @value
|
||||
when 'Status' then @db_snapshot['Status'] = @value
|
||||
when 'AllocatedStorage' then @db_snapshot['AllocatedStorage'] = value.to_i
|
||||
when 'AvailabilityZone' then @db_snapshot['AvailabilityZone'] = value
|
||||
when 'DBInstanceIdentifier' then @db_snapshot['DBInstanceIdentifier'] = value
|
||||
when 'DBSnapshotIdentifier' then @db_snapshot['DBSnapshotIdentifier'] = value
|
||||
when 'Engine' then @db_snapshot['Engine'] = value
|
||||
when 'EngineVersion' then @db_snapshot['EngineVersion'] = value
|
||||
when 'InstanceCreateTime' then @db_snapshot['InstanceCreateTime'] = Time.parse value
|
||||
when 'MasterUsername' then @db_snapshot['MasterUsername'] = value
|
||||
when 'Port' then @db_snapshot['Port'] = value.to_i
|
||||
when 'SnapshotCreateTime' then @db_snapshot['SnapshotCreateTime'] = Time.parse value
|
||||
when 'Status' then @db_snapshot['Status'] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when "Max24HourSend", "MaxSendRate", "SentLast24Hours"
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when "Bounces", "Complaints", "DeliveryAttempts", "Rejects", "Timestamp"
|
||||
@send_data_point[name] = @value
|
||||
@send_data_point[name] = value
|
||||
when 'member'
|
||||
@response['SendDataPoints'] << @send_data_point
|
||||
@send_data_point = {}
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'member'
|
||||
@response['VerifiedEmailAddresses'] << @value
|
||||
@response['VerifiedEmailAddresses'] << value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'MessageId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'MessageId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'RequestId'
|
||||
@response['ResponseMetadata'][name] = @value
|
||||
@response['ResponseMetadata'][name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case(name)
|
||||
when 'BoxUsage'
|
||||
response[name] = @value.to_f
|
||||
response[name] = value.to_f
|
||||
when 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,13 +14,13 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'AttributeNameCount', 'AttributeNamesSizeBytes', 'AttributeValueCount', 'AttributeValuesSizeBytes', 'ItemCount', 'ItemNamesSizeBytes'
|
||||
response[name] = @value.to_i
|
||||
response[name] = value.to_i
|
||||
when 'BoxUsage'
|
||||
response[name] = @value.to_f
|
||||
response[name] = value.to_f
|
||||
when 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
when 'Timestamp'
|
||||
response[name] = Time.at(@value.to_i)
|
||||
response[name] = Time.at(value.to_i)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -17,14 +17,14 @@ module Fog
|
|||
when 'Attribute'
|
||||
@attribute = nil
|
||||
when 'BoxUsage'
|
||||
response[name] = @value.to_f
|
||||
response[name] = value.to_f
|
||||
when 'Name'
|
||||
@attribute = @value
|
||||
@attribute = value
|
||||
response['Attributes'][@attribute] ||= []
|
||||
when 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
when 'Value'
|
||||
response['Attributes'][@attribute] << sdb_decode(@value)
|
||||
response['Attributes'][@attribute] << sdb_decode(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case(name)
|
||||
when 'BoxUsage'
|
||||
response[name] = @value.to_f
|
||||
response[name] = value.to_f
|
||||
when 'DomainName'
|
||||
response['Domains'] << @value
|
||||
response['Domains'] << value
|
||||
when 'NextToken', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,21 +15,21 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'BoxUsage'
|
||||
response[name] = @value.to_f
|
||||
response[name] = value.to_f
|
||||
when 'Item'
|
||||
@item_name = @attribute_name = nil
|
||||
when 'Name'
|
||||
if @item_name.nil?
|
||||
@item_name = @value
|
||||
@item_name = value
|
||||
response['Items'][@item_name] = {}
|
||||
else
|
||||
@attribute_name = @value
|
||||
@attribute_name = value
|
||||
response['Items'][@item_name][@attribute_name] ||= []
|
||||
end
|
||||
when 'NextToken', 'RequestId'
|
||||
response[name] = @value
|
||||
response[name] = value
|
||||
when 'Value'
|
||||
response['Items'][@item_name][@attribute_name] << sdb_decode(@value)
|
||||
response['Items'][@item_name][@attribute_name] << sdb_decode(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -21,31 +21,31 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'AwsAccountNumber'
|
||||
@response['DistributionConfig']['TrustedSigners'] << @value
|
||||
@response['DistributionConfig']['TrustedSigners'] << value
|
||||
when 'Bucket', 'Prefix'
|
||||
@response['DistributionConfig']['Logging'][name] = @value
|
||||
@response['DistributionConfig']['Logging'][name] = value
|
||||
when 'CNAME'
|
||||
@response['DistributionConfig']['CNAME'] << @value
|
||||
@response['DistributionConfig']['CNAME'] << value
|
||||
when 'DNSName', 'OriginAccessIdentity', 'OriginProtocolPolicy'
|
||||
@response['DistributionConfig'][@origin][name] = @value
|
||||
@response['DistributionConfig'][@origin][name] = value
|
||||
when 'DomainName', 'Id', 'Status'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'CallerReference', 'Comment', 'DefaultRootObject', 'Origin', 'OriginAccessIdentity'
|
||||
@response['DistributionConfig'][name] = @value
|
||||
@response['DistributionConfig'][name] = value
|
||||
when 'Enabled'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@response['DistributionConfig'][name] = true
|
||||
else
|
||||
@response['DistributionConfig'][name] = false
|
||||
end
|
||||
when 'HTTPPort', 'HTTPSPort'
|
||||
@response['DistributionConfig'][@origin][name] = @value.to_i
|
||||
@response['DistributionConfig'][@origin][name] = value.to_i
|
||||
when 'InProgressInvalidationBatches'
|
||||
@response[name] = @value.to_i
|
||||
@response[name] = value.to_i
|
||||
when 'LastModifiedTime'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
when 'Protocol'
|
||||
@response['DistributionConfig']['RequireProtocols'] = @value
|
||||
@response['DistributionConfig']['RequireProtocols'] = value
|
||||
when 'Self'
|
||||
@response['DistributionConfig']['TrustedSigners'] << 'Self'
|
||||
end
|
||||
|
|
|
@ -25,31 +25,31 @@ module Fog
|
|||
@response['DistributionSummary'] << @distribution_summary
|
||||
@distribution_summary = { 'CNAME' => [], 'TrustedSigners' => [] }
|
||||
when 'Comment', 'DomainName', 'Id', 'Origin', 'Status'
|
||||
@distribution_summary[name] = @value
|
||||
@distribution_summary[name] = value
|
||||
when 'CNAME'
|
||||
@distribution_summary[name] << @value
|
||||
@distribution_summary[name] << value
|
||||
when 'DNSName', 'OriginAccessIdentity', 'OriginProtocolPolicy'
|
||||
@distribution_summary[@origin][name] = @value
|
||||
@distribution_summary[@origin][name] = value
|
||||
when 'Enabled'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@distribution_summary[name] = true
|
||||
else
|
||||
@distribution_summary[name] = false
|
||||
end
|
||||
when 'HTTPPort', 'HTTPSPort'
|
||||
@distribution_summary[@origin][name] = @value.to_i
|
||||
@distribution_summary[@origin][name] = value.to_i
|
||||
when 'LastModifiedTime'
|
||||
@distribution_summary[name] = Time.parse(@value)
|
||||
@distribution_summary[name] = Time.parse(value)
|
||||
when 'IsTruncated'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@response[name] = true
|
||||
else
|
||||
@response[name] = false
|
||||
end
|
||||
when 'Marker', 'NextMarker'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'MaxItems'
|
||||
@response[name] = @value.to_i
|
||||
@response[name] = value.to_i
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'CallerReference'
|
||||
@response['InvalidationBatch'][name] = @value
|
||||
@response['InvalidationBatch'][name] = value
|
||||
when 'CreateTime', 'Id', 'Status'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'Path'
|
||||
@response['InvalidationBatch'][name] << @value
|
||||
@response['InvalidationBatch'][name] << value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'publicIp', 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'attachTime'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
when 'device', 'instanceId', 'requestId', 'status', 'volumeId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'return'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@response[name] = true
|
||||
else
|
||||
@response[name] = false
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'instanceId', 'requestId', 'name', 'description', 'noReboot', 'imageId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'keyFingerprint', 'keyMaterial', 'keyName', 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'description', 'ownerId', 'progress', 'snapshotId', 'status', 'volumeId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'startTime'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
when 'volumeSize'
|
||||
@response[name] = @value.to_i
|
||||
@response[name] = value.to_i
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'availabilityZone', 'requestId', 'snapshotId', 'status', 'volumeId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'createTime'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
when 'size'
|
||||
@response[name] = @value.to_i
|
||||
@response[name] = value.to_i
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'return', 'requestId', 'imageId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'instanceId', 'publicIp'
|
||||
@address[name] = @value
|
||||
@address[name] = value
|
||||
when 'item'
|
||||
@response['addressesSet'] << @address
|
||||
@address = {}
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ module Fog
|
|||
@response['availabilityZoneInfo'] << @availability_zone
|
||||
@availability_zone = { 'messageSet' => [] }
|
||||
when 'message'
|
||||
@availability_zone['messageSet'] << @value
|
||||
@availability_zone['messageSet'] << value
|
||||
when 'regionName', 'zoneName', 'zoneState'
|
||||
@availability_zone[name] = @value
|
||||
@availability_zone[name] = value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ module Fog
|
|||
@image['tagSet'][@tag['key']] = @tag['value']
|
||||
@tag = {}
|
||||
when 'key', 'value'
|
||||
@tag[name] = @value
|
||||
@tag[name] = value
|
||||
when 'tagSet'
|
||||
@in_tag_set = false
|
||||
end
|
||||
|
@ -38,9 +38,9 @@ module Fog
|
|||
when 'blockDeviceMapping'
|
||||
@in_block_device_mapping = false
|
||||
when 'deviceName', 'virtualName', 'snapshotId', 'deleteOnTermination'
|
||||
@block_device_mapping[name] = @value
|
||||
@block_device_mapping[name] = value
|
||||
when 'volumeSize'
|
||||
@block_device_mapping[name] = @value.to_i
|
||||
@block_device_mapping[name] = value.to_i
|
||||
when 'item'
|
||||
@image['blockDeviceMapping'] << @block_device_mapping
|
||||
@block_device_mapping = {}
|
||||
|
@ -48,9 +48,9 @@ module Fog
|
|||
else
|
||||
case name
|
||||
when 'architecture', 'description', 'imageId', 'imageLocation', 'imageOwnerId', 'imageState', 'imageType', 'kernelId', 'name', 'platform', 'ramdiskId', 'rootDeviceType','rootDeviceName','virtualizationType'
|
||||
@image[name] = @value
|
||||
@image[name] = value
|
||||
when 'isPublic'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@image[name] = true
|
||||
else
|
||||
@image[name] = false
|
||||
|
@ -59,9 +59,9 @@ module Fog
|
|||
@response['imagesSet'] << @image
|
||||
@image = { 'blockDeviceMapping' => [], 'productCodes' => [], 'tagSet' => {} }
|
||||
when 'productCode'
|
||||
@image['productCodes'] << @value
|
||||
@image['productCodes'] << value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -34,34 +34,34 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'amiLaunchIndex'
|
||||
@instance[name] = @value.to_i
|
||||
@instance[name] = value.to_i
|
||||
when 'availabilityZone'
|
||||
@instance['placement'][name] = @value
|
||||
@instance['placement'][name] = value
|
||||
when 'architecture', 'clientToken', 'dnsName', 'imageId',
|
||||
'instanceId', 'instanceType', 'ipAddress', 'kernelId',
|
||||
'keyName', 'privateDnsName', 'privateIpAddress', 'ramdiskId',
|
||||
'reason', 'rootDeviceType'
|
||||
@instance[name] = @value
|
||||
@instance[name] = value
|
||||
when 'attachTime'
|
||||
@block_device_mapping[name] = Time.parse(@value)
|
||||
@block_device_mapping[name] = Time.parse(value)
|
||||
when 'blockDeviceMapping'
|
||||
@in_block_device_mapping = false
|
||||
when 'code'
|
||||
if @in_instance_state
|
||||
@instance['instanceState'][name] = @value.to_i
|
||||
@instance['instanceState'][name] = value.to_i
|
||||
elsif @in_state_reason
|
||||
@instance['stateReason'][name] = @value.to_i
|
||||
@instance['stateReason'][name] = value.to_i
|
||||
end
|
||||
when 'deleteOnTermination'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@block_device_mapping[name] = true
|
||||
else
|
||||
@block_device_mapping[name] = false
|
||||
end
|
||||
when 'deviceName', 'status', 'volumeId'
|
||||
@block_device_mapping[name] = @value
|
||||
@block_device_mapping[name] = value
|
||||
when 'groupId'
|
||||
@reservation['groupSet'] << @value
|
||||
@reservation['groupSet'] << value
|
||||
when 'groupSet', 'productCodes'
|
||||
@in_subset = false
|
||||
when 'instancesSet'
|
||||
|
@ -83,23 +83,23 @@ module Fog
|
|||
@reservation = { 'groupSet' => [], 'instancesSet' => [] }
|
||||
end
|
||||
when 'key', 'value'
|
||||
@tag[name] = @value
|
||||
@tag[name] = value
|
||||
when 'launchTime'
|
||||
@instance[name] = Time.parse(@value)
|
||||
@instance[name] = Time.parse(value)
|
||||
when 'name'
|
||||
if @in_instance_state
|
||||
@instance['instanceState'][name] = @value
|
||||
@instance['instanceState'][name] = value
|
||||
elsif @in_state_reason
|
||||
@instance['stateReason'][name] = @value
|
||||
@instance['stateReason'][name] = value
|
||||
end
|
||||
when 'ownerId', 'reservationId'
|
||||
@reservation[name] = @value
|
||||
@reservation[name] = value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'productCode'
|
||||
@instance['productCodes'] << @value
|
||||
@instance['productCodes'] << value
|
||||
when 'state'
|
||||
if @value == 'true'
|
||||
if value == 'true'
|
||||
@instance['monitoring'][name] = true
|
||||
else
|
||||
@instance['monitoring'][name] = false
|
||||
|
|
|
@ -16,9 +16,9 @@ module Fog
|
|||
@response['keySet'] << @key
|
||||
@key = {}
|
||||
when 'keyFingerprint', 'keyName'
|
||||
@key[name] = @value
|
||||
@key[name] = value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ module Fog
|
|||
@response['regionInfo'] << @region
|
||||
@region = {}
|
||||
when 'regionEndpoint', 'regionName'
|
||||
@region[name] = @value
|
||||
@region[name] = value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,18 +13,18 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'availabilityZone', 'instanceType', 'productDescription', 'reservedInstancesId', 'state'
|
||||
@reserved_instance[name] = @value
|
||||
@reserved_instance[name] = value
|
||||
when 'duration', 'instanceCount'
|
||||
@reserved_instance[name] = @value.to_i
|
||||
@reserved_instance[name] = value.to_i
|
||||
when 'fixedPrice', 'usagePrice'
|
||||
@reserved_instance[name] = @value.to_f
|
||||
@reserved_instance[name] = value.to_f
|
||||
when 'item'
|
||||
@response['reservedInstancesSet'] << @reserved_instance
|
||||
@reserved_instance = {}
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'start'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,16 +13,16 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'availabilityZone', 'instanceType', 'productDescription', 'reservedInstancesOfferingId'
|
||||
@reserved_instances_offering[name] = @value
|
||||
@reserved_instances_offering[name] = value
|
||||
when 'duration'
|
||||
@reserved_instances_offering[name] = @value.to_i
|
||||
@reserved_instances_offering[name] = value.to_i
|
||||
when 'fixedPrice', 'usagePrice'
|
||||
@reserved_instances_offering[name] = @value.to_f
|
||||
@reserved_instances_offering[name] = value.to_f
|
||||
when 'item'
|
||||
@response['reservedInstancesOfferingsSet'] << @reserved_instances_offering
|
||||
@reserved_instances_offering = {}
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -28,23 +28,23 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'cidrIp'
|
||||
@ip_range[name] = @value
|
||||
@ip_range[name] = value
|
||||
when 'fromPort', 'toPort'
|
||||
@ip_permission[name] = @value.to_i
|
||||
@ip_permission[name] = value.to_i
|
||||
when 'groups'
|
||||
@in_groups = false
|
||||
when 'groupDescription', 'ownerId'
|
||||
@security_group[name] = @value
|
||||
@security_group[name] = value
|
||||
when 'groupName'
|
||||
if @in_groups
|
||||
@group[name] = @value
|
||||
@group[name] = value
|
||||
else
|
||||
@security_group[name] = @value
|
||||
@security_group[name] = value
|
||||
end
|
||||
when 'ipPermissions'
|
||||
@in_ip_permissions = false
|
||||
when 'ipProtocol'
|
||||
@ip_permission[name] = @value
|
||||
@ip_permission[name] = value
|
||||
when 'ipRanges'
|
||||
@in_ip_ranges = false
|
||||
when 'item'
|
||||
|
@ -62,9 +62,9 @@ module Fog
|
|||
@security_group = { 'ipPermissions' => [] }
|
||||
end
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'userId'
|
||||
@group[name] = @value
|
||||
@group[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ module Fog
|
|||
@snapshot['tagSet'][@tag['key']] = @tag['value']
|
||||
@tag = {}
|
||||
when 'key', 'value'
|
||||
@tag[name] = @value
|
||||
@tag[name] = value
|
||||
when 'tagSet'
|
||||
@in_tag_set = false
|
||||
end
|
||||
|
@ -35,13 +35,13 @@ module Fog
|
|||
@response['snapshotSet'] << @snapshot
|
||||
@snapshot = { 'tagSet' => {} }
|
||||
when 'description', 'ownerId', 'progress', 'snapshotId', 'status', 'volumeId'
|
||||
@snapshot[name] ||= @value
|
||||
@snapshot[name] ||= value
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'startTime'
|
||||
@snapshot[name] = Time.parse(@value)
|
||||
@snapshot[name] = Time.parse(value)
|
||||
when 'volumeSize'
|
||||
@snapshot[name] = @value.to_i
|
||||
@snapshot[name] = value.to_i
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,12 +13,12 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'resourceId', 'resourceType', 'key', 'value'
|
||||
@tag[name] = @value
|
||||
@tag[name] = value
|
||||
when 'item'
|
||||
@response['tagSet'] << @tag
|
||||
@tag = {}
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ module Fog
|
|||
when 'attachmentSet'
|
||||
@in_attachment_set = false
|
||||
when 'attachTime'
|
||||
@attachment[name] = Time.parse(@value)
|
||||
@attachment[name] = Time.parse(value)
|
||||
when 'deleteOnTermination'
|
||||
@attachment[name] = @value == 'true'
|
||||
@attachment[name] = value == 'true'
|
||||
when 'device', 'instanceId', 'status', 'volumeId'
|
||||
@attachment[name] = @value
|
||||
@attachment[name] = value
|
||||
when 'item'
|
||||
@volume['attachmentSet'] << @attachment
|
||||
@attachment = {}
|
||||
|
@ -41,7 +41,7 @@ module Fog
|
|||
elsif @in_tag_set
|
||||
case name
|
||||
when 'key', 'value'
|
||||
@tag[name] = @value
|
||||
@tag[name] = value
|
||||
when 'item'
|
||||
@volume['tagSet'][@tag['key']] = @tag['value']
|
||||
@tag = {}
|
||||
|
@ -51,16 +51,16 @@ module Fog
|
|||
else
|
||||
case name
|
||||
when 'availabilityZone', 'snapshotId', 'status', 'volumeId'
|
||||
@volume[name] = @value
|
||||
@volume[name] = value
|
||||
when 'createTime'
|
||||
@volume[name] = Time.parse(@value)
|
||||
@volume[name] = Time.parse(value)
|
||||
when 'item'
|
||||
@response['volumeSet'] << @volume
|
||||
@volume = { 'attachmentSet' => [], 'tagSet' => {} }
|
||||
when 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'size'
|
||||
@volume[name] = @value.to_i
|
||||
@volume[name] = value.to_i
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,9 +8,9 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'attachTime'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
when 'device', 'instanceId', 'requestId', 'status', 'volumeId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,15 +12,11 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'instanceId', 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
when 'output'
|
||||
@response[name] = if @value
|
||||
Base64.decode64(@value)
|
||||
else
|
||||
nil
|
||||
end
|
||||
@response[name] = value && Base64.decode64(value)
|
||||
when 'timestamp'
|
||||
@response[name] = Time.parse(@value)
|
||||
@response[name] = Time.parse(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'keyFingerprint', 'keyName', 'requestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -14,14 +14,14 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'requestId'
|
||||
@response['requestId'] = @value
|
||||
@response['requestId'] = value
|
||||
when 'instanceId'
|
||||
@current_instance_set['instanceId'] = @value
|
||||
@current_instance_set['instanceId'] = value
|
||||
when 'item'
|
||||
@instance_set << @current_instance_set
|
||||
@current_instance_set = {}
|
||||
when 'state'
|
||||
@current_instance_set['monitoring'] = @value
|
||||
@current_instance_set['monitoring'] = value
|
||||
when 'instancesSet'
|
||||
@response['instancesSet'] = @instance_set
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'requestId', 'imageId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue