merged namespace
[sfa.git] / sfa / trust / rights.py
index 59324e8..bb4dffe 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Right - represents a single right
 #
-# RightList - represents a list of rights
+# Rights - represents a list of rights
 #
 # A right may allow several different operations. For example, the "info" right
 # allows "listslices", "listcomponentresources", etc.
@@ -24,9 +24,11 @@ privilege_table = {"authority": ["register", "remove", "update", "resolve", "lis
                    "sa": ["getticket", "redeemslice", "redeemticket", "createslice", "createsliver", "deleteslice", "deletesliver", "updateslice",
                           "getsliceresources", "getticket", "loanresources", "stopslice", "startslice", "renewsliver",
                           "deleteslice", "deletesliver", "resetslice", "listslices", "listnodes", "getpolicy", "sliverstatus"],
-                   "embed": ["getticket", "redeemslice", "redeemticket", "createslice", "createsliver", "renewsliver", "deleteslice", "deletesliver", "updateslice", "sliverstatus", "getsliceresources", "shutdown"],
+                   "embed": ["getticket", "redeemslice", "redeemticket", "createslice", "createsliver", "renewsliver", "deleteslice", 
+                             "deletesliver", "updateslice", "sliverstatus", "getsliceresources", "shutdown"],
                    "bind": ["getticket", "loanresources", "redeemticket"],
-                   "control": ["updateslice", "createslice", "createsliver", "renewsliver", "sliverstatus", "stopslice", "startslice", "deleteslice", "deletesliver", "resetslice", "getsliceresources", "getgids"],
+                   "control": ["updateslice", "createslice", "createsliver", "renewsliver", "sliverstatus", "stopslice", "startslice", 
+                               "deleteslice", "deletesliver", "resetslice", "getsliceresources", "getgids"],
                    "info": ["listslices", "listnodes", "getpolicy"],
                    "ma": ["setbootstate", "getbootstate", "reboot", "getgids", "gettrustedcerts"],
                    "operator": ["gettrustedcerts", "getgids"],                   
@@ -35,17 +37,17 @@ privilege_table = {"authority": ["register", "remove", "update", "resolve", "lis
 
 
 ##
-# Determine tje rights that an object should have. The rights are entirely
+# Determine the rights that an object should have. The rights are entirely
 # dependent on the type of the object. For example, users automatically
 # get "refresh", "resolve", and "info".
 #
 # @param type the type of the object (user | sa | ma | slice | node)
 # @param name human readable name of the object (not used at this time)
 #
-# @return RightList object containing rights
+# @return Rights object containing rights
 
 def determine_rights(type, name):
-    rl = RightList()
+    rl = Rights()
 
     # rights seem to be somewhat redundant with the type of the credential.
     # For example, a "sa" credential implies the authority right, because
@@ -132,9 +134,9 @@ class Right:
         return True
 
 ##
-# A RightList object represents a list of privileges.
+# A Rights object represents a list of privileges.
 
-class RightList:
+class Rights:
     ##
     # Create a new rightlist object, containing no rights.
     #
@@ -252,10 +254,10 @@ class RightList:
     # @param type the type of the object (user | sa | ma | slice | node)
     # @param name human readable name of the object (not used at this time)
     #
-    # @return RightList object containing rights
+    # @return Rights object containing rights
 
     def determine_rights(self, type, name):
-        rl = RightList()
+        rl = Rights()
 
         # rights seem to be somewhat redundant with the type of the credential.
         # For example, a "sa" credential implies the authority right, because