[
https://issues.apache.org/jira/browse/LIBCLOUD-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115274#comment-14115274
]
ASF GitHub Bot commented on LIBCLOUD-544:
-----------------------------------------
GitHub user raphtheb opened a pull request:
https://github.com/apache/libcloud/pull/353
[LIBCLOUD-544] Resolve a bug introduced by the original fix of the issue...
This is meant to replace github.com/apache/libcloud/pull/349
With one clean commit.
1- Add separated verifications for "None" and malformed metadata.
A clear error will be raised upon malformed metadata.
If undefined or already None, we assume None.
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 keys/values provided by a simple dictionary by "items" if not
found, enforcing point 3's structure.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/raphtheb/libcloud
LIBCLOUD-544_gce_metadata_squashed
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/353.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #353
----
commit 652f59aa3747ce78f6db5b82097ce8ded3c4e6d4
Author: rtheberge <[email protected]>
Date: 2014-08-29T13:41:14Z
[LIBCLOUD-544] Resolve a bug introduced by the original fix of the issue.
1- Add separated verifications for "None" and malformed metadata.
A clear error will be raised upon malformed metadata.
If undefined or already None, we assume None.
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 keys/values provided by a simple dictionary by "items" if not
found, enforcing point 3's structure.
----
> Passing a dict of metadata to create_node method of GCE driver doesn't work.
> ----------------------------------------------------------------------------
>
> Key: LIBCLOUD-544
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-544
> Project: Libcloud
> Issue Type: Bug
> Reporter: Lior Goikhburg
>
> GCE requires metadata to be sent in the following way:
> metadata = {"items": [{"value": "val1", "key": "key1"}, {"value": "val2",
> "key": "key2"}]}
--
This message was sent by Atlassian JIRA
(v6.2#6252)