<div dir="ltr">Hi folks:<div><br></div><div>    I face a problem when I insert a rule into Congress. I want to find out all of the volumes that are not available status, so I draft a rule like this:</div><div><br></div><div>    error(id) :- cinder:volumes(id=id), not cinder:volumes(id=id, status="available")</div><div><br></div><div>    But when I create the rule, a error is raised:</div><div><br></div><div><div>(openstack) congress policy rule create chenrui_p "error(id) :- cinder:volumes(id=id),not cinder:volumes(id=id, status=\"available\")"</div><div>ERROR: openstack Syntax error for rule::Errors: Could not reorder rule error(id) :- cinder:volumes(id, _x_0_1, _x_0_2, _x_0_3, _x_0_4, _x_0_5, _x_0_6, _x_0_7, _x_0_8), not cinder:volumes(id, _x_1_1, _x_1_2, "available", _x_1_4, _x_1_5, _x_1_6, _x_1_7, _x_1_8).  Unsafe lits: not cinder:volumes(id, _x_1_1, _x_1_2, "available", _x_1_4, _x_1_5, _x_1_6, _x_1_7, _x_1_8) (vars set(['_x_1_2', '_x_1_1', '_x_1_6', '_x_1_7', '_x_1_4', '_x_1_5', '_x_1_8'])) (HTTP 400) (Request-ID: req-1f4432d6-f869-472b-aa7d-4cf78dd96fa1)</div></div><div><br></div><div>    I check the Congress policy docs [1], looks like that the rule don't break any syntax restrictions.</div><div><br></div><div>    If I modify the rule like this, it works:</div><div><br></div><div><div>(openstack) congress policy rule create chenrui_p "error(x) :- cinder:volumes(x, _x_0_1, _x_0_2, _x_0_3, _x_0_4, _x_0_5, _x_0_6, _x_0_7, _x_0_8),not cinder:volumes(x, _x_0_1, _x_0_2, \"available\",_x_0_4, _x_0_5, _x_0_6, _x_0_7, _x_0_8)"</div><div>+---------+------------------------------------------------------------------------------------------------+</div><div>| Field   | Value                                                                                          |</div><div>+---------+------------------------------------------------------------------------------------------------+</div><div>| comment | None                                                                                           |</div><div>| id      | ad121e09-ba0a-45d6-bd18-487d975d5bf5                                                           |</div><div>| name    | None                                                                                           |</div><div>| rule    | error(x) :-                                                                                    |</div><div>|         |     cinder:volumes(x, _x_0_1, _x_0_2, _x_0_3, _x_0_4, _x_0_5, _x_0_6, _x_0_7, _x_0_8),         |</div><div>|         |     not cinder:volumes(x, _x_0_1, _x_0_2, "available", _x_0_4, _x_0_5, _x_0_6, _x_0_7, _x_0_8) |</div><div>+---------+------------------------------------------------------------------------------------------------+</div></div><div><br></div><div>    I'm not sure this is a bug or I miss something from docs, so I need some feedback from mail list.</div><div>Feel free to discuss about it.</div><div><br></div><div><br></div><div>[1]: <a href="http://congress.readthedocs.org/en/latest/policy.html#datalog-syntax-restrictions">http://congress.readthedocs.org/en/latest/policy.html#datalog-syntax-restrictions</a></div><div><br></div><div><br></div><div>Best Regards.</div></div>