Ask Your Question

Revision history [back]

from the code

try: blob = json.loads(ref.get('blob')) except (ValueError, TypeError):

So basically when you construct the request try to load the blob from the request. If it works then request to keystone will also work

do the following in a small python program

cred = {} cred["credential" = {} cred["credential"]["type"] = "ec2" cred["credential"]["user_id"] = < user id> cred["credential"]["poject_id"] = < project id>

blob = {} blob["access"] = "some key" blob["secret" ] = "some key"

cred["credential"]["blob"] = json.dumps(blob)

print cred

You can use this output. If you are using via curl make sure you escape every place. I believe you only need to escape inner quotes. Something like

{"a": 1, "blob": "{\"b\": \"1\"}"}