rename geniticket.py into sfaticket.py and defined class Ticket into SfaTicket
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 6 Jul 2009 20:38:44 +0000 (20:38 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 6 Jul 2009 20:38:44 +0000 (20:38 +0000)
INSTALL.txt
component/component.py
component/copynode.sh
config/sfa_config
sfa/client/genidump.py
sfa/methods/get_ticket.py
sfa/trust/hierarchy.py
sfa/trust/rights.py
sfa/util/geniclient.py
sfa/util/sfaticket.py [moved from sfa/util/geniticket.py with 98% similarity]

index 10913d1..cac1f04 100644 (file)
@@ -118,7 +118,7 @@ At this stage you should be able to run sfi command. Some sample outputs are:
 (b) On each PLC, edit the /etc/sfa/registries.xml file
 
     set addr to ip or hostname of federated (remote) peer
-    set port to geni service port on federated (remote) peer
+    set port to sfa service port on federated (remote) peer
     set hrn to human readable name of federated (remote) peer interface
 Sample configuration:
 
index 828c3d3..7aa2163 100644 (file)
@@ -17,7 +17,7 @@ from sfa.trust.trustedroot import *
 from sfa.util.faults import *
 from sfa.util.misc import *
 from sfa.util.record import *
-from sfa.util.geniticket import *
+from sfa.util.sfaticket import SfaTicket
 from sfa.util.geniserver import *
 
 ##
@@ -124,7 +124,7 @@ class ComponentManager(GeniServer):
     # @param ticket_string the string representation of the ticket
 
     def decode_ticket(self, ticket_string):
-        self.client_ticket = Ticket(string = ticket_string)
+        self.client_ticket = SfaTicket(string = ticket_string)
         self.client_gid = self.client_ticket.get_gid_caller()
         self.object_gid = self.client_ticket.get_gid_object()
 
@@ -144,7 +144,7 @@ class ComponentManager(GeniServer):
             if self.object_gid:
                 self.object_gid.verify_chain(self.trusted_cert_list)
 
-    def geni_ticket_to_plc_ticket(self, ticket):
+    def sfa_ticket_to_plc_ticket(self, ticket):
         ticket_attrs = ticket.get_attributes()
         ticket_rspec = ticket.get_rspec()
 
@@ -211,7 +211,7 @@ class ComponentManager(GeniServer):
 
         print "ticket received for", self.object_gid.get_hrn()
 
-        pt = self.geni_ticket_to_plc_ticket(ticket)
+        pt = self.sfa_ticket_to_plc_ticket(ticket)
 
         print "plticket", pt
 
index ce5698a..77bea0f 100755 (executable)
@@ -3,6 +3,6 @@
 source component_slice_config.sh
 
 echo connecting to node: $1
-export FILES="component.py ../util/cert.py ../util/credential.py ../util/excep.py ../util/geniserver.py ../util/geniticket.py ../util/gid.py ../util/misc.py ../util/record.py ../util/rights.py ../util/report.py ../util/trustedroot.py ../plc/trusted_roots install"
+export FILES="component.py ../util/cert.py ../util/credential.py ../util/excep.py ../util/geniserver.py ../util/sfaticket.py ../util/gid.py ../util/misc.py ../util/record.py ../util/rights.py ../util/report.py ../util/trustedroot.py ../plc/trusted_roots install"
 echo $FILES
 scp -i $KEY_FILE -r $FILES $USER@$1:$DEST_DIR
index c4bae71..f8d59e9 100644 (file)
@@ -65,7 +65,7 @@ SFA_SM_PORT=12347
 # PLC Interface Access Configuration
 #
 # PLC user
-# Valid plc account geni interfaces will use for plc requests   
+# sfa services will use this account for issuing plc requests - must have admin rights
 
 SFA_PLC_USER='root@localhost.localdomain'
 
@@ -78,8 +78,7 @@ SFA_PLC_PASSWORD='root'
 SFA_PLC_URL='https://localhost:443/PLCAPI/'
 
 # PLC Shell PATH
-# Path of PLC shell. This only applies if Geni interfaces and PLC interface are running on the same 
-# machine
+# This only applies if sfa services and PLC interface are running on the same machine
 SFA_PLC_SHELL_PATH='/usr/share/plc_api'
 
 # PLC DB Name
index e2bcd92..5024fb2 100644 (file)
@@ -16,7 +16,7 @@ from sfa.util.geniclient import GeniClient, ServerException
 from sfa.util.record import GeniRecord
 from sfa.util.rspec import Rspec
 
-def determine_geni_filekind(fn):
+def determine_sfa_filekind(fn):
     cert = Certificate(filename = fn)
 
     data = cert.get_data()
@@ -78,7 +78,7 @@ def main():
         return -1
 
    filename = args[0]
-   kind = determine_geni_filekind(filename)
+   kind = determine_sfa_filekind(filename)
 
    if kind=="credential":
        cred = Credential(filename = filename)
index f328dd7..7cea8d7 100644 (file)
@@ -5,7 +5,7 @@ from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
-from sfa.util.geniticket import *
+from sfa.util.sfaticket import SfaTicket
 
 class get_ticket(Method):
     """
@@ -51,7 +51,7 @@ class get_ticket(Method):
         record = table.resolve('slice', hrn)
 
         object_gid = record.get_gid_object()
-        new_ticket = Ticket(subject = object_gid.get_subject())
+        new_ticket = SfaTicket(subject = object_gid.get_subject())
         new_ticket.set_gid_caller(self.client_gid)
         new_ticket.set_gid_object(object_gid)
         new_ticket.set_issuer(key=auth_info.get_pkey_object(), subject=auth_hrn)
index 336fd9e..a6055de 100644 (file)
@@ -24,7 +24,7 @@ from sfa.trust.gid import *
 
 from sfa.util.misc import *
 from sfa.util.config import *
-from sfa.util.geniticket import *
+from sfa.util.sfaticket import SfaTicket
 
 ##
 # The AuthInfo class contains the information for an authority. This information
@@ -318,7 +318,7 @@ class Hierarchy:
         auth_info = self.get_auth_info(hrn)
         gid = auth_info.get_gid_object()
 
-        ticket = Ticket(subject=hrn)
+        ticket = SfaTicket(subject=hrn)
         ticket.set_gid_caller(gid)
         ticket.set_gid_object(gid)
         ticket.set_delegate(True)
index 7980bf8..2e2660f 100644 (file)
@@ -17,7 +17,9 @@
 privilege_table = {"authority": ["register", "remove", "update", "resolve", "list", "getcredential"],
                    "refresh": ["remove", "update"],
                    "resolve": ["resolve", "list", "getcredential"],
-                   "sa": ["getticket", "redeemslice", "createslice", "deleteslice", "updateslice", "getsliceresources", "getticket", "loanresources", "stopslice", "startslice", "deleteslice", "resetslice", "listslices", "listnodes", "getpolicy"],
+                   "sa": ["getticket", "redeemslice", "createslice", "deleteslice", "updateslice", 
+                          "getsliceresources", "getticket", "loanresources", "stopslice", "startslice", 
+                          "deleteslice", "resetslice", "listslices", "listnodes", "getpolicy"],
                    "embed": ["getticket", "redeemslice", "createslice", "deleteslice", "updateslice", "getsliceresources"],
                    "bind": ["getticket", "loanresources"],
                    "control": ["updateslice", "createslice", "stopslice", "startslice", "deleteslice", "resetslice", "getsliceresources"],
index 91932b5..65ce60b 100644 (file)
@@ -14,7 +14,7 @@ import xmlrpclib
 from sfa.trust.gid import *
 from sfa.trust.credential import *
 from sfa.util.record import *
-from sfa.util.geniticket import *
+from sfa.util.sfaticket import SfaTicket
 
 ##
 # ServerException, ExceptionUnmarshaller
@@ -358,7 +358,7 @@ class GeniClient:
 
     def get_ticket(self, cred, name, rspec):
         ticket_str = self.server.get_ticket(cred.save_to_string(save_parents=True), name, rspec)
-        ticket = Ticket(string=ticket_str)
+        ticket = SfaTicket(string=ticket_str)
         return ticket
 
     ##
similarity index 98%
rename from sfa/util/geniticket.py
rename to sfa/util/sfaticket.py
index 42435c8..849e3d3 100644 (file)
@@ -1,6 +1,5 @@
-# tickets.py
 #
-# implements GENI tickets
+# implements SFA tickets
 #
 
 ### $Id$
@@ -20,7 +19,7 @@ from sfa.trust.gid import *
 #    attributes = slice attributes (keys, vref, instantiation, etc)
 #    rspec = resources
 
-class Ticket(Certificate):
+class SfaTicket(Certificate):
     gidCaller = None
     gidObject = None
     attributes = {}