clarify the example in 'Simulation with Actions' RST document

Bug #1510428 reported by Rui Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
congress
Fix Released
Undecided
Rui Chen

Bug Description

In RST document congress/doc/source/enforcement.rst.

The policy 'aliceactions' is created at first in the example, but that is never used, all the following command use the default 'action' policy, that make the users confused about which policy we should create "action('set')" rule into and which action policy we should use in simulate? Aims to clarify the usage, avoid to use default 'action' policy, and use 'aliceactions' policy in the example.

2.1 Simulation with Actions
    $ openstack congress policy create aliceactions --kind 'action'
    $ openstack congress policy rule create action 'action("set")'
    $ openstack congress policy rule create action 'p+(x,y) :- set(x,y)'
    $ openstack congress policy rule create action 'p-(x,oldy) :- set(x,y), p(x,oldy)'

a) **Inserts and Deletes**. Set key 101 to value 5 and ask for the contents of error::

    $ openstack congress policy simulate classification 'error(x)' 'set(101, 5)' action
    error(302)

Rui Chen (kiwik-chenrui)
Changed in congress:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to congress (master)

Fix proposed to branch: master
Review: https://review.openstack.org/239655

Changed in congress:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (master)

Reviewed: https://review.openstack.org/239655
Committed: https://git.openstack.org/cgit/openstack/congress/commit/?id=f5eaec7456e53b327c2247b23a53f1ae4e8dd2e2
Submitter: Jenkins
Branch: master

commit f5eaec7456e53b327c2247b23a53f1ae4e8dd2e2
Author: Rui Chen <email address hidden>
Date: Tue Oct 27 20:14:25 2015 +0800

    clarify the example in 'Simulation with Actions'

    In RST document congress/doc/source/enforcement.rst.

    The policy 'aliceactions' is created at first in the example,
    but that is never used, all the following command use the
    default 'action' policy, that make the users confused about
    which policy we should create "action('set')" rule into and
    which action policy we should use in simulate? Aims to clarify
    the usage, avoid to use default 'action' policy, and use
    'aliceactions' policy in the example.

    Change-Id: I1c976120c20b8e766a6692d3ab16e91f92da8b5c
    Closes-Bug: #1510428

Changed in congress:
status: In Progress → Fix Committed
Tim Hinrichs (thinrichs)
Changed in congress:
status: Fix Committed → Fix Released
Tim Hinrichs (thinrichs)
Changed in congress:
milestone: none → mitaka-1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.