Comment 2 for bug 1368462

Revision history for this message
Tim Hinrichs (thinrichs) wrote :

Here's what we see from the CLI...

nicira@Ubuntu1204Server:/opt/stack/python-congressclient$ openstack congress policy rule create classification "p(x) :- q(x"
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-cdfdd7e7-19e5-4da6-8d40-4391ca235c21)

Here's what we get from curl. Notice that we get an informative error message: "Syntax error for rule::Parse failure..."

nicira@Ubuntu1204Server:/opt/stack/python-congressclient$ curl -i -X POST http://192.168.1.60:1789/v1/policies/classification/rules -H "User-Agent: python-congressclient" -H "X-Auth-Token:d6eb33a5634a5af84da85e8a02ecac10bc9a34ac" -d '{"rule": "p(x) :- q(x"}'
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
Content-Length: 149
X-Openstack-Request-Id: req-7c50c528-e72b-486e-9cf3-8023a10e711a
Date: Fri, 31 Oct 2014 19:50:55 GMT

{"error_data": null, "error_code": 1002, "description": "Syntax error for rule::Parse failure.\nline:1,col:10 no viable alternative at input u'x'"}