Created
July 7, 2014 15:39
-
-
Save ccollicutt/12defb91e8974e372a2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REQ: curl -i 'http://127.0.0.1:8774/v1.1/flavors/' -X GET -H "X-Auth-Project-Id: serverascode" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 0011223344556677" | |
RESP: [200] {'date': 'Mon, 07 Jul 2014 15:38:48 GMT', 'content-length': '758', 'content-type': 'application/json', 'x-powered-by': 'go-json-rest'} | |
RESP BODY: { | |
"flavors": [ | |
{ | |
"flavor": { | |
"id": 1, | |
"name": "m1", | |
"ram": 512, | |
"disk": 10, | |
"vcpus": 1, | |
"links": [ | |
{ | |
"rel": "self", | |
"href": "http://someurl/something" | |
}, | |
{ | |
"rel": "bookmark", | |
"href": "http://someurl/something" | |
} | |
] | |
} | |
}, | |
{ | |
"flavor": { | |
"id": 2, | |
"name": "m3", | |
"ram": 1024, | |
"disk": 20, | |
"vcpus": 2, | |
"links": [ | |
{ | |
"rel": "self", | |
"href": "http://someurl/something" | |
}, | |
{ | |
"rel": "bookmark", | |
"href": "http://someurl/something" | |
} | |
] | |
} | |
} | |
] | |
} | |
DEBUG (shell:777) 'flavor' | |
Traceback (most recent call last): | |
File "/Library/Python/2.7/site-packages/novaclient/shell.py", line 774, in main | |
OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:])) | |
File "/Library/Python/2.7/site-packages/novaclient/shell.py", line 710, in main | |
args.func(self.cs, args) | |
File "/Library/Python/2.7/site-packages/novaclient/v1_1/shell.py", line 1526, in do_show | |
_print_server(cs, args) | |
File "/Library/Python/2.7/site-packages/novaclient/v1_1/shell.py", line 1491, in _print_server | |
info['flavor'] = '%s (%s)' % (_find_flavor(cs, flavor_id).name, | |
File "/Library/Python/2.7/site-packages/novaclient/v1_1/shell.py", line 1568, in _find_flavor | |
return utils.find_resource(cs.flavors, flavor) | |
File "/Library/Python/2.7/site-packages/novaclient/utils.py", line 209, in find_resource | |
return manager.get(name_or_id) | |
File "/Library/Python/2.7/site-packages/novaclient/v1_1/flavors.py", line 131, in get | |
return self._get("/flavors/%s" % base.getid(flavor), "flavor") | |
File "/Library/Python/2.7/site-packages/novaclient/base.py", line 148, in _get | |
return self.resource_class(self, body[response_key], loaded=True) | |
KeyError: 'flavor' | |
ERROR: 'flavor' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment