X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=docs%2Fpythondoc-rights.html;fp=docs%2Fpythondoc-rights.html;h=cc32deea4d71f097688fc974fb18d30629fd5c23;hb=b0c5d4bb7d0cecaa57f983114edef486038d3644;hp=0000000000000000000000000000000000000000;hpb=d0e4ac0e8cd6f1eaf85d7086850009133512f4ae;p=sfa.git diff --git a/docs/pythondoc-rights.html b/docs/pythondoc-rights.html new file mode 100644 index 00000000..cc32deea --- /dev/null +++ b/docs/pythondoc-rights.html @@ -0,0 +1,111 @@ + + + + +The rights Module + + +

The rights Module

+

This Module implements rights and lists of rights for the Geni wrapper. Rights +are implemented by two classes: + +Right - represents a single right + +RightList - represents a list of rights + +A right may allow several different operations. For example, the "info" right +allows "listslices", "listcomponentresources", etc.

+
+
privilege_table (variable) [#]
+
+

privilege_table is a list of priviliges and what operations are allowed +per privilege.

+
+
Right(kind) (class) [#]
+
+

The Right class represents a single privilege.

+

For more information about this class, see The Right Class.

+
+
RightList(string=None) (class) [#]
+
+

A RightList object represents a list of privileges.

+

For more information about this class, see The RightList Class.

+
+
+

The Right Class

+
+
Right(kind) (class) [#]
+
+

The Right class represents a single privilege.

+
+
can_perform(op_name) [#]
+
+

Test to see if this right object is allowed to perform an operation. +Returns True if the operation is allowed, False otherwise.

+
+
op_name
+
+is a string naming the operation. For example "listslices".
+

+
+
is_superset(child) [#]
+
+

Test to see if this right is a superset of a child right. A right is a +superset if every operating that is allowed by the child is also allowed +by this object.

+
+
child
+
+is a Right object describing the child right
+

+
+
+

The RightList Class

+
+
RightList(string=None) (class) [#]
+
+

A RightList object represents a list of privileges.

+
+
add(right) [#]
+
+

Add a right to this list

+
+
right
+
+is either a Right object or a string describing the right
+

+
+
can_perform(op_name) [#]
+
+

Check to see if some right in this list allows an operation. This is +done by evaluating the can_perform function of each operation in the +list.

+
+
op_name
+
+is an operation to check, for example "listslices"
+

+
+
is_superset(child) [#]
+
+

Check to see if all of the rights in this rightlist are a superset +of all the rights in a child rightlist. A rightlist is a superset +if there is no operation in the child rightlist that cannot be +performed in the parent rightlist.

+
+
child
+
+is a rightlist object describing the child
+

+
+
load_from_string(string) [#]
+
+

Load the rightlist object from a string

+
+
save_to_string() [#]
+
+

Save the rightlist object to a string. It is saved in the format of a +comma-separated list.

+
+
+