mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
62256219f4
Also fix up various things that rubocop called out, though not everything. Mostly whitespace fixes, changing double-quotes to single if double wasn't required, changing to use ruby 2.x hash syntax where possible, etc. While tests don't run, they are no more broken than before (at least, as far as I can tell).
33 lines
1.3 KiB
Ruby
33 lines
1.3 KiB
Ruby
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
|