Sha256: 7e86eb4bb72e300d50759b3f203391e459be987d5b5adb7a27a6d657df67a5ca

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

require 'fog/xml'
require 'fog/aws/parsers/compute/describe_images'

DESCRIBE_IMAGES_RESULT = <<-EOF
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
    <requestId>180a8433-ade0-4a6c-b35b-107897579572</requestId>
    <imagesSet>
        <item>
            <imageId>aki-02486376</imageId>
            <imageLocation>ec2-public-images-eu/vmlinuz-2.6.21-2.fc8xen-ec2-v1.0.i386.aki.manifest.xml</imageLocation>
            <imageState>available</imageState>
            <imageOwnerId>206029621532</imageOwnerId>
            <creationDate/>
            <isPublic>true</isPublic>
            <architecture>i386</architecture>
            <imageType>kernel</imageType>
            <imageOwnerAlias>amazon</imageOwnerAlias>
            <rootDeviceType>instance-store</rootDeviceType>
            <blockDeviceMapping/>
            <virtualizationType>paravirtual</virtualizationType>
            <hypervisor>xen</hypervisor>
        </item>
    </imagesSet>
</DescribeImagesResponse>
EOF

Shindo.tests('AWS::Compute | parsers | describe_images', %w[compute aws parser]) do
  tests('parses the xml').formats(AWS::Compute::Formats::DESCRIBE_IMAGES) do
    parser = Nokogiri::XML::SAX::Parser.new(Fog::Parsers::AWS::Compute::DescribeImages.new)
    parser.parse(DESCRIBE_IMAGES_RESULT)
    parser.document.response
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-aws-3.12.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.11.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.10.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.9.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.8.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.7.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.7 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.6 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.5 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.4 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.3 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.6.2 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.5.2 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.5.1 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.5.0 tests/parsers/compute/describe_images_tests.rb
fog-aws-3.4.0 tests/parsers/compute/describe_images_tests.rb