Re: [openstack-dev] [Congress] Confused syntax error when inserting rule.

2015-08-16 Thread Rui Chen
Thanks for your clarification. I think the root reason is hidden variables that generated by policy engine. *error(id) :- cinder:volumes(id=id), not avail_cinder_vol(id)* *avail_cinder_vol(id) :- cinder:volumes(id=id, status=available)* It's a good idea, keep the rules simple and readable. It

Re: [openstack-dev] [Congress] Confused syntax error when inserting rule.

2015-08-14 Thread Tim Hinrichs
Hi Rui, The problem with the following rule is that there are a bunch of hidden variables in the not cinder:volumes(...) literal. The error message shows the hidden variables. The syntax restriction is that every variable in a negative literal must appear in a positive literal in the body.

[openstack-dev] [Congress] Confused syntax error when inserting rule.

2015-08-13 Thread Rui Chen
Hi folks: 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: error(id) :- cinder:volumes(id=id), not cinder:volumes(id=id, status=available) But when I create the rule, a error is

Re: [openstack-dev] [Congress] Confused syntax error when inserting rule.

2015-08-13 Thread Rui Chen
Sorry, send the same mail again, please comments at here, the other mail lack title. 2015-08-14 11:03 GMT+08:00 Rui Chen chenrui.m...@gmail.com: Hi folks: 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