Comment 1 for bug 1004564

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Looks like this is already fixed

REQ: curl -i http://192.168.1.136:8774/v2/e5df6fe673ed4becb58605fdd9e85fc8/servers/65d19429-6ba3-46af-aa3e-e2682f6b7360/action -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 6aea61cfb02e4c019a3d6fab392afc6b" -d '{"createImage": {"name": "65d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b7360", "metadata": {}}}'

send: u'POST /v2/e5df6fe673ed4becb58605fdd9e85fc8/servers/65d19429-6ba3-46af-aa3e-e2682f6b7360/action HTTP/1.1\r\nHost: 192.168.1.136:8774\r\nContent-Length: 369\r\nx-auth-project-id: demo\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 6aea61cfb02e4c019a3d6fab392afc6b\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"createImage": {"name": "65d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b736065d19429-6ba3-46af-aa3e-e2682f6b7360", "metadata": {}}}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 141
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id: req-9f633a87-63f1-4cca-9dce-2f016658f09a
header: Date: Sat, 24 Nov 2012 00:48:12 GMT
RESP:{'date': 'Sat, 24 Nov 2012 00:48:12 GMT', 'status': '400', 'content-length': '141', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-9f633a87-63f1-4cca-9dce-2f016658f09a'} {"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}

DEBUG (shell:543) The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-9f633a87-63f1-4cca-9dce-2f016658f09a)
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 540, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 476, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 914, in do_image_create
    image_uuid = cs.servers.create_image(server, args.name)
  File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 613, in create_image
    location = self._action('createImage', server, body)[0]['location']
  File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 715, in _action
    return self.api.client.post(url, body=body)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 244, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 228, in _cs_request
    **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 210, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 204, in request
    raise exceptions.from_response(resp, body)
BadRequest: The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-9f633a87-63f1-4cca-9dce-2f016658f09a)
ERROR: The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-9f633a87-63f1-4cca-9dce-2f016658f09a)