Duplicated fact can be defined in 2 style
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
congress |
Triaged
|
Low
|
Unassigned |
Bug Description
Same facts can be defined in fact style and rule style. When you define one fact with both style, multiple same facts are defined in one policy. It doesn't affect policy calculating result.
$ openstack congress policy create test
+------
| Field | Value |
+------
| abbreviation | test |
| description | |
| id | adc0a3d0-
| kind | nonrecursive |
| name | test |
| owner_id | user |
+------
$ openstack congress policy rule create test 'p(5)'
+------
| Field | Value |
+------
| comment | |
| id | 4f8bc6f3-
| name | None |
| rule | p(5) |
+------
$ openstack congress policy rule create test 'p(5):-true'
+------
| Field | Value |
+------
| comment | |
| id | 601bab0a-
| name | None |
| rule | p(5) :- |
| | true() |
+------
$ openstack congress policy rule create test 'q(x):-p(x)'
+------
| Field | Value |
+------
| comment | |
| id | f281fc13-
| name | None |
| rule | q(x) :- |
| | p(x) |
+------
$ openstack congress policy row list test q
+------+
| Col0 |
+------+
| 5 |
+------+
$ openstack congress policy rule list test
// ID: 4f8bc6f3-
// Name: None
p(5)
// ID: 601bab0a-
// Name: None
p(5):-true
// ID: f281fc13-
// Name: None
q(x):-p(x)