(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:
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 *
##
# @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()
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()
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
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
# 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'
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
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()
return -1
filename = args[0]
- kind = determine_geni_filekind(filename)
+ kind = determine_sfa_filekind(filename)
if kind=="credential":
cred = Credential(filename = filename)
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):
"""
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)
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
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)
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"],
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
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
##
-# tickets.py
#
-# implements GENI tickets
+# implements SFA tickets
#
### $Id$
# attributes = slice attributes (keys, vref, instantiation, etc)
# rspec = resources
-class Ticket(Certificate):
+class SfaTicket(Certificate):
gidCaller = None
gidObject = None
attributes = {}