Class: RightAws::Ec2::QEc2DescribeVolumesParser
- Inherits:
-
RightAWSParser
- Object
- RightAWSParser
- RightAws::Ec2::QEc2DescribeVolumesParser
- Defined in:
- lib/ec2/right_ec2_ebs.rb
Overview
:nodoc:
Constant Summary
Constants inherited from RightAWSParser
RightAWSParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from RightAWSParser
#full_tag_name, #result, #tag, #xml_lib, #xmlpath
Instance Method Summary collapse
Methods inherited from RightAWSParser
#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=
Constructor Details
This class inherits a constructor from RightAws::RightAWSParser
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser
Instance Method Details
#reset ⇒ Object
418 419 420 |
# File 'lib/ec2/right_ec2_ebs.rb', line 418 def reset @result = [] end |
#tagend(name) ⇒ Object
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/ec2/right_ec2_ebs.rb', line 396 def tagend(name) case name when 'size' then @item[:aws_size] = @text.to_i when 'createTime' then @item[:aws_created_at] = @text when 'instanceId' then @item[:aws_instance_id] = @text when 'device' then @item[:aws_device] = @text when 'attachTime' then @item[:aws_attached_at] = @text when 'snapshotId' then @item[:snapshot_id] = @text.right_blank? ? nil : @text when 'availabilityZone' then @item[:zone] = @text when 'deleteOnTermination' then @item[:delete_on_termination] = (@text == 'true') else case full_tag_name when %r{/volumeSet/item/volumeId$} then @item[:aws_id] = @text when %r{/volumeSet/item/status$} then @item[:aws_status] = @text when %r{/attachmentSet/item/status$} then @item[:aws_attachment_status] = @text when %r{/tagSet/item/key$} then @aws_tag[:key] = @text when %r{/tagSet/item/value$} then @aws_tag[:value] = @text when %r{/tagSet/item$} then @item[:tags][@aws_tag[:key]] = @aws_tag[:value] when %r{/volumeSet/item$} then @result << @item end end end |
#tagstart(name, attributes) ⇒ Object
390 391 392 393 394 395 |
# File 'lib/ec2/right_ec2_ebs.rb', line 390 def (name, attributes) case full_tag_name when %r{volumeSet/item$} then @item = { :tags => {} } when %r{/tagSet/item$} then @aws_tag = {} end end |