Skip to content

Instantly share code, notes, and snippets.

@hackerain
Created June 5, 2013 10:08
Show Gist options
  • Save hackerain/5712886 to your computer and use it in GitHub Desktop.
Save hackerain/5712886 to your computer and use it in GitHub Desktop.
suo@ustack:~/devstack$ curl -H "content-type: application/json" -H "x-auth-token:$ADMIN" http://localhost:35357/v3/credentials -d '{"credential": {"user_id": "91f2f916a5714101866ae325fd6d5aec", "project_id" : "473c507eb7e645fda4d7dabb6c7eac03", "blob": {"AccessKey": "AKIAJ5AAFSPWGWH25P3A", "SecertKey": "PzJGRqDLN8uET9ZzhQZ4wy5gTIGFxE1S3FhghwS8"}, "type": "AccessKey"}}' | ./jsontool.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 611 100 372 100 239 6223 3998 --:--:-- --:--:-- --:--:-- 6200
{
"credential": {
"user_id": "91f2f916a5714101866ae325fd6d5aec",
"links": {
"self": "http://localhost:5000/v3/credentials/c04f153f34134fb68699c9efb70c50ec"
},
"blob": {
"AccessKey": "AKIAJ5AAFSPWGWH25P3A",
"SecertKey": "PzJGRqDLN8uET9ZzhQZ4wy5gTIGFxE1S3FhghwS8"
},
"project_id": "473c507eb7e645fda4d7dabb6c7eac03",
"type": "AccessKey",
"id": "c04f153f34134fb68699c9efb70c50ec"
}
}
mysql> select * from credential;
+----------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------------------------+-----------+-------+
| id | user_id | project_id | blob | type | extra |
+----------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------------------------+-----------+-------+
| c04f153f34134fb68699c9efb70c50ec | 91f2f916a5714101866ae325fd6d5aec | 473c507eb7e645fda4d7dabb6c7eac03 | {"AccessKey": "AKIAJ5AAFSPWGWH25P3A", "SecertKey": "PzJGRqDLN8uET9ZzhQZ4wy5gTIGFxE1S3FhghwS8"} | AccessKey | {} |
+----------------------------------+----------------------------------+----------------------------------+------------------------------------------------------------------------------------------------+-----------+-------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment