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

Libcloud 544 gce metadata fix #349

wants to merge 6 commits into from


Copy link

This is a slightly improved version of the fix i submitted minutes ago which had some trace-generating code in it. Removed my own silly tests.

rtheberge added 2 commits August 15, 2014 14:20
…on of the bugfix. We now perform a simple sanity check to know whether the metadata dictionary has already been formatted to GCE's specs.
for k, v in ex_metadata.items()]}
if not ex_metadata or not isinstance(ex_metadata, dict):
# Should output a relevant error message if non-dict is received?
ex_metadata = None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should throw ValueError if user passes in an invalid value (not a dictionary) instead of silently ignoring it.

rtheberge added 4 commits August 18, 2014 08:29
metadata field is provided.
 1- Raise error correctly and separeta the "None" check from the malformed check
 2- Provide comments explaining the odd GCE dictionary format
 3- Perform check on metadata dictionary structure. We expect one "items" key
    and a tuple of arbitrary values.
 4- Prefix the key/value provided by a simple dictionary by "items", if not found,
    enforcing point 3's structure.
Copy link

@raphtheb - thanks for this. I've just tested it with SaltStack and this seems to work just fine. I'm guessing this is good to merge, but if I know @Kami, he'll ask you to squash your commits before merging. :)

Copy link
Contributor Author

Thanks for havign a look, @erjohnso

For clarity, i am opening a new pull-request (#353) with only one clean, squashed commit from an alternate branch. The end diff is the same, but will allow for a cleaner history. This one can safely be ignored/destroyed/rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants