Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for custom tags to broken QEc2DescribeSnapshotParser #77

Closed
wants to merge 4 commits into from

Conversation

erichs
Copy link
Contributor

@erichs erichs commented Apr 27, 2011

The parser code in ec2.rb, line 2022:

2021 def tagstart(name, attributes)
=> 2022 @snapshot = {} if name == 'item'
2023 end

was failing on input like the following:


b9cde6c8-29d1-4f5d-bd1b-3c8c1565535c


snap-121ec67e
... tags removed for clarity...
c5 snap after April outage


rotation_level
daily 1




The problem is that is being used in two different contexts,
and the Parser class is not keeping track of state. I would expect to
see that custom tags added to snapshots would appear in the resultant
snapshot hash. Instead, when they are encountered they wipe out all
of the hash attributes parsed so far for the snapshot.

This patch fixes the parser, custom tags like the one above:

rotation_level
daily 1

will appear in the snapshot hash as:
{ :aws_tag_rotation_level => 'daily 1' }

@treeder
Copy link
Member

treeder commented May 5, 2011

Can you merge latest master into your fork? this won't apply cleanly anymore.

@erichs
Copy link
Contributor Author

erichs commented May 5, 2011

sure, coming right up!

Erich

On May 5, 2011, at 2:40 PM, treeder wrote:

Can you merge latest master into your fork? this won't apply cleanly anymore.

Reply to this email directly or view it on GitHub:
#77 (comment)

@erichs
Copy link
Contributor Author

erichs commented May 5, 2011

Travis,

my bad for not branching after my pull request. I think I'm all merged now. Thanks!

Erich

On May 5, 2011, at 2:40 PM, treeder wrote:

Can you merge latest master into your fork? this won't apply cleanly anymore.

Reply to this email directly or view it on GitHub:
#77 (comment)

@erichs erichs closed this May 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants