From: Thierry Parmentelat Date: Mon, 6 Jul 2009 20:38:44 +0000 (+0000) Subject: rename geniticket.py into sfaticket.py and defined class Ticket into SfaTicket X-Git-Tag: sfa-0.9-0@14641~144 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1d15635c313f9fe13a977a347382ab716fd4e52b;p=sfa.git rename geniticket.py into sfaticket.py and defined class Ticket into SfaTicket --- diff --git a/INSTALL.txt b/INSTALL.txt index 10913d16..cac1f04c 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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: diff --git a/component/component.py b/component/component.py index 828c3d30..7aa21635 100644 --- a/component/component.py +++ b/component/component.py @@ -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 diff --git a/component/copynode.sh b/component/copynode.sh index ce5698aa..77bea0f5 100755 --- a/component/copynode.sh +++ b/component/copynode.sh @@ -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 diff --git a/config/sfa_config b/config/sfa_config index c4bae71e..f8d59e93 100644 --- a/config/sfa_config +++ b/config/sfa_config @@ -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 diff --git a/sfa/client/genidump.py b/sfa/client/genidump.py index e2bcd924..5024fb2d 100644 --- a/sfa/client/genidump.py +++ b/sfa/client/genidump.py @@ -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) diff --git a/sfa/methods/get_ticket.py b/sfa/methods/get_ticket.py index f328dd7a..7cea8d75 100644 --- a/sfa/methods/get_ticket.py +++ b/sfa/methods/get_ticket.py @@ -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) diff --git a/sfa/trust/hierarchy.py b/sfa/trust/hierarchy.py index 336fd9e4..a6055de2 100644 --- a/sfa/trust/hierarchy.py +++ b/sfa/trust/hierarchy.py @@ -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) diff --git a/sfa/trust/rights.py b/sfa/trust/rights.py index 7980bf87..2e2660f4 100644 --- a/sfa/trust/rights.py +++ b/sfa/trust/rights.py @@ -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"], diff --git a/sfa/util/geniclient.py b/sfa/util/geniclient.py index 91932b59..65ce60b9 100644 --- a/sfa/util/geniclient.py +++ b/sfa/util/geniclient.py @@ -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 ## diff --git a/sfa/util/geniticket.py b/sfa/util/sfaticket.py similarity index 98% rename from sfa/util/geniticket.py rename to sfa/util/sfaticket.py index 42435c8d..849e3d3a 100644 --- a/sfa/util/geniticket.py +++ b/sfa/util/sfaticket.py @@ -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 = {}