removed another bunch of references to geni
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Jan 2010 16:31:37 +0000 (16:31 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Jan 2010 16:31:37 +0000 (16:31 +0000)
78 files changed:
Makefile
README.txt
config/sfa_component_config
docs/Makefile
setup.py
sfa.spec
sfa/client/sfadump.py [moved from sfa/client/genidump.py with 95% similarity]
sfa/client/sfi.py
sfa/managers/aggregate_manager_max.py
sfa/managers/aggregate_manager_openflow.py
sfa/managers/aggregate_manager_pl.py
sfa/managers/aggregate_manager_vini.py
sfa/managers/registry_manager_pl.py
sfa/managers/slice_manager_pl.py
sfa/methods/get_gid.py
sfa/methods/get_gids.py
sfa/methods/get_key.py
sfa/methods/get_self_credential.py
sfa/methods/get_ticket.py
sfa/methods/list.py
sfa/methods/register.py
sfa/methods/register_peer_object.py
sfa/methods/remove_peer_object.py
sfa/methods/resolve.py
sfa/methods/update.py
sfa/plc/api.py
sfa/plc/nodes.py
sfa/plc/remoteshell.py
sfa/plc/sfa-import-plc.py
sfa/plc/sfa-nuke-plc.py
sfa/plc/sfaImport.py
sfa/plc/slices.py
sfa/rspecs/aggregates/rspec_manager_max.py
sfa/rspecs/aggregates/rspec_manager_openflow.py
sfa/rspecs/aggregates/rspec_manager_vini.py
sfa/rspecs/aggregates/vini/utils.py
sfa/server/SfaAggregateModPython.py
sfa/server/SfaRegistryModPython.py
sfa/server/SfaSliceMgrModPython.py
sfa/server/aggregate.py
sfa/server/component.py
sfa/server/modpythonapi/installTest.sh
sfa/server/modpythonapi/test.sh
sfa/server/registry.py
sfa/server/sfa-clean-peer-records.py
sfa/server/sfa-server.py
sfa/server/slicemgr.py
sfa/trust/auth.py
sfa/trust/certificate.py
sfa/trust/credential.py
sfa/trust/gid.py
sfa/trust/hierarchy.py
sfa/trust/rights.py
sfa/util/PostgreSQL.py
sfa/util/api.py
sfa/util/client.py [moved from sfa/util/geniclient.py with 96% similarity]
sfa/util/componentserver.py
sfa/util/config.py
sfa/util/faults.py
sfa/util/filter.py
sfa/util/method.py
sfa/util/misc.py
sfa/util/namespace.py
sfa/util/nodemanager.py
sfa/util/parameter.py
sfa/util/record.py
sfa/util/row.py
sfa/util/server.py [moved from sfa/util/geniserver.py with 95% similarity]
sfa/util/soapprotocol.py
sfa/util/table.py [moved from sfa/util/genitable.py with 87% similarity]
sfa/util/xmlrpcprotocol.py
sfacomponent/component.py
sfacomponent/copynode.sh
sfacomponent/plc/api.py
sfacomponent/server/component.py
sfatables/commands/moo.py
tests/client/testAggregate.py
tests/testRecord.py

index ff7e7f3..1ad12d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ RSYNC                 := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
 BINS = ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
        ./sfa/server/sfa-server.py \
        ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
 BINS = ./config/sfa-config-tty ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py \
        ./sfa/server/sfa-server.py \
        ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \
-       ./sfa/client/setRecord.py ./sfa/client/genidump.py
+       ./sfa/client/setRecord.py ./sfa/client/sfadump.py
 
 sync:
 ifeq (,$(SSHURL))
 
 sync:
 ifeq (,$(SSHURL))
index 5df1a94..42255d4 100644 (file)
@@ -1,4 +1,4 @@
-This module (geniwrapper) is installed as part of MyPLC, available as
+This module (sfa) is installed as part of MyPLC, available as
 part of the PlanetLab development effort. For more information on
 accessing, installing, developing and deploying PlanetLab software,
 visit http://svn.planet-lab.org.
 part of the PlanetLab development effort. For more information on
 accessing, installing, developing and deploying PlanetLab software,
 visit http://svn.planet-lab.org.
index 0698a62..137405e 100644 (file)
@@ -37,7 +37,7 @@ SFA_REGISTRY_LEVEL1_AUTH=""
 SFA_REGISTRY_HOST="localhost"
 
 # Port
 SFA_REGISTRY_HOST="localhost"
 
 # Port
-# Geni registry port
+# SFA registry port
 SFA_REGISTRY_PORT=12345
 
 ## ==============================================================
 SFA_REGISTRY_PORT=12345
 
 ## ==============================================================
@@ -60,7 +60,7 @@ SFA_AGGREGATE_TYPE='pl'
 SFA_AGGREGATE_HOST="localhost"
 #
 ## Port
 SFA_AGGREGATE_HOST="localhost"
 #
 ## Port
-## Geni aggregate server port
+## SFA aggregate server port
 SFA_AGGREGATE_PORT=12346
 
 ## ==============================================================
 SFA_AGGREGATE_PORT=12346
 
 ## ==============================================================
@@ -83,7 +83,7 @@ SFA_SM_TYPE='pl'
 SFA_SM_HOST="localhost"
 
 # Port
 SFA_SM_HOST="localhost"
 
 # Port
-# Geni slice manager server port  
+# SFA slice manager server port  
 SFA_SM_PORT=12347
 
 ## ===============================================================
 SFA_SM_PORT=12347
 
 ## ===============================================================
@@ -103,7 +103,7 @@ SFA_CM_TYPE='pl'
 SFA_CM_HOST="localhost"
 #
 # Port
 SFA_CM_HOST="localhost"
 #
 # Port
-# Geni slice manager server port
+# SFA slice manager server port
 SFA_CM_PORT=12346
 
 
 SFA_CM_PORT=12346
 
 
index 43f9ad0..463dbaf 100644 (file)
@@ -2,8 +2,8 @@
 doc:
        pythondoc.py ../sfa/util/certificate.py ../sfa/util/credential.py ../sfa/util/gid.py \
                      ../sfa/util/rights.py ../sfa/util/config.py ../sfa/trust/hierarchy.py \
 doc:
        pythondoc.py ../sfa/util/certificate.py ../sfa/util/credential.py ../sfa/util/gid.py \
                      ../sfa/util/rights.py ../sfa/util/config.py ../sfa/trust/hierarchy.py \
-                     ../sfa/util/record.py ../sfa/util/geniclient.py \
-                     ../sfa/util/geniserver.py 
+                     ../sfa/util/record.py ../sfa/util/client.py \
+                     ../sfa/util/server.py 
 
        pythondoc.py ../sfa/registry/registry.py ../sfa/registry/import.py \
                      ../sfa/registry/nuke.py
 
        pythondoc.py ../sfa/registry/registry.py ../sfa/registry/import.py \
                      ../sfa/registry/nuke.py
index f4e2c9a..18f5618 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 """
 #!/usr/bin/python
 
 """
-Installation script for the geniwrapper module
+Installation script for the sfa module
 """
 
 import sys, os, os.path
 """
 
 import sys, os, os.path
@@ -9,34 +9,36 @@ from glob import glob
 import shutil
 from distutils.core import setup
 
 import shutil
 from distutils.core import setup
 
-bins = [ 'config/sfa-config-tty',
-            'sfa/plc/sfa-import-plc.py', 
-            'sfa/plc/sfa-nuke-plc.py', 
-            'sfa/server/sfa-server.py', 
-            'sfa/server/sfa-clean-peer-records.py', 
-            'sfa/client/sfi.py', 
-            'sfa/client/getNodes.py',
-            'sfa/client/getRecord.py',
-            'sfa/client/setRecord.py',
-            'sfa/client/genidump.py',
-            'sfatables/sfatables',
-            ]
+bins = [ 
+    'config/sfa-config-tty',
+    'sfa/plc/sfa-import-plc.py', 
+    'sfa/plc/sfa-nuke-plc.py', 
+    'sfa/server/sfa-server.py', 
+    'sfa/server/sfa-clean-peer-records.py', 
+    'sfa/client/sfi.py', 
+    'sfa/client/getNodes.py',
+    'sfa/client/getRecord.py',
+    'sfa/client/setRecord.py',
+    'sfa/client/sfadump.py',
+    'sfatables/sfatables',
+    ]
 
 
-package_dirs = [ 'sfa', 
-                 'sfa/client',
-                 'sfa/methods',
-                 'sfa/plc',
-                 'sfa/server',
-                 'sfa/trust',
-                 'sfa/util', 
-                 'sfa/managers',
-                 'sfa/rspecs',
-                 'sfa/rspecs/aggregates',
-                 'sfa/rspecs/aggregates/vini',
-                 'sfatables',
-                 'sfatables/commands',
-                 'sfatables/processors',
-                 ]
+package_dirs = [
+    'sfa', 
+    'sfa/client',
+    'sfa/methods',
+    'sfa/plc',
+    'sfa/server',
+    'sfa/trust',
+    'sfa/util', 
+    'sfa/managers',
+    'sfa/rspecs',
+    'sfa/rspecs/aggregates',
+    'sfa/rspecs/aggregates/vini',
+    'sfatables',
+    'sfatables/commands',
+    'sfatables/processors',
+    ]
 
 
 data_files = [('/etc/sfa/', [ 'config/aggregates.xml',
 
 
 data_files = [('/etc/sfa/', [ 'config/aggregates.xml',
index ccb8683..eafcf31 100644 (file)
--- a/sfa.spec
+++ b/sfa.spec
@@ -62,7 +62,7 @@ Requires: sfa
 This package provides the python libraries that the SFA implementation requires
 
 %description plc
 This package provides the python libraries that the SFA implementation requires
 
 %description plc
-Geniwrapper implements the SFA interface which serves as a layer
+This package implements the SFA interface which serves as a layer
 between the existing PlanetLab interfaces and the SFA API.
 
 %description client
 between the existing PlanetLab interfaces and the SFA API.
 
 %description client
@@ -113,7 +113,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/getNodes.py*
 %{_bindir}/getRecord.py*
 %{_bindir}/setRecord.py*
 %{_bindir}/getNodes.py*
 %{_bindir}/getRecord.py*
 %{_bindir}/setRecord.py*
-%{_bindir}/genidump.py*
+%{_bindir}/sfadump.py*
 
 %files sfatables
 %{_bindir}/sfatables
 
 %files sfatables
 %{_bindir}/sfatables
similarity index 95%
rename from sfa/client/genidump.py
rename to sfa/client/sfadump.py
index 311fbef..6496ca6 100644 (file)
@@ -1,4 +1,6 @@
 #! /usr/bin/env python
 #! /usr/bin/env python
+# $Id$
+# $URL$
 from __future__ import with_statement
 
 import sys
 from __future__ import with_statement
 
 import sys
@@ -10,7 +12,7 @@ from optparse import OptionParser
 
 from sfa.trust.certificate import Certificate
 from sfa.trust.credential import Credential
 
 from sfa.trust.certificate import Certificate
 from sfa.trust.credential import Credential
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.util.rspec import RSpec
 
 def determine_sfa_filekind(fn):
 from sfa.util.rspec import RSpec
 
 def determine_sfa_filekind(fn):
@@ -59,7 +61,7 @@ def extract_gids(cred, extract_parents):
 
 def create_parser():
    # Generate command line parser
 
 def create_parser():
    # Generate command line parser
-   parser = OptionParser(usage="genidump [options] filename")
+   parser = OptionParser(usage="%prog [options] filename")
 
    parser.add_option("-e", "--extractgids", action="store_true", dest="extract_gids", default=False, help="Extract GIDs from credentials")
    parser.add_option("-p", "--dumpparents", action="store_true", dest="dump_parents", default=False, help="Show parents")
 
    parser.add_option("-e", "--extractgids", action="store_true", dest="extract_gids", default=False, help="Extract GIDs from credentials")
    parser.add_option("-p", "--dumpparents", action="store_true", dest="dump_parents", default=False, help="Show parents")
index 688dd2c..b1a4379 100755 (executable)
@@ -106,7 +106,7 @@ def save_record_to_file(filename, record):
     elif record['type'] in ['authority', 'ma', 'sa']:
         record = AuthorityRecord(dict = record)
     else:
     elif record['type'] in ['authority', 'ma', 'sa']:
         record = AuthorityRecord(dict = record)
     else:
-        record = GeniRecord(dict = record)
+        record = SfaRecord(dict = record)
     str = record.save_to_string()
     file(filename, "w").write(str)
     return
     str = record.save_to_string()
     file(filename, "w").write(str)
     return
@@ -115,7 +115,7 @@ def save_record_to_file(filename, record):
 # load methods
 def load_record_from_file(filename):
     str = file(filename, "r").read()
 # load methods
 def load_record_from_file(filename):
     str = file(filename, "r").read()
-    record = GeniRecord(string=str)
+    record = SfaRecord(string=str)
     return record
 
 
     return record
 
 
@@ -449,7 +449,7 @@ class Sfi:
             raise Exception, "Error: Didn't find a %(type)s record for %(hrn)s" % locals()
     
         # the gid of the user who will be delegated too
             raise Exception, "Error: Didn't find a %(type)s record for %(hrn)s" % locals()
     
         # the gid of the user who will be delegated too
-        record = GeniRecord(dict=records[0])
+        record = SfaRecord(dict=records[0])
         delegee_gid = record.get_gid_object()
         delegee_hrn = delegee_gid.get_hrn()
         
         delegee_gid = record.get_gid_object()
         delegee_hrn = delegee_gid.get_hrn()
         
@@ -572,7 +572,7 @@ class Sfi:
             elif record['type'] in ['authority', 'ma', 'sa']:
                 record = AuthorityRecord(dict = record)
             else:
             elif record['type'] in ['authority', 'ma', 'sa']:
                 record = AuthorityRecord(dict = record)
             else:
-                record = GeniRecord(dict = record)
+                record = SfaRecord(dict = record)
             if (opts.format=="text"): 
                 record.dump()  
             else:
             if (opts.format=="text"): 
                 record.dump()  
             else:
index 7f0a253..5c12875 100644 (file)
@@ -22,15 +22,15 @@ SFA_MAX_CANNED_RSPEC = '/etc/sfa/max_physical_canned.xml'
 
 topology = {}
 
 
 topology = {}
 
-class GeniOutOfResource(GeniFault):
+class SfaOutOfResource(SfaFault):
     def __init__(self, interface):
         faultString = "Interface " + interface + " not available"
     def __init__(self, interface):
         faultString = "Interface " + interface + " not available"
-        GeniFault.__init__(self, 100, faultString, '')
+        SfaFault.__init__(self, 100, faultString, '')
 
 
-class GeniNoPairRSpec(GeniFault):
+class SfaNoPairRSpec(SfaFault):
     def __init__(self, interface, interface2):
         faultString = "Interface " + interface + " should be paired with " + interface2
     def __init__(self, interface, interface2):
         faultString = "Interface " + interface + " should be paired with " + interface2
-        GeniFault.__init__(self, 100, faultString, '')
+        SfaFault.__init__(self, 100, faultString, '')
 
 # Returns a mapping from interfaces to the nodes they lie on and their peer interfaces
 # i -> node,i_peer
 
 # Returns a mapping from interfaces to the nodes they lie on and their peer interfaces
 # i -> node,i_peer
@@ -140,7 +140,7 @@ def alloc_nodes(api,hrn, requested_ifs):
 # Taken from slices.py
 
 def create_slice_max_aggregate(api, hrn, nodes):
 # Taken from slices.py
 
 def create_slice_max_aggregate(api, hrn, nodes):
-    # Get the slice record from geni
+    # Get the slice record 
     global topology
     topology = get_interface_map()
     slice = {}
     global topology
     topology = get_interface_map()
     slice = {}
@@ -288,9 +288,9 @@ def create_slice(api, hrn, rspec_xml):
 
     for a in requested_interfaces:
         if (a not in current_hrn_interfaces and a in current_interfaces):
 
     for a in requested_interfaces:
         if (a not in current_hrn_interfaces and a in current_interfaces):
-            raise GeniOutOfResource(a)
+            raise SfaOutOfResource(a)
         if (topology[a][1] not in requested_interfaces):
         if (topology[a][1] not in requested_interfaces):
-            raise GeniNoPairRSpec(a,topology[a][1])
+            raise SfaNoPairRSpec(a,topology[a][1])
     # Request OK
 
     # Allocations to delete
     # Request OK
 
     # Allocations to delete
index e784f6f..a745b6e 100755 (executable)
@@ -14,7 +14,7 @@ import sys
 import socket
 import struct
 
 import socket
 import struct
 
-# Message IDs for all the GENI light calls
+# Message IDs for all the SFA light calls
 # This will be used by the aggrMgr controller
 SFA_GET_RESOURCES = 101
 SFA_CREATE_SLICE = 102
 # This will be used by the aggrMgr controller
 SFA_GET_RESOURCES = 101
 SFA_CREATE_SLICE = 102
index 949d71e..f890a69 100644 (file)
@@ -11,7 +11,7 @@ from sfa.util.namespace import *
 from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
 from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.util.policy import Policy
 from sfa.util.record import *
 from sfa.util.sfaticket import SfaTicket
 from sfa.util.policy import Policy
 from sfa.util.record import *
 from sfa.util.sfaticket import SfaTicket
index a596668..e8f879c 100644 (file)
@@ -13,7 +13,7 @@ SFA_VINI_WHITELIST = '/etc/sfa/vini.whitelist'
 Copied from create_slice_aggregate() in sfa.plc.slices
 """
 def create_slice_vini_aggregate(api, hrn, nodes):
 Copied from create_slice_aggregate() in sfa.plc.slices
 """
 def create_slice_vini_aggregate(api, hrn, nodes):
-    # Get the slice record from geni
+    # Get the slice record
     slice = {}
     registries = Registries(api)
     registry = registries[api.hrn]
     slice = {}
     registries = Registries(api)
     registry = registries[api.hrn]
index f08e18d..584f580 100644 (file)
@@ -2,10 +2,9 @@ import types
 import time 
 from sfa.server.registry import Registries
 from sfa.util.prefixTree import prefixTree
 import time 
 from sfa.server.registry import Registries
 from sfa.util.prefixTree import prefixTree
-from sfa.util.record import GeniRecord
-from sfa.util.genitable import GeniTable
-from sfa.util.record import GeniRecord
-from sfa.util.genitable import GeniTable
+from sfa.util.record import SfaRecord
+from sfa.util.table import SfaTable
+from sfa.util.record import SfaRecord
 from sfa.trust.gid import GID 
 from sfa.util.namespace import *
 from sfa.trust.credential import *
 from sfa.trust.gid import GID 
 from sfa.util.namespace import *
 from sfa.trust.credential import *
@@ -19,7 +18,7 @@ def get_credential(api, hrn, type, is_self=False):
         auth_hrn = hrn
     # get record info
     auth_info = api.auth.get_auth_info(auth_hrn)
         auth_hrn = hrn
     # get record info
     auth_info = api.auth.get_auth_info(auth_hrn)
-    table = GeniTable()
+    table = SfaTable()
     records = table.findObjects({'type': type, 'hrn': hrn})
     if not records:
         raise RecordNotFound(hrn)
     records = table.findObjects({'type': type, 'hrn': hrn})
     if not records:
         raise RecordNotFound(hrn)
@@ -92,12 +91,12 @@ def resolve(api, hrns, type=None, origin_hrn=None):
         if registry_hrn != api.hrn:
             credential = api.getCredential()
             peer_records = registries[registry_hrn].resolve(credential, hrn, origin_hrn)
         if registry_hrn != api.hrn:
             credential = api.getCredential()
             peer_records = registries[registry_hrn].resolve(credential, hrn, origin_hrn)
-            records.extend([GeniRecord(dict=record).as_dict() for record in peer_records])
+            records.extend([SfaRecord(dict=record).as_dict() for record in peer_records])
 
     # try resolving the remaining unfound records at the local registry
     remaining_hrns = set(hrns).difference([record['hrn'] for record in records])
     remaining_hrns = [hrn for hrn in remaining_hrns] 
 
     # try resolving the remaining unfound records at the local registry
     remaining_hrns = set(hrns).difference([record['hrn'] for record in records])
     remaining_hrns = [hrn for hrn in remaining_hrns] 
-    table = GeniTable()
+    table = SfaTable()
     local_records = table.findObjects({'hrn': remaining_hrns})
     for record in local_records:
         try:
     local_records = table.findObjects({'hrn': remaining_hrns})
     for record in local_records:
         try:
@@ -105,7 +104,7 @@ def resolve(api, hrns, type=None, origin_hrn=None):
             records.append(dict(record))
         except PlanetLabRecordDoesNotExist:
             # silently drop the ones that are missing in PL
             records.append(dict(record))
         except PlanetLabRecordDoesNotExist:
             # silently drop the ones that are missing in PL
-            print >> log, "ignoring geni record ", record['hrn'], \
+            print >> log, "ignoring SFA record ", record['hrn'], \
                               " because pl record does not exist"    
             table.remove(record)
 
                               " because pl record does not exist"    
             table.remove(record)
 
@@ -137,14 +136,14 @@ def list(api, hrn):
     if registry_hrn != api.hrn:
         credential = api.getCredential()
         record_list = registries[registry_hrn].list(credential, hrn, origin_hrn)
     if registry_hrn != api.hrn:
         credential = api.getCredential()
         record_list = registries[registry_hrn].list(credential, hrn, origin_hrn)
-        records = [GeniRecord(dict=record).as_dict() for record in record_list]
+        records = [SfaRecord(dict=record).as_dict() for record in record_list]
     
     # if we still havnt found the record yet, try the local registry
     if not records:
         if not api.auth.hierarchy.auth_exists(hrn):
             raise MissingAuthority(hrn)
 
     
     # if we still havnt found the record yet, try the local registry
     if not records:
         if not api.auth.hierarchy.auth_exists(hrn):
             raise MissingAuthority(hrn)
 
-        table = GeniTable()
+        table = SfaTable()
         records = table.find({'authority': hrn})
 
     return records
         records = table.find({'authority': hrn})
 
     return records
@@ -156,15 +155,15 @@ def register(api, record):
 
     # validate the type
     if type not in ['authority', 'slice', 'node', 'user']:
 
     # validate the type
     if type not in ['authority', 'slice', 'node', 'user']:
-        raise UnknownGeniType(type) 
+        raise UnknownSfaType(type) 
     
     # check if record already exists
     
     # check if record already exists
-    table = GeniTable()
+    table = SfaTable()
     existing_records = table.find({'type': type, 'hrn': hrn})
     if existing_records:
         raise ExistingRecord(hrn)
        
     existing_records = table.find({'type': type, 'hrn': hrn})
     if existing_records:
         raise ExistingRecord(hrn)
        
-    record = GeniRecord(dict = record)
+    record = SfaRecord(dict = record)
     record['authority'] = get_authority(record['hrn'])
     type = record['type']
     hrn = record['hrn']
     record['authority'] = get_authority(record['hrn'])
     type = record['type']
     hrn = record['hrn']
@@ -195,7 +194,7 @@ def register(api, record):
         # get the GID from the newly created authority
         gid = auth_info.get_gid_object()
         record.set_gid(gid.save_to_string(save_parents=True))
         # get the GID from the newly created authority
         gid = auth_info.get_gid_object()
         record.set_gid(gid.save_to_string(save_parents=True))
-        pl_record = api.geni_fields_to_pl_fields(type, hrn, record)
+        pl_record = api.sfa_fields_to_pl_fields(type, hrn, record)
         sites = api.plshell.GetSites(api.plauth, [pl_record['login_base']])
         if not sites:
             pointer = api.plshell.AddSite(api.plauth, pl_record)
         sites = api.plshell.GetSites(api.plauth, [pl_record['login_base']])
         if not sites:
             pointer = api.plshell.AddSite(api.plauth, pl_record)
@@ -207,7 +206,7 @@ def register(api, record):
 
     elif (type == "slice"):
         acceptable_fields=['url', 'instantiation', 'name', 'description']
 
     elif (type == "slice"):
         acceptable_fields=['url', 'instantiation', 'name', 'description']
-        pl_record = api.geni_fields_to_pl_fields(type, hrn, record)
+        pl_record = api.sfa_fields_to_pl_fields(type, hrn, record)
         for key in pl_record.keys():
             if key not in acceptable_fields:
                 pl_record.pop(key)
         for key in pl_record.keys():
             if key not in acceptable_fields:
                 pl_record.pop(key)
@@ -241,7 +240,7 @@ def register(api, record):
             api.plshell.AddPersonKey(api.plauth, pointer, {'key_type' : 'ssh', 'key' : pub_key})
 
     elif (type == "node"):
             api.plshell.AddPersonKey(api.plauth, pointer, {'key_type' : 'ssh', 'key' : pub_key})
 
     elif (type == "node"):
-        pl_record = api.geni_fields_to_pl_fields(type, hrn, record)
+        pl_record = api.sfa_fields_to_pl_fields(type, hrn, record)
         login_base = hrn_to_pl_login_base(record['authority'])
         nodes = api.plshell.GetNodes(api.plauth, [pl_record['hostname']])
         if not nodes:
         login_base = hrn_to_pl_login_base(record['authority'])
         nodes = api.plshell.GetNodes(api.plauth, [pl_record['hostname']])
         if not nodes:
@@ -260,11 +259,11 @@ def register(api, record):
     return record.get_gid_object().save_to_string(save_parents=True)
 
 def update(api, record_dict):
     return record.get_gid_object().save_to_string(save_parents=True)
 
 def update(api, record_dict):
-    new_record = GeniRecord(dict = record_dict)
+    new_record = SfaRecord(dict = record_dict)
     type = new_record['type']
     hrn = new_record['hrn']
     api.auth.verify_object_permission(hrn)
     type = new_record['type']
     hrn = new_record['hrn']
     api.auth.verify_object_permission(hrn)
-    table = GeniTable()
+    table = SfaTable()
     # make sure the record exists
     records = table.findObjects({'type': type, 'hrn': hrn})
     if not records:
     # make sure the record exists
     records = table.findObjects({'type': type, 'hrn': hrn})
     if not records:
@@ -285,7 +284,7 @@ def update(api, record_dict):
         api.plshell.UpdateSite(api.plauth, pointer, new_record)
 
     elif type == "slice":
         api.plshell.UpdateSite(api.plauth, pointer, new_record)
 
     elif type == "slice":
-        pl_record=api.geni_fields_to_pl_fields(type, hrn, new_record)
+        pl_record=api.sfa_fields_to_pl_fields(type, hrn, new_record)
         if 'name' in pl_record:
             pl_record.pop('name')
             api.plshell.UpdateSlice(api.plauth, pointer, pl_record)
         if 'name' in pl_record:
             pl_record.pop('name')
             api.plshell.UpdateSlice(api.plauth, pointer, pl_record)
@@ -330,14 +329,14 @@ def update(api, record_dict):
             gid_object = api.auth.hierarchy.create_gid(hrn, uuid, pkey)
             gid = gid_object.save_to_string(save_parents=True)
             record['gid'] = gid
             gid_object = api.auth.hierarchy.create_gid(hrn, uuid, pkey)
             gid = gid_object.save_to_string(save_parents=True)
             record['gid'] = gid
-            record = GeniRecord(dict=record)
+            record = SfaRecord(dict=record)
             table.update(record)
 
     elif type == "node":
         api.plshell.UpdateNode(api.plauth, pointer, new_record)
 
     else:
             table.update(record)
 
     elif type == "node":
         api.plshell.UpdateNode(api.plauth, pointer, new_record)
 
     else:
-        raise UnknownGeniType(type)
+        raise UnknownSfaType(type)
 
     # update membership for researchers, pis, owners, operators
     api.update_membership(record, new_record)
 
     # update membership for researchers, pis, owners, operators
     api.update_membership(record, new_record)
@@ -345,7 +344,7 @@ def update(api, record_dict):
     return 1 
 
 def remove(api, hrn, type, origin_hrn=None):
     return 1 
 
 def remove(api, hrn, type, origin_hrn=None):
-    table = GeniTable()
+    table = SfaTable()
     filter = {'hrn': hrn}
     if type not in ['all', '*']:
         filter['type'] = type
     filter = {'hrn': hrn}
     if type not in ['all', '*']:
         filter['type'] = type
@@ -383,7 +382,7 @@ def remove(api, hrn, type, origin_hrn=None):
         if api.plshell.GetSites(api.plauth, record['pointer']):
             api.plshell.DeleteSite(api.plauth, record['pointer'])
     else:
         if api.plshell.GetSites(api.plauth, record['pointer']):
             api.plshell.DeleteSite(api.plauth, record['pointer'])
     else:
-        raise UnknownGeniType(type)
+        raise UnknownSfaType(type)
 
     table.remove(record)
 
 
     table.remove(record)
 
index c5b0f26..dd80ddd 100644 (file)
@@ -11,7 +11,7 @@ from sfa.util.namespace import *
 from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
 from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.util.policy import Policy
 from sfa.util.prefixTree import prefixTree
 from sfa.util.rspec import *
 from sfa.util.policy import Policy
 from sfa.util.prefixTree import prefixTree
 from sfa.util.rspec import *
index 66320e6..b3d7c6f 100644 (file)
@@ -11,7 +11,6 @@ from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
 from sfa.trust.gid import GID
 from sfa.trust.certificate import Certificate
 from sfa.trust.auth import Auth
 from sfa.trust.gid import GID
 from sfa.trust.certificate import Certificate
-from sfa.util.genitable import GeniTable
 
 class get_gid(Method):
     """
 
 class get_gid(Method):
     """
index 5f1e0aa..5159087 100644 (file)
@@ -12,7 +12,6 @@ from sfa.trust.auth import Auth
 from sfa.trust.gid import GID
 from sfa.trust.certificate import Certificate
 from sfa.trust.credential import Credential
 from sfa.trust.gid import GID
 from sfa.trust.certificate import Certificate
 from sfa.trust.credential import Credential
-from sfa.util.genitable import GeniTable
 
 class get_gids(Method):
     """
 
 class get_gids(Method):
     """
index 6ede861..c641985 100644 (file)
@@ -8,7 +8,7 @@ from sfa.util.namespace import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
-from sfa.util.genitable import *
+from sfa.util.table import SfaTable
 from sfa.trust.certificate import Keypair
 
 class get_key(Method):
 from sfa.trust.certificate import Keypair
 
 class get_key(Method):
@@ -36,7 +36,7 @@ class get_key(Method):
         node = nodes[0]
        
         # look up the sfa record
         node = nodes[0]
        
         # look up the sfa record
-        table = GeniTable()
+        table = SfaTable()
         records = table.findObjects({'type': 'node', 'pointer': node['node_id']})
         if not records:
             raise RecordNotFound("pointer:" + str(node['node_id']))  
         records = table.findObjects({'type': 'node', 'pointer': node['node_id']})
         if not records:
             raise RecordNotFound("pointer:" + str(node['node_id']))  
index ab55c47..49bad01 100644 (file)
@@ -6,7 +6,7 @@ from sfa.trust.rights import *
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.util.debug import log
 
 class get_self_credential(Method):
 from sfa.util.debug import log
 
 class get_self_credential(Method):
@@ -58,7 +58,7 @@ class get_self_credential(Method):
         records = manager.resolve(self.api, hrn, type)
         if not records:
             raise RecordNotFound(hrn)
         records = manager.resolve(self.api, hrn, type)
         if not records:
             raise RecordNotFound(hrn)
-        record = GeniRecord(dict=records[0])
+        record = SfaRecord(dict=records[0])
         gid = record.get_gid_object()
         gid_str = gid.save_to_string(save_parents=True)
         self.api.auth.authenticateGid(gid_str, [cert, type, hrn], request_hash)
         gid = record.get_gid_object()
         gid_str = gid.save_to_string(save_parents=True)
         self.api.auth.authenticateGid(gid_str, [cert, type, hrn], request_hash)
index 2ee18f2..314e359 100644 (file)
@@ -7,7 +7,7 @@ from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
 from sfa.util.config import Config
 from sfa.trust.credential import Credential
 from sfa.trust.auth import Auth
 from sfa.util.config import Config
 from sfa.trust.credential import Credential
-from sfa.util.genitable import GeniTable
+from sfa.util.table import SfaTable
 from sfa.util.sfaticket import SfaTicket
 from sfa.plc.slices import Slices
 from sfatables.runtime import SFATablesRules
 from sfa.util.sfaticket import SfaTicket
 from sfa.plc.slices import Slices
 from sfatables.runtime import SFATablesRules
index bd600d3..489c083 100644 (file)
@@ -4,7 +4,7 @@
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.trust.credential import Credential
 
 class list(Method):
 from sfa.trust.credential import Credential
 
 class list(Method):
@@ -24,7 +24,7 @@ class list(Method):
               Parameter(None, "Origin hrn not specified"))
         ]
 
               Parameter(None, "Origin hrn not specified"))
         ]
 
-    returns = [GeniRecord]
+    returns = [SfaRecord]
     
     def call(self, cred, hrn, origin_hrn=None):
         user_cred = Credential(string=cred)
     
     def call(self, cred, hrn, origin_hrn=None):
         user_cred = Credential(string=cred)
index c821605..1e3e24a 100644 (file)
@@ -6,8 +6,7 @@ from sfa.trust.gid import *
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.faults import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
-from sfa.util.record import GeniRecord
-from sfa.util.genitable import GeniTable
+from sfa.util.record import SfaRecord
 from sfa.util.debug import log
 from sfa.trust.auth import Auth
 from sfa.trust.gid import create_uuid
 from sfa.util.debug import log
 from sfa.trust.auth import Auth
 from sfa.trust.gid import create_uuid
@@ -16,7 +15,7 @@ from sfa.trust.credential import Credential
 class register(Method):
     """
     Register an object with the registry. In addition to being stored in the
 class register(Method):
     """
     Register an object with the registry. In addition to being stored in the
-    Geni database, the appropriate records will also be created in the
+    SFA database, the appropriate records will also be created in the
     PLC databases
     
     @param cred credential string
     PLC databases
     
     @param cred credential string
index 0d8c853..68b3105 100644 (file)
@@ -8,8 +8,8 @@ from sfa.util.faults import *
 from sfa.util.namespace import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.namespace import *
 from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
-from sfa.util.record import GeniRecord
-from sfa.util.genitable import GeniTable
+from sfa.util.record import SfaRecord
+from sfa.util.table import SfaTable
 from sfa.util.debug import log
 from sfa.trust.auth import Auth
 from sfa.trust.gid import create_uuid
 from sfa.util.debug import log
 from sfa.trust.auth import Auth
 from sfa.trust.gid import create_uuid
@@ -18,7 +18,7 @@ from sfa.trust.credential import Credential
 class register_peer_object(Method):
     """
     Register a peer object with the registry. In addition to being stored in the
 class register_peer_object(Method):
     """
     Register a peer object with the registry. In addition to being stored in the
-    Geni database, the appropriate records will also be created in the
+    SFA database, the appropriate records will also be created in the
     PLC databases
     
     @param cred credential string
     PLC databases
     
     @param cred credential string
@@ -51,16 +51,16 @@ class register_peer_object(Method):
         # make sure this is a peer record
         if 'peer_authority' not in record_dict or \
            not record_dict['peer_authority']: 
         # make sure this is a peer record
         if 'peer_authority' not in record_dict or \
            not record_dict['peer_authority']: 
-            raise GeniInvalidArgument, "peer_authority must be specified" 
+            raise SfaInvalidArgument, "peer_authority must be specified" 
 
 
-        record = GeniRecord(dict = record_dict)
+        record = SfaRecord(dict = record_dict)
         type, hrn, peer_authority = record['type'], record['hrn'], record['peer_authority']
         record['authority'] = get_authority(record['hrn'])
         # verify permissions
         self.api.auth.verify_cred_is_me(cred)
 
         # check if record already exists
         type, hrn, peer_authority = record['type'], record['hrn'], record['peer_authority']
         record['authority'] = get_authority(record['hrn'])
         # verify permissions
         self.api.auth.verify_cred_is_me(cred)
 
         # check if record already exists
-        table = GeniTable()
+        table = SfaTable()
         existing_records = table.find({'type': type, 'hrn': hrn, 'peer_authority': peer_authority})
         if existing_records:
             for existing_record in existing_records:
         existing_records = table.find({'type': type, 'hrn': hrn, 'peer_authority': peer_authority})
         if existing_records:
             for existing_record in existing_records:
index 8343264..32b756a 100644 (file)
@@ -2,8 +2,8 @@ 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.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.trust.auth import Auth
-from sfa.util.record import GeniRecord
-from sfa.util.genitable import GeniTable
+from sfa.util.record import SfaRecord
+from sfa.util.table import SfaTable
 from sfa.util.debug import log
 from sfa.trust.credential import Credential
 from types import StringTypes
 from sfa.util.debug import log
 from sfa.trust.credential import Credential
 from types import StringTypes
@@ -46,7 +46,7 @@ class remove_peer_object(Method):
         try: self.api.auth.verify_object_permission(record['hrn'])
         except: self.api.auth.verify_cred_is_me(cred)
         
         try: self.api.auth.verify_object_permission(record['hrn'])
         except: self.api.auth.verify_cred_is_me(cred)
         
-        table = GeniTable()
+        table = SfaTable()
         hrn, type = record['hrn'], record['type']
         records = table.find({'hrn': hrn, 'type': type })
         for record in records:
         hrn, type = record['hrn'], record['type']
         records = table.find({'hrn': hrn, 'type': type })
         for record in records:
@@ -88,14 +88,14 @@ class remove_peer_object(Method):
             self.api.plshell.DeleteSite(self.api.plauth, site['site_id'])
            
         else:
             self.api.plshell.DeleteSite(self.api.plauth, site['site_id'])
            
         else:
-            raise UnknownGeniType(type)
+            raise UnknownSfaType(type)
 
         return 1
 
     def get_peer_name(self, peer_id):
         peers = self.api.plshell.GetPeers(self.api.plauth, [peer_id], ['peername', 'shortname', 'hrn_root'])
         if not peers:
 
         return 1
 
     def get_peer_name(self, peer_id):
         peers = self.api.plshell.GetPeers(self.api.plauth, [peer_id], ['peername', 'shortname', 'hrn_root'])
         if not peers:
-            raise GeniInvalidArgument, "No such peer"
+            raise SfaInvalidArgument, "No such peer"
         peer = peers[0]
         return peer['shortname'] 
 
         peer = peers[0]
         return peer['shortname'] 
 
index 5761d34..b854d65 100644 (file)
@@ -6,7 +6,7 @@ from sfa.util.method import Method
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.debug import log
 from sfa.trust.credential import Credential
 from sfa.util.parameter import Parameter, Mixed
 from sfa.util.debug import log
 from sfa.trust.credential import Credential
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 
 class resolve(Method):
     """
 
 class resolve(Method):
     """
@@ -25,7 +25,7 @@ class resolve(Method):
               Parameter(list, "List of Human readable names ([hrn])"))  
         ]
 
               Parameter(list, "List of Human readable names ([hrn])"))  
         ]
 
-    returns = [GeniRecord]
+    returns = [SfaRecord]
     
     def call(self, cred, hrn, origin_hrn=None):
         user_cred = Credential(string=cred)
     
     def call(self, cred, hrn, origin_hrn=None):
         user_cred = Credential(string=cred)
index 05916b3..2a1be73 100644 (file)
@@ -11,7 +11,7 @@ from sfa.trust.credential import Credential
 class update(Method):
     """
     Update an object in the registry. Currently, this only updates the
 class update(Method):
     """
     Update an object in the registry. Currently, this only updates the
-    PLC information associated with the record. The Geni fields (name, type,
+    PLC information associated with the record. The SFA fields (name, type,
     GID) are fixed.
     
     @param cred credential string specifying rights of the caller
     GID) are fixed.
     
     @param cred credential string specifying rights of the caller
index ef3b9c3..b5c9ce4 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Geniwrapper XML-RPC and SOAP interfaces
+# SFA XML-RPC and SOAP interfaces
 #
 ### $Id$
 ### $URL$
 #
 ### $Id$
 ### $URL$
@@ -21,8 +21,9 @@ from sfa.util.namespace import *
 from sfa.util.api import *
 from sfa.util.nodemanager import NodeManager
 from sfa.util.sfalogging import *
 from sfa.util.api import *
 from sfa.util.nodemanager import NodeManager
 from sfa.util.sfalogging import *
+from sfa.util.table import SfaTable
 
 
-class GeniAPI(BaseAPI):
+class SfaAPI(BaseAPI):
 
     # flat list of method names
     import sfa.methods
 
     # flat list of method names
     import sfa.methods
@@ -135,8 +136,7 @@ class GeniAPI(BaseAPI):
         if not auth_hrn or hrn == self.config.SFA_INTERFACE_HRN:
             auth_hrn = hrn
         auth_info = self.auth.get_auth_info(auth_hrn)
         if not auth_hrn or hrn == self.config.SFA_INTERFACE_HRN:
             auth_hrn = hrn
         auth_info = self.auth.get_auth_info(auth_hrn)
-        from sfa.util.genitable import GeniTable
-        table = GeniTable()
+        table = SfaTable()
         records = table.findObjects(hrn)
         if not records:
             raise RecordNotFound
         records = table.findObjects(hrn)
         if not records:
             raise RecordNotFound
@@ -177,15 +177,15 @@ class GeniAPI(BaseAPI):
             self.credential = self.getCredentialFromRegistry()
 
     ##
             self.credential = self.getCredentialFromRegistry()
 
     ##
-    # Convert geni fields to PLC fields for use when registering up updating
+    # Convert SFA fields to PLC fields for use when registering up updating
     # registry record in the PLC database
     #
     # @param type type of record (user, slice, ...)
     # @param hrn human readable name
     # registry record in the PLC database
     #
     # @param type type of record (user, slice, ...)
     # @param hrn human readable name
-    # @param geni_fields dictionary of geni fields
+    # @param sfa_fields dictionary of SFA fields
     # @param pl_fields dictionary of PLC fields (output)
 
     # @param pl_fields dictionary of PLC fields (output)
 
-    def geni_fields_to_pl_fields(self, type, hrn, record):
+    def sfa_fields_to_pl_fields(self, type, hrn, record):
 
         def convert_ints(tmpdict, int_fields):
             for field in int_fields:
 
         def convert_ints(tmpdict, int_fields):
             for field in int_fields:
@@ -210,7 +210,7 @@ class GeniAPI(BaseAPI):
         elif type == "node":
             if not "hostname" in pl_record:
                 if not "hostname" in record:
         elif type == "node":
             if not "hostname" in pl_record:
                 if not "hostname" in record:
-                    raise MissingGeniInfo("hostname")
+                    raise MissingSfaInfo("hostname")
                 pl_record["hostname"] = record["hostname"]
             if not "model" in pl_record:
                 pl_record["model"] = "geni"
                 pl_record["hostname"] = record["hostname"]
             if not "model" in pl_record:
                 pl_record["model"] = "geni"
@@ -234,7 +234,7 @@ class GeniAPI(BaseAPI):
 
     def fill_record_pl_info(self, record):
         """
 
     def fill_record_pl_info(self, record):
         """
-        Fill in the planetlab specific fields of a Geni record. This
+        Fill in the planetlab specific fields of a SFA record. This
         involves calling the appropriate PLC method to retrieve the 
         database record for the object.
         
         involves calling the appropriate PLC method to retrieve the 
         database record for the object.
         
@@ -262,7 +262,7 @@ class GeniAPI(BaseAPI):
         elif (type == "node"):
             pl_res = self.plshell.GetNodes(self.plauth, [pointer])
         else:
         elif (type == "node"):
             pl_res = self.plshell.GetNodes(self.plauth, [pointer])
         else:
-            raise UnknownGeniType(type)
+            raise UnknownSfaType(type)
         
         if not pl_res:
             raise PlanetLabRecordDoesNotExist(record['hrn'])
         
         if not pl_res:
             raise PlanetLabRecordDoesNotExist(record['hrn'])
@@ -306,16 +306,15 @@ class GeniAPI(BaseAPI):
 
 
 
 
 
 
-    def fill_record_geni_info(self, record):
-        geni_info = {}
+    def fill_record_sfa_info(self, record):
+        sfa_info = {}
         type = record['type']
         type = record['type']
-        from sfa.util.genitable import GeniTable
-        table = GeniTable()
+        table = SfaTable()
         if (type == "slice"):
             person_ids = record.get("person_ids", [])
             persons = table.find({'type': 'user', 'pointer': person_ids})
             researchers = [person['hrn'] for person in persons]
         if (type == "slice"):
             person_ids = record.get("person_ids", [])
             persons = table.find({'type': 'user', 'pointer': person_ids})
             researchers = [person['hrn'] for person in persons]
-            geni_info['researcher'] = researchers
+            sfa_info['researcher'] = researchers
 
         elif (type == "authority"):
             person_ids = record.get("person_ids", [])
 
         elif (type == "authority"):
             person_ids = record.get("person_ids", [])
@@ -339,28 +338,28 @@ class GeniAPI(BaseAPI):
                 if 'admin' in person['roles']:
                     admins.append(hrn)
             
                 if 'admin' in person['roles']:
                     admins.append(hrn)
             
-            geni_info['PI'] = pis
-            geni_info['operator'] = techs
-            geni_info['owner'] = admins
+            sfa_info['PI'] = pis
+            sfa_info['operator'] = techs
+            sfa_info['owner'] = admins
             # xxx TODO: OrganizationName
 
         elif (type == "node"):
             # xxx TODO: OrganizationName
 
         elif (type == "node"):
-            geni_info['dns'] = record.get("hostname", "")
+            sfa_info['dns'] = record.get("hostname", "")
             # xxx TODO: URI, LatLong, IP, DNS
     
         elif (type == "user"):
             # xxx TODO: URI, LatLong, IP, DNS
     
         elif (type == "user"):
-            geni_info['email'] = record.get("email", "")
+            sfa_info['email'] = record.get("email", "")
             # xxx TODO: PostalAddress, Phone
 
             # xxx TODO: PostalAddress, Phone
 
-        record.update(geni_info)
+        record.update(sfa_info)
 
     def fill_record_info(self, record):
         """
 
     def fill_record_info(self, record):
         """
-        Given a geni record, fill in the PLC specific and Geni specific
+        Given a SFA record, fill in the PLC specific and SFA specific
         fields in the record. 
         """
         self.fill_record_pl_info(record)
         fields in the record. 
         """
         self.fill_record_pl_info(record)
-        self.fill_record_geni_info(record)
+        self.fill_record_sfa_info(record)
 
     def update_membership_list(self, oldRecord, record, listName, addFunc, delFunc):
         # get a list of the HRNs tht are members of the old and new records
 
     def update_membership_list(self, oldRecord, record, listName, addFunc, delFunc):
         # get a list of the HRNs tht are members of the old and new records
@@ -377,8 +376,7 @@ class GeniAPI(BaseAPI):
         # build a list of the new person ids, by looking up each person to get
         # their pointer
         newIdList = []
         # build a list of the new person ids, by looking up each person to get
         # their pointer
         newIdList = []
-        from sfa.util.genitable import GeniTable
-        table = GeniTable()
+        table = SfaTable()
         records = table.find({'type': 'user', 'hrn': newList})
         for rec in records:
             newIdList.append(rec['pointer'])
         records = table.find({'type': 'user', 'hrn': newList})
         for rec in records:
             newIdList.append(rec['pointer'])
index 9a2a853..f80bd1a 100644 (file)
@@ -203,7 +203,7 @@ class Nodes(SimpleStorage):
             elif self.api.plshell_version in ['4.3']:
                 interface_ids.extend(node['interface_ids'])
             else:
             elif self.api.plshell_version in ['4.3']:
                 interface_ids.extend(node['interface_ids'])
             else:
-                raise GeniAPIError, "Unsupported plcapi version ", \
+                raise SfaAPIError, "Unsupported plcapi version ", \
                                  self.api.plshell_version
 
         if self.api.plshell_version in ['4.2']:
                                  self.api.plshell_version
 
         if self.api.plshell_version in ['4.2']:
@@ -211,7 +211,7 @@ class Nodes(SimpleStorage):
         elif self.api.plshell_version in ['4.3']:
             interfaces = self.api.plshell.GetInterfaces(self.api.plauth, interface_ids)
         else:
         elif self.api.plshell_version in ['4.3']:
             interfaces = self.api.plshell.GetInterfaces(self.api.plauth, interface_ids)
         else:
-            raise GeniAPIError, "Unsupported plcapi version ", \
+            raise SfaAPIError, "Unsupported plcapi version ", \
                                 self.api.plshell_version 
         interface_dict = {}
         for interface in interfaces:
                                 self.api.plshell_version 
         interface_dict = {}
         for interface in interfaces:
@@ -220,7 +220,7 @@ class Nodes(SimpleStorage):
             elif self.api.plshell_version in ['4.3']:
                 interface_dict[interface['interface_id']] = interface
             else:
             elif self.api.plshell_version in ['4.3']:
                 interface_dict[interface['interface_id']] = interface
             else:
-                raise GeniAPIError, "Unsupported plcapi version", \
+                raise SfaAPIError, "Unsupported plcapi version", \
                                     self.api.plshell_version 
 
         # join nodes with thier interfaces
                                     self.api.plshell_version 
 
         # join nodes with thier interfaces
@@ -233,7 +233,7 @@ class Nodes(SimpleStorage):
                 for interface_id in node['interface_ids']:
                     node['interfaces'].append(interface_dict[interface_id])
             else:
                 for interface_id in node['interface_ids']:
                     node['interfaces'].append(interface_dict[interface_id])
             else:
-                raise GeniAPIError, "Unsupported plcapi version", \
+                raise SfaAPIError, "Unsupported plcapi version", \
                                     self.api.plshell_version
 
         # convert and threshold to ints
                                     self.api.plshell_version
 
         # convert and threshold to ints
index 6d5453d..14cd629 100644 (file)
@@ -4,7 +4,7 @@
 #
 # RemoteShell() exports an API that looks identical to that exported by
 # PLC.Shell.Shell(). It's meant to be a drop in replacement for running
 #
 # RemoteShell() exports an API that looks identical to that exported by
 # PLC.Shell.Shell(). It's meant to be a drop in replacement for running
-# geniwrapper on a different machine than PLC.
+# SFA on a different machine than PLC.
 
 ### $Id$
 ### $URL$
 
 ### $Id$
 ### $URL$
index 2ca9b74..cf2fa4a 100755 (executable)
@@ -4,8 +4,8 @@
 ### $URL$
 #
 ##
 ### $URL$
 #
 ##
-# Import PLC records into the Geni database. It is indended that this tool be
-# run once to create Geni records that reflect the current state of the
+# Import PLC records into the SFA database. It is indended that this tool be
+# run once to create SFA records that reflect the current state of the
 # planetlab database.
 #
 # The import tool assumes that the existing PLC hierarchy should all be part
 # planetlab database.
 #
 # The import tool assumes that the existing PLC hierarchy should all be part
@@ -23,7 +23,7 @@ import tempfile
 import logging.handlers
 import logging
 from sfa.util.record import *
 import logging.handlers
 import logging
 from sfa.util.record import *
-from sfa.util.genitable import GeniTable
+from sfa.util.table import SfaTable
 from sfa.util.namespace import *
 from sfa.util.config import Config
 from sfa.trust.certificate import convert_public_key, Keypair
 from sfa.util.namespace import *
 from sfa.util.config import Config
 from sfa.trust.certificate import convert_public_key, Keypair
@@ -81,7 +81,7 @@ def main():
     plc_auth = sfaImporter.plc_auth 
     AuthHierarchy = sfaImporter.AuthHierarchy
     TrustedRoots = sfaImporter.TrustedRoots
     plc_auth = sfaImporter.plc_auth 
     AuthHierarchy = sfaImporter.AuthHierarchy
     TrustedRoots = sfaImporter.TrustedRoots
-    table = GeniTable()
+    table = SfaTable()
     if not table.exists():
         table.create()
 
     if not table.exists():
         table.create()
 
index eac6ed7..16c12dc 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 ##
 #!/usr/bin/python
 ##
-# Delete all the database records for Geni. This tool is used to clean out Geni
+# Delete all the database records for SFA. This tool is used to clean out SFA
 # records during testing.
 #
 # Authority info (maintained by the hierarchy module in a subdirectory tree)
 # records during testing.
 #
 # Authority info (maintained by the hierarchy module in a subdirectory tree)
@@ -12,7 +12,7 @@ import sys
 
 from sfa.trust.hierarchy import *
 from sfa.util.record import *
 
 from sfa.trust.hierarchy import *
 from sfa.util.record import *
-from sfa.util.genitable import GeniTable
+from sfa.util.table import SfaTable
 from sfa.util.config import Config
 
 def process_options():
 from sfa.util.config import Config
 
 def process_options():
@@ -25,8 +25,8 @@ def process_options():
 def main():
     process_options()
 
 def main():
     process_options()
 
-    print "purging geni records from database"
-    GeniTable.geni_records_purge(Config().get_plc_dbinfo())
+    print "Purging SFA records from database"
+    SfaTable.sfa_records_purge(Config().get_plc_dbinfo())
 
 if __name__ == "__main__":
     main()
 
 if __name__ == "__main__":
     main()
index 399c23a..a554cb6 100644 (file)
@@ -13,7 +13,7 @@ import sys
 import tempfile
 
 from sfa.util.record import *
 import tempfile
 
 from sfa.util.record import *
-from sfa.util.genitable import GeniTable
+from sfa.util.table import SfaTable
 from sfa.util.namespace import *
 from sfa.util.config import Config
 from sfa.util.report import trace, error
 from sfa.util.namespace import *
 from sfa.util.config import Config
 from sfa.util.report import trace, error
@@ -90,11 +90,11 @@ class sfaImport:
                 parent_hrn = hrn
             auth_info = AuthHierarchy.get_auth_info(parent_hrn)
             
                 parent_hrn = hrn
             auth_info = AuthHierarchy.get_auth_info(parent_hrn)
             
-        table = GeniTable()
+        table = SfaTable()
         auth_record = table.find({'type': 'authority', 'hrn': hrn})
 
         if not auth_record:
         auth_record = table.find({'type': 'authority', 'hrn': hrn})
 
         if not auth_record:
-            auth_record = GeniRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=-1)
+            auth_record = SfaRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=-1)
             auth_record['authority'] = get_authority(auth_record['hrn'])
             trace("Import: inserting authority record for " + hrn, self.logger)
             table.insert(auth_record)
             auth_record['authority'] = get_authority(auth_record['hrn'])
             trace("Import: inserting authority record for " + hrn, self.logger)
             table.insert(auth_record)
@@ -128,8 +128,8 @@ class sfaImport:
 
         # create the gid
         person_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
 
         # create the gid
         person_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
-        table = GeniTable()
-        person_record = GeniRecord(hrn=hrn, gid=person_gid, type="user", pointer=person['person_id'])
+        table = SfaTable()
+        person_record = SfaRecord(hrn=hrn, gid=person_gid, type="user", pointer=person['person_id'])
         person_record['authority'] = get_authority(person_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'user', 'pointer': person['person_id']})
         if not existing_records:
         person_record['authority'] = get_authority(person_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'user', 'pointer': person['person_id']})
         if not existing_records:
@@ -154,9 +154,9 @@ class sfaImport:
 
         pkey = Keypair(create=True)
         slice_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
 
         pkey = Keypair(create=True)
         slice_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
-        slice_record = GeniRecord(hrn=hrn, gid=slice_gid, type="slice", pointer=slice['slice_id'])
+        slice_record = SfaRecord(hrn=hrn, gid=slice_gid, type="slice", pointer=slice['slice_id'])
         slice_record['authority'] = get_authority(slice_record['hrn'])
         slice_record['authority'] = get_authority(slice_record['hrn'])
-        table = GeniTable()
+        table = SfaTable()
         existing_records = table.find({'hrn': hrn, 'type': 'slice', 'pointer': slice['slice_id']})
         if not existing_records:
             table.insert(slice_record)
         existing_records = table.find({'hrn': hrn, 'type': 'slice', 'pointer': slice['slice_id']})
         if not existing_records:
             table.insert(slice_record)
@@ -181,11 +181,11 @@ class sfaImport:
         if len(hrn) > 64:
             hrn = hrn[:64]
 
         if len(hrn) > 64:
             hrn = hrn[:64]
 
-        table = GeniTable()
+        table = SfaTable()
         node_record = table.find({'type': 'node', 'hrn': hrn})
         pkey = Keypair(create=True)
         node_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
         node_record = table.find({'type': 'node', 'hrn': hrn})
         pkey = Keypair(create=True)
         node_gid = AuthHierarchy.create_gid(hrn, create_uuid(), pkey)
-        node_record = GeniRecord(hrn=hrn, gid=node_gid, type="node", pointer=node['node_id'])
+        node_record = SfaRecord(hrn=hrn, gid=node_gid, type="node", pointer=node['node_id'])
         node_record['authority'] = get_authority(node_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'node', 'pointer': node['node_id']})
         if not existing_records:
         node_record['authority'] = get_authority(node_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'node', 'pointer': node['node_id']})
         if not existing_records:
@@ -225,8 +225,8 @@ class sfaImport:
 
         auth_info = AuthHierarchy.get_auth_info(hrn)
 
 
         auth_info = AuthHierarchy.get_auth_info(hrn)
 
-        table = GeniTable()
-        auth_record = GeniRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=site['site_id'])
+        table = SfaTable()
+        auth_record = SfaRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=site['site_id'])
         auth_record['authority'] = get_authority(auth_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'authority', 'pointer': site['site_id']})
         if not existing_records:
         auth_record['authority'] = get_authority(auth_record['hrn'])
         existing_records = table.find({'hrn': hrn, 'type': 'authority', 'pointer': site['site_id']})
         if not existing_records:
@@ -242,7 +242,7 @@ class sfaImport:
 
     def delete_record(self, hrn, type):
         # delete the record
 
     def delete_record(self, hrn, type):
         # delete the record
-        table = GeniTable()
+        table = SfaTable()
         record_list = table.find({'type': type, 'hrn': hrn})
         for record in record_list:
             trace("Import: Removing record %s %s" % (type, hrn), self.logger)
         record_list = table.find({'type': type, 'hrn': hrn})
         for record in record_list:
             trace("Import: Removing record %s %s" % (type, hrn), self.logger)
index 4fa3098..cfeed46 100644 (file)
@@ -12,7 +12,7 @@ from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
 from sfa.util.storage import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
 from sfa.util.storage import *
-from sfa.util.record import GeniRecord
+from sfa.util.record import SfaRecord
 from sfa.util.policy import Policy
 from sfa.util.prefixTree import prefixTree
 from sfa.util.debug import log
 from sfa.util.policy import Policy
 from sfa.util.prefixTree import prefixTree
 from sfa.util.debug import log
index 7f0a253..c6504b9 100644 (file)
@@ -22,15 +22,15 @@ SFA_MAX_CANNED_RSPEC = '/etc/sfa/max_physical_canned.xml'
 
 topology = {}
 
 
 topology = {}
 
-class GeniOutOfResource(GeniFault):
+class SfaOutOfResource(SfaFault):
     def __init__(self, interface):
         faultString = "Interface " + interface + " not available"
     def __init__(self, interface):
         faultString = "Interface " + interface + " not available"
-        GeniFault.__init__(self, 100, faultString, '')
+        SfaFault.__init__(self, 100, faultString, '')
 
 
-class GeniNoPairRSpec(GeniFault):
+class SfaNoPairRSpec(SfaFault):
     def __init__(self, interface, interface2):
         faultString = "Interface " + interface + " should be paired with " + interface2
     def __init__(self, interface, interface2):
         faultString = "Interface " + interface + " should be paired with " + interface2
-        GeniFault.__init__(self, 100, faultString, '')
+        SfaFault.__init__(self, 100, faultString, '')
 
 # Returns a mapping from interfaces to the nodes they lie on and their peer interfaces
 # i -> node,i_peer
 
 # Returns a mapping from interfaces to the nodes they lie on and their peer interfaces
 # i -> node,i_peer
@@ -140,7 +140,7 @@ def alloc_nodes(api,hrn, requested_ifs):
 # Taken from slices.py
 
 def create_slice_max_aggregate(api, hrn, nodes):
 # Taken from slices.py
 
 def create_slice_max_aggregate(api, hrn, nodes):
-    # Get the slice record from geni
+    # Get the slice record from SFA
     global topology
     topology = get_interface_map()
     slice = {}
     global topology
     topology = get_interface_map()
     slice = {}
@@ -288,9 +288,9 @@ def create_slice(api, hrn, rspec_xml):
 
     for a in requested_interfaces:
         if (a not in current_hrn_interfaces and a in current_interfaces):
 
     for a in requested_interfaces:
         if (a not in current_hrn_interfaces and a in current_interfaces):
-            raise GeniOutOfResource(a)
+            raise SfaOutOfResource(a)
         if (topology[a][1] not in requested_interfaces):
         if (topology[a][1] not in requested_interfaces):
-            raise GeniNoPairRSpec(a,topology[a][1])
+            raise SfaNoPairRSpec(a,topology[a][1])
     # Request OK
 
     # Allocations to delete
     # Request OK
 
     # Allocations to delete
index e784f6f..a745b6e 100755 (executable)
@@ -14,7 +14,7 @@ import sys
 import socket
 import struct
 
 import socket
 import struct
 
-# Message IDs for all the GENI light calls
+# Message IDs for all the SFA light calls
 # This will be used by the aggrMgr controller
 SFA_GET_RESOURCES = 101
 SFA_CREATE_SLICE = 102
 # This will be used by the aggrMgr controller
 SFA_GET_RESOURCES = 101
 SFA_CREATE_SLICE = 102
index a596668..20dc7fb 100644 (file)
@@ -13,7 +13,7 @@ SFA_VINI_WHITELIST = '/etc/sfa/vini.whitelist'
 Copied from create_slice_aggregate() in sfa.plc.slices
 """
 def create_slice_vini_aggregate(api, hrn, nodes):
 Copied from create_slice_aggregate() in sfa.plc.slices
 """
 def create_slice_vini_aggregate(api, hrn, nodes):
-    # Get the slice record from geni
+    # Get the slice record from SFA
     slice = {}
     registries = Registries(api)
     registry = registries[api.hrn]
     slice = {}
     registries = Registries(api)
     registry = registries[api.hrn]
index 32f2bc4..ea36aad 100644 (file)
@@ -542,7 +542,7 @@ class Topology:
         maxbps = get_tc_rate(maxbw)
         for link in self.nodelinks:
             if link.bps <= 0:
         maxbps = get_tc_rate(maxbw)
         for link in self.nodelinks:
             if link.bps <= 0:
-                raise GeniInvalidArgument(bw, "BW")
+                raise SfaInvalidArgument(bw, "BW")
             if link.bps > maxbps:
                 raise PermissionError(" %s requested %s but max BW is %s" % 
                                       (hrn, format_tc_rate(link.bps), maxbw))
             if link.bps > maxbps:
                 raise PermissionError(" %s requested %s but max BW is %s" % 
                                       (hrn, format_tc_rate(link.bps), maxbw))
index 7193ba6..e1ab86d 100755 (executable)
@@ -12,10 +12,10 @@ import traceback
 import xmlrpclib
 from mod_python import apache
 
 import xmlrpclib
 from mod_python import apache
 
-from sfa.plc.api import GeniAPI
+from sfa.plc.api import SfaAPI
 from sfa.util.debug import log
 
 from sfa.util.debug import log
 
-api = GeniAPI(interface='aggregate')
+api = SfaAPI(interface='aggregate')
 
 class unbuffered:
     """\r
 
 class unbuffered:
     """\r
index 4eeb913..a9044eb 100755 (executable)
@@ -12,9 +12,9 @@ import traceback
 import xmlrpclib
 from mod_python import apache
 from sfa.util.debug import log
 import xmlrpclib
 from mod_python import apache
 from sfa.util.debug import log
-from sfa.plc.api import GeniAPI
+from sfa.plc.api import SfaAPI
 
 
-api = GeniAPI(interface='registry')
+api = SfaAPI(interface='registry')
 
 class unbuffered:
     """\r
 
 class unbuffered:
     """\r
index ea7b734..7ad8e0d 100755 (executable)
@@ -12,10 +12,10 @@ import traceback
 import xmlrpclib
 from mod_python import apache
 
 import xmlrpclib
 from mod_python import apache
 
-from sfa.plc.api import GeniAPI
+from sfa.plc.api import SfaAPI
 from sfa.util.debug import log
 
 from sfa.util.debug import log
 
-api = GeniAPI(interface='slicemgr')
+api = SfaAPI(interface='slicemgr')
 
 class unbuffered:
     """\r
 
 class unbuffered:
     """\r
index 478a5ac..9295e3f 100644 (file)
@@ -8,7 +8,7 @@ import time
 import xmlrpclib
 from types import StringTypes, ListType
 
 import xmlrpclib
 from types import StringTypes, ListType
 
-from sfa.util.geniserver import GeniServer
+from sfa.util.server import SfaServer
 from sfa.util.storage import *
 from sfa.util.faults import *
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol
 from sfa.util.storage import *
 from sfa.util.faults import *
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol
@@ -21,7 +21,7 @@ except ImportError:
     GeniClientLight = None
 
 
     GeniClientLight = None
 
 
-class Aggregate(GeniServer):
+class Aggregate(SfaServer):
 
     ##
     # Create a new aggregate object.
 
     ##
     # Create a new aggregate object.
@@ -31,7 +31,7 @@ class Aggregate(GeniServer):
     # @param key_file private key filename of registry
     # @param cert_file certificate filename containing public key (could be a GID file)     
     def __init__(self, ip, port, key_file, cert_file):
     # @param key_file private key filename of registry
     # @param cert_file certificate filename containing public key (could be a GID file)     
     def __init__(self, ip, port, key_file, cert_file):
-        GeniServer.__init__(self, ip, port, key_file, cert_file)
+        SfaServer.__init__(self, ip, port, key_file, cert_file)
         self.server.interface = 'aggregate'
 
 ##
         self.server.interface = 'aggregate'
 
 ##
index df5d483..c83ac4a 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Component is a GeniServer that implements the Component interface
+# Component is a SfaServer that implements the Component interface
 #
 ### $Id: 
 ### $URL: 
 #
 ### $Id: 
 ### $URL: 
@@ -19,7 +19,7 @@ except ImportError:
     GeniClientLight = None            
 
 ##
     GeniClientLight = None            
 
 ##
-# Component is a GeniServer that serves component operations.
+# Component is a SfaServer that serves component operations.
 
 class Component(ComponentServer):
     ##
 
 class Component(ComponentServer):
     ##
index 7ae489e..1a6514e 100755 (executable)
@@ -1,4 +1,4 @@
-GENI_SRC_DIR=/home/smbaker/projects/geniwrapper/trunk
+SFA_SRC_DIR=/home/smbaker/projects/sfa/trunk
 
 mkdir -p /usr/local/testapi/bin
 mkdir -p /usr/local/testapi/bin/sfa/trust
 
 mkdir -p /usr/local/testapi/bin
 mkdir -p /usr/local/testapi/bin/sfa/trust
@@ -19,19 +19,19 @@ cp trusted_roots/*.gid /usr/local/testapi/var/trusted_roots/
 # apache config file to enable the api
 cp testapi.conf /etc/httpd/conf.d/
 
 # apache config file to enable the api
 cp testapi.conf /etc/httpd/conf.d/
 
-# copy over geniwrapper stuff that we need
+# copy over sfa stuff that we need
 echo > /usr/local/testapi/bin/sfa/__init__.py
 echo > /usr/local/testapi/bin/sfa/trust/__init__.py
 echo > /usr/local/testapi/bin/sfa/util/__init__.py
 echo > /usr/local/testapi/bin/sfa/__init__.py
 echo > /usr/local/testapi/bin/sfa/trust/__init__.py
 echo > /usr/local/testapi/bin/sfa/util/__init__.py
-cp $GENI_SRC_DIR/sfa/trust/gid.py /usr/local/testapi/bin/sfa/trust/
-cp $GENI_SRC_DIR/sfa/trust/certificate.py /usr/local/testapi/bin/sfa/trust/
-cp $GENI_SRC_DIR/sfa/trust/trustedroot.py /usr/local/testapi/bin/sfa/trust/
-cp $GENI_SRC_DIR/sfa/trust/credential.py /usr/local/testapi/bin/sfa/trust/
-cp $GENI_SRC_DIR/sfa/trust/rights.py /usr/local/testapi/bin/sfa/trust/
-cp $GENI_SRC_DIR/sfa/util/faults.py /usr/local/testapi/bin/sfa/util/ 
+cp $SFA_SRC_DIR/sfa/trust/gid.py /usr/local/testapi/bin/sfa/trust/
+cp $SFA_SRC_DIR/sfa/trust/certificate.py /usr/local/testapi/bin/sfa/trust/
+cp $SFA_SRC_DIR/sfa/trust/trustedroot.py /usr/local/testapi/bin/sfa/trust/
+cp $SFA_SRC_DIR/sfa/trust/credential.py /usr/local/testapi/bin/sfa/trust/
+cp $SFA_SRC_DIR/sfa/trust/rights.py /usr/local/testapi/bin/sfa/trust/
+cp $SFA_SRC_DIR/sfa/util/faults.py /usr/local/testapi/bin/sfa/util/ 
 
 # make everything owned by apache
 chown -R apache /usr/local/testapi
 chown apache /etc/httpd/conf.d/testapi.conf
 
 
 # make everything owned by apache
 chown -R apache /usr/local/testapi
 chown apache /etc/httpd/conf.d/testapi.conf
 
-/etc/init.d/httpd restart
\ No newline at end of file
+/etc/init.d/httpd restart
index 745c6a8..cafa0fb 100755 (executable)
@@ -1,3 +1,3 @@
-export PYTHONPATH=/home/smbaker/projects/geniwrapper/trunk
+export PYTHONPATH=/home/smbaker/projects/sfa/trunk
 
 python ./test.py
 
 python ./test.py
index c5d7cdf..1902a64 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Registry is a GeniServer that implements the Registry interface
+# Registry is a SfaServer that implements the Registry interface
 #
 ### $Id$
 ### $URL$
 #
 ### $Id$
 ### $URL$
@@ -10,7 +10,7 @@ import os
 import time
 import sys
 
 import time
 import sys
 
-from sfa.util.geniserver import GeniServer
+from sfa.util.server import SfaServer
 from sfa.util.faults import *
 from sfa.util.storage import *
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol
 from sfa.util.faults import *
 from sfa.util.storage import *
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol
@@ -23,9 +23,9 @@ except ImportError:
     GeniClientLight = None            
 
 ##
     GeniClientLight = None            
 
 ##
-# Registry is a GeniServer that serves registry and slice operations at PLC.
+# Registry is a SfaServer that serves registry and slice operations at PLC.
 
 
-class Registry(GeniServer):
+class Registry(SfaServer):
     ##
     # Create a new registry object.
     #
     ##
     # Create a new registry object.
     #
@@ -35,7 +35,7 @@ class Registry(GeniServer):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
-        GeniServer.__init__(self, ip, port, key_file, cert_file)
+        SfaServer.__init__(self, ip, port, key_file, cert_file)
         self.server.interface = 'registry' 
 
 
         self.server.interface = 'registry' 
 
 
index 358aee2..5c13335 100644 (file)
@@ -4,8 +4,8 @@ import sys
 import os
 import traceback
 from sfa.util.namespace import *
 import os
 import traceback
 from sfa.util.namespace import *
-from sfa.util.genitable import GeniTable
-from sfa.plc.api import GeniAPI
+from sfa.util.table import SfaTable
+from sfa.plc.api import SfaAPI
 from sfa.util.config import Config
 from sfa.trust.certificate import Keypair
 from sfa.trust.hierarchy import Hierarchy
 from sfa.util.config import Config
 from sfa.trust.certificate import Keypair
 from sfa.trust.hierarchy import Hierarchy
@@ -32,14 +32,14 @@ def main():
     authority = config.SFA_INTERFACE_HRN
     url = 'http://%s:%s/' %(config.SFA_REGISTRY_HOST, config.SFA_REGISTRY_PORT)
     registry = xmlrpcprotocol.get_server((url, key_file, cert_file)
     authority = config.SFA_INTERFACE_HRN
     url = 'http://%s:%s/' %(config.SFA_REGISTRY_HOST, config.SFA_REGISTRY_PORT)
     registry = xmlrpcprotocol.get_server((url, key_file, cert_file)
-    sfa_api = GeniAPI(key_file = key_file, cert_file = cert_file, interface='registry')
+    sfa_api = SfaAPI(key_file = key_file, cert_file = cert_file, interface='registry')
     credential = sfa_api.getCredential()
 
     # get peer registries
     registries = Registries(sfa_api)
 
     # get local peer records
     credential = sfa_api.getCredential()
 
     # get peer registries
     registries = Registries(sfa_api)
 
     # get local peer records
-    table = GeniTable()
+    table = SfaTable()
     peer_records = table.find({'~peer_authority': None})
     for peer_record in peer_records:
         peer_auth = peer_record['peer_authority']
     peer_records = table.find({'~peer_authority': None})
     for peer_record in peer_records:
         peer_auth = peer_record['peer_authority']
index 9bdf9cb..134b44a 100755 (executable)
@@ -3,9 +3,9 @@
 ### $Id$
 ### $URL$
 #
 ### $Id$
 ### $URL$
 #
-# GENI PLC Wrapper
+# SFA PLC Wrapper
 #
 #
-# This wrapper implements the Geni Registry and Slice Interfaces on PLC.
+# This wrapper implements the SFA Registry and Slice Interfaces on PLC.
 # Depending on command line options, it starts some combination of a
 # Registry, an Aggregate Manager, and a Slice Manager.
 #
 # Depending on command line options, it starts some combination of a
 # Registry, an Aggregate Manager, and a Slice Manager.
 #
@@ -18,7 +18,7 @@
 # is up to date and accurate.
 #
 # 1) Import the existing planetlab database, creating the
 # is up to date and accurate.
 #
 # 1) Import the existing planetlab database, creating the
-#    appropriate geni records. This is done by running the "sfa-import-plc.py" tool.
+#    appropriate SFA records. This is done by running the "sfa-import-plc.py" tool.
 #
 # 2) Create a "trusted_roots" directory and place the certificate of the root
 #    authority in that directory. Given the defaults in sfa-import-plc.py, this
 #
 # 2) Create a "trusted_roots" directory and place the certificate of the root
 #    authority in that directory. Given the defaults in sfa-import-plc.py, this
index f459fab..1194887 100644 (file)
@@ -5,9 +5,9 @@ import os
 import sys
 import datetime
 import time
 import sys
 import datetime
 import time
-from sfa.util.geniserver import *
+from sfa.util.server import *
 
 
-class SliceMgr(GeniServer):
+class SliceMgr(SfaServer):
 
   
     ##
 
   
     ##
@@ -19,5 +19,5 @@ class SliceMgr(GeniServer):
     # @param cert_file certificate filename containing public key (could be a GID file)     
 
     def __init__(self, ip, port, key_file, cert_file, config = "/etc/sfa/sfa_config"):
     # @param cert_file certificate filename containing public key (could be a GID file)     
 
     def __init__(self, ip, port, key_file, cert_file, config = "/etc/sfa/sfa_config"):
-        GeniServer.__init__(self, ip, port, key_file, cert_file)
+        SfaServer.__init__(self, ip, port, key_file, cert_file)
         self.server.interface = 'slicemgr'      
         self.server.interface = 'slicemgr'      
index 0d57871..6688767 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# GeniAPI authentication 
+# SfaAPI authentication 
 #
 ### $Id$
 ### $URL$
 #
 ### $Id$
 ### $URL$
@@ -149,7 +149,7 @@ class Auth:
         caller_gid = cred.get_gid_caller()
         caller_hrn = caller_gid.get_hrn()
         if caller_hrn != self.config.SFA_INTERFACE_HRN:
         caller_gid = cred.get_gid_caller()
         caller_hrn = caller_gid.get_hrn()
         if caller_hrn != self.config.SFA_INTERFACE_HRN:
-            raise GeniPermissionError(self.config.SFA_INTEFACE_HRN)
+            raise SfaPermissionDenied(self.config.SFA_INTEFACE_HRN)
 
         return   
         
 
         return   
         
index b34e5cd..9b48835 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# Geniwrapper uses two crypto libraries: pyOpenSSL and M2Crypto to implement
+# SFA uses two crypto libraries: pyOpenSSL and M2Crypto to implement
 # the necessary crypto functionality. Ideally just one of these libraries
 # would be used, but unfortunately each of these libraries is independently
 # lacking. The pyOpenSSL library is missing many necessary functions, and
 # the necessary crypto functionality. Ideally just one of these libraries
 # would be used, but unfortunately each of these libraries is independently
 # lacking. The pyOpenSSL library is missing many necessary functions, and
index 0954cd8..d8451d7 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# Implements Geni Credentials
+# Implements SFA Credentials
 #
 # Credentials are layered on top of certificates, and are essentially a
 # certificate that stores a tuple of parameters.
 #
 # Credentials are layered on top of certificates, and are essentially a
 # certificate that stores a tuple of parameters.
index c1670be..a87b3df 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# Implements GENI GID. GIDs are based on certificates, and the GID class is a
+# Implements SFA GID. GIDs are based on certificates, and the GID class is a
 # descendant of the certificate class.
 ##
 
 # descendant of the certificate class.
 ##
 
index 990a394..ce74c9f 100644 (file)
@@ -1,6 +1,6 @@
 ##
 # This module implements a hierarchy of authorities and performs a similar
 ##
 # This module implements a hierarchy of authorities and performs a similar
-# function as the "tree" module of the original geniwrapper prototype. An HRN
+# function as the "tree" module of the original SFA prototype. An HRN
 # is assumed to be a string of authorities separated by dots. For example,
 # "planetlab.us.arizona.bakers". Each component of the HRN is a different
 # authority, with the last component being a leaf in the tree.
 # is assumed to be a string of authorities separated by dots. For example,
 # "planetlab.us.arizona.bakers". Each component of the HRN is a different
 # authority, with the last component being a leaf in the tree.
index ea10d5d..6d7fc85 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# This Module implements rights and lists of rights for the Geni wrapper. Rights
+# This Module implements rights and lists of rights for the SFA. Rights
 # are implemented by two classes:
 #
 # Right - represents a single right
 # are implemented by two classes:
 #
 # Right - represents a single right
index 1754119..5b34901 100644 (file)
@@ -202,7 +202,7 @@ class PostgreSQL:
             print >> log, query
             print >> log, "Params:"
             print >> log, pformat(params)
             print >> log, query
             print >> log, "Params:"
             print >> log, pformat(params)
-            raise GeniDBError("Please contact support")
+            raise SfaDBError("Please contact support")
 
         return cursor
 
 
         return cursor
 
index db98a26..514364a 100644 (file)
@@ -1,8 +1,8 @@
 #
 #
-# Geniwrapper XML-RPC and SOAP interfaces
+# SFA XML-RPC and SOAP interfaces
 #
 #
-### $Id: api.py 15596 2009-10-31 21:42:05Z anil $
-### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $
+### $Id$
+### $URL$
 #
 
 import sys
 #
 
 import sys
@@ -131,7 +131,7 @@ class BaseAPI:
         """
         # Look up method
         if method not in self.methods:
         """
         # Look up method
         if method not in self.methods:
-            raise GeniInvalidAPIMethod, method
+            raise SfaInvalidAPIMethod, method
         
         # Get new instance of method
         try:
         
         # Get new instance of method
         try:
@@ -140,7 +140,7 @@ class BaseAPI:
             callablemethod = getattr(module, classname)(self)
             return getattr(module, classname)(self)
         except ImportError, AttributeError:
             callablemethod = getattr(module, classname)(self)
             return getattr(module, classname)(self)
         except ImportError, AttributeError:
-            raise GeniInvalidAPIMethod, method
+            raise SfaInvalidAPIMethod, method
 
     def call(self, source, method, *args):
         """
 
     def call(self, source, method, *args):
         """
@@ -186,7 +186,7 @@ class BaseAPI:
 
         # Return result
         if interface == xmlrpclib:
 
         # Return result
         if interface == xmlrpclib:
-            if not isinstance(result, GeniFault):
+            if not isinstance(result, SfaFault):
                 result = (result,)
 
             data = xmlrpclib.dumps(result, methodresponse = True, encoding = self.encoding, allow_none = 1)
                 result = (result,)
 
             data = xmlrpclib.dumps(result, methodresponse = True, encoding = self.encoding, allow_none = 1)
similarity index 96%
rename from sfa/util/geniclient.py
rename to sfa/util/client.py
index d591dac..ed3ec81 100644 (file)
@@ -1,7 +1,7 @@
 ##
 ##
-# This module implements the client-side of the Geni API. Stubs are provided
+# This module implements the client-side of the SFA API. Stubs are provided
 # that convert the supplied parameters to the necessary format and send them
 # that convert the supplied parameters to the necessary format and send them
-# via XMLRPC to a Geni Server.
+# via XMLRPC to an SFA Server.
 #
 # TODO: Investigate ways to combine this with existing PLC API?
 ##
 #
 # TODO: Investigate ways to combine this with existing PLC API?
 ##
@@ -16,11 +16,11 @@ from sfa.util.record import *
 from sfa.util.sfaticket import SfaTicket
 
 ##
 from sfa.util.sfaticket import SfaTicket
 
 ##
-# The GeniClient class provides stubs for executing Geni operations. A given
+# The GeniClient class provides stubs for executing SFA operations. A given
 # client object connects to one server. To connect to multiple servers, create
 # multiple GeniClient objects.
 #
 # client object connects to one server. To connect to multiple servers, create
 # multiple GeniClient objects.
 #
-# The Geni protocol uses an HTTPS connection, and the client's side of the
+# The SFA protocol uses an HTTPS connection, and the client's side of the
 # connection uses his private key. Generally, this private key must match the
 # public key that is containing in the GID that the client is providing for
 # those functions that take a GID.
 # connection uses his private key. Generally, this private key must match the
 # public key that is containing in the GID that the client is providing for
 # those functions that take a GID.
@@ -142,12 +142,12 @@ class GeniClient:
         result_dict_list = self.server.list(cred.save_to_string(save_parents=True), auth_hrn, caller_cred)
         result_rec_list = []
         for dict in result_dict_list:
         result_dict_list = self.server.list(cred.save_to_string(save_parents=True), auth_hrn, caller_cred)
         result_rec_list = []
         for dict in result_dict_list:
-             result_rec_list.append(GeniRecord(dict=dict))
+             result_rec_list.append(SfaRecord(dict=dict))
         return result_rec_list
 
     ##
     # Register an object with the registry. In addition to being stored in the
         return result_rec_list
 
     ##
     # Register an object with the registry. In addition to being stored in the
-    # Geni database, the appropriate records will also be created in the
+    # SFA database, the appropriate records will also be created in the
     # PLC databases.
     #
     #
     # PLC databases.
     #
     #
@@ -219,12 +219,12 @@ class GeniClient:
             elif dict['type'] in ['user']:
                 result_rec_list.append(UserRecord(dict=dict))
             else:
             elif dict['type'] in ['user']:
                 result_rec_list.append(UserRecord(dict=dict))
             else:
-                result_rec_list.append(GeniRecord(dict=dict))
+                result_rec_list.append(SfaRecord(dict=dict))
         return result_rec_list
 
     ##
     # Update an object in the registry. Currently, this only updates the
         return result_rec_list
 
     ##
     # Update an object in the registry. Currently, this only updates the
-    # PLC information associated with the record. The Geni fields (name, type,
+    # PLC information associated with the record. The SFA fields (name, type,
     # GID) are fixed.
     #
     #
     # GID) are fixed.
     #
     #
index 86a00c2..933ecfe 100644 (file)
@@ -6,8 +6,8 @@
 # TODO: investigate ways to combine this with existing PLC server?
 ##
 
 # TODO: investigate ways to combine this with existing PLC server?
 ##
 
-### $Id: geniserver.py 15849 2009-11-23 01:36:21Z tmack $
-### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/util/geniserver.py $
+### $Id$
+### $URL$
 
 import sys
 import traceback
 
 import sys
 import traceback
@@ -26,7 +26,7 @@ from sfa.trust.credential import *
 
 from sfa.util.faults import *
 from sfa.plc.api import ComponentAPI 
 
 from sfa.util.faults import *
 from sfa.plc.api import ComponentAPI 
-from sfa.util.geniserver import verify_callback, SecureXMLRPCServer
+from sfa.util.server import verify_callback, SecureXMLRPCServer
 from sfa.util.debug import log
 
 
 from sfa.util.debug import log
 
 
@@ -88,7 +88,7 @@ class SecureXMLRpcRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
             self.connection.shutdown() # Modified here!
 
 ##
             self.connection.shutdown() # Modified here!
 
 ##
-# Implements an HTTPS XML-RPC server. Generally it is expected that GENI
+# Implements an HTTPS XML-RPC server. Generally it is expected that SFA
 # functions will take a credential string, which is passed to
 # decode_authentication. Decode_authentication() will verify the validity of
 # the credential, and verify that the user is using the key that matches the
 # functions will take a credential string, which is passed to
 # decode_authentication. Decode_authentication() will verify the validity of
 # the credential, and verify that the user is using the key that matches the
@@ -97,7 +97,7 @@ class SecureXMLRpcRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
 class ComponentServer(threading.Thread):
 
     ##
 class ComponentServer(threading.Thread):
 
     ##
-    # Create a new GeniServer object.
+    # Create a new SfaServer object.
     #
     # @param ip the ip address to listen on
     # @param port the port to listen on
     #
     # @param ip the ip address to listen on
     # @param port the port to listen on
index d772346..aec8556 100644 (file)
@@ -1,17 +1,17 @@
 ##
 ##
-# Geniwrapper Configuration Info
+# SFA Configuration Info
 #
 #
-# This module holds configuration parameters for geniwrapper. There are two
+# This module holds configuration parameters for SFA. There are two
 # main pieces of information that are used: the database connection and
 # the PLCAPI connection
 ##
 
 ##
 # main pieces of information that are used: the database connection and
 # the PLCAPI connection
 ##
 
 ##
-# Geniwrapper uses a MYSQL database to store records. This database may be
+# SFA uses a MYSQL database to store records. This database may be
 # co-located with the PLC database, or it may be a separate database. The
 # following parameters define the connection to the database.
 #
 # co-located with the PLC database, or it may be a separate database. The
 # following parameters define the connection to the database.
 #
-# Note that Geniwrapper does not access any of the PLC databases directly via
+# Note that SFA does not access any of the PLC databases directly via
 # a mysql connection; All PLC databases are accessed via PLCAPI.
 
 ### $Id$
 # a mysql connection; All PLC databases are accessed via PLCAPI.
 
 ### $Id$
@@ -110,12 +110,12 @@ class Config:
             }
 
     ##
             }
 
     ##
-    # Geniwrapper uses a PLCAPI connection to perform operations on the registry,
+    # SFA uses a PLCAPI connection to perform operations on the registry,
     # such as creating and deleting slices. This connection requires an account
     # on the PLC server with full administrator access.
     #
     # The Url parameter controls whether the connection uses PLCAPI directly (i.e.
     # such as creating and deleting slices. This connection requires an account
     # on the PLC server with full administrator access.
     #
     # The Url parameter controls whether the connection uses PLCAPI directly (i.e.
-    # Geniwrapper is located on the same machine as PLC), or uses a XMLRPC connection
+    # SFA is located on the same machine as PLC), or uses a XMLRPC connection
     # to the PLC machine. If you wish to use the API directly, then remove the Url
     # field from the dictionary. 
 
     # to the PLC machine. If you wish to use the API directly, then remove the Url
     # field from the dictionary. 
 
index b8dee9e..ca375a1 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# GeniAPI XML-RPC faults
+# SFA API faults
 #
 #
 
 #
 #
 
@@ -8,20 +8,20 @@
 
 import xmlrpclib
 
 
 import xmlrpclib
 
-class GeniFault(xmlrpclib.Fault):
+class SfaFault(xmlrpclib.Fault):
     def __init__(self, faultCode, faultString, extra = None):
         if extra:
             faultString += ": " + extra
         xmlrpclib.Fault.__init__(self, faultCode, faultString)
 
     def __init__(self, faultCode, faultString, extra = None):
         if extra:
             faultString += ": " + extra
         xmlrpclib.Fault.__init__(self, faultCode, faultString)
 
-class GeniInvalidAPIMethod(GeniFault):
+class SfaInvalidAPIMethod(SfaFault):
     def __init__(self, method, interface = None, extra = None):
         faultString = "Invalid method " + method
         if interface:
             faultString += " for interface " + interface
     def __init__(self, method, interface = None, extra = None):
         faultString = "Invalid method " + method
         if interface:
             faultString += " for interface " + interface
-        GeniFault.__init__(self, 100, faultString, extra)
+        SfaFault.__init__(self, 100, faultString, extra)
 
 
-class GeniInvalidArgumentCount(GeniFault):
+class SfaInvalidArgumentCount(SfaFault):
     def __init__(self, got, min, max = min, extra = None):
         if min != max:
             expected = "%d-%d" % (min, max)
     def __init__(self, got, min, max = min, extra = None):
         if min != max:
             expected = "%d-%d" % (min, max)
@@ -29,208 +29,208 @@ class GeniInvalidArgumentCount(GeniFault):
             expected = "%d" % min
         faultString = "Expected %s arguments, got %d" % \
                       (expected, got)
             expected = "%d" % min
         faultString = "Expected %s arguments, got %d" % \
                       (expected, got)
-        GeniFault.__init__(self, 101, faultString, extra)
+        SfaFault.__init__(self, 101, faultString, extra)
 
 
-class GeniInvalidArgument(GeniFault):
+class SfaInvalidArgument(SfaFault):
     def __init__(self, extra = None, name = None):
         if name is not None:
             faultString = "Invalid %s value" % name
         else:
             faultString = "Invalid argument"
     def __init__(self, extra = None, name = None):
         if name is not None:
             faultString = "Invalid %s value" % name
         else:
             faultString = "Invalid argument"
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
 
 
-class GeniAuthenticationFailure(GeniFault):
+class SfaAuthenticationFailure(SfaFault):
     def __init__(self, extra = None):
         faultString = "Failed to authenticate call"
     def __init__(self, extra = None):
         faultString = "Failed to authenticate call"
-        GeniFault.__init__(self, 103, faultString, extra)
+        SfaFault.__init__(self, 103, faultString, extra)
 
 
-class GeniDBError(GeniFault):
+class SfaDBError(SfaFault):
     def __init__(self, extra = None):
         faultString = "Database error"
     def __init__(self, extra = None):
         faultString = "Database error"
-        GeniFault.__init__(self, 106, faultString, extra)
+        SfaFault.__init__(self, 106, faultString, extra)
 
 
-class GeniPermissionDenied(GeniFault):
+class SfaPermissionDenied(SfaFault):
     def __init__(self, extra = None):
         faultString = "Permission denied"
     def __init__(self, extra = None):
         faultString = "Permission denied"
-        GeniFault.__init__(self, 108, faultString, extra)
+        SfaFault.__init__(self, 108, faultString, extra)
 
 
-class GeniNotImplemented(GeniFault):
+class SfaNotImplemented(SfaFault):
     def __init__(self, extra = None):
         faultString = "Not fully implemented"
     def __init__(self, extra = None):
         faultString = "Not fully implemented"
-        GeniFault.__init__(self, 109, faultString, extra)
+        SfaFault.__init__(self, 109, faultString, extra)
 
 
-class GeniAPIError(GeniFault):
+class SfaAPIError(SfaFault):
     def __init__(self, extra = None):
         faultString = "Internal API error"
     def __init__(self, extra = None):
         faultString = "Internal API error"
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
 
 
-class MalformedHrnException(GeniFault):
+class MalformedHrnException(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Malformed HRN: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Malformed HRN: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class TreeException(GeniFault):
+class TreeException(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Tree Exception: %(value)s, " % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Tree Exception: %(value)s, " % locals()
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class NonexistingRecord(GeniFault):
+class NonexistingRecord(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Non exsiting record %(value)s, " % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Non exsiting record %(value)s, " % locals()
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class ExistingRecord(GeniFault):
+class ExistingRecord(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Existing record: %(value)s, " % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Existing record: %(value)s, " % locals()
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
     def __str__(self):
         return repr(self.value)
         
     def __str__(self):
         return repr(self.value)
         
-class NonexistingCredType(GeniFault):
+class NonexistingCredType(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Non existing record: %(value)s, " % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Non existing record: %(value)s, " % locals()
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class NonexistingFile(GeniFault):
+class NonexistingFile(SfaFault):
     def __init__(self, value):
         self.value = value
         faultString = "Non existing file: %(value)s, " % locals()
     def __init__(self, value):
         self.value = value
         faultString = "Non existing file: %(value)s, " % locals()
-        GeniFault.__init__(self, 111, faultString, extra)
+        SfaFault.__init__(self, 111, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class InvalidRPCParams(GeniFault):
+class InvalidRPCParams(SfaFault):
     def __init__(self, value):
         self.value = value
         faultString = "Invalid RPC Params: %(value)s, " % locals()
     def __init__(self, value):
         self.value = value
         faultString = "Invalid RPC Params: %(value)s, " % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
 # SMBAKER exceptions follow
 
     def __str__(self):
         return repr(self.value)
 
 # SMBAKER exceptions follow
 
-class ConnectionKeyGIDMismatch(GeniFault):
+class ConnectionKeyGIDMismatch(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Connection Key GID mismatch: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Connection Key GID mismatch: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra) 
+        SfaFault.__init__(self, 102, faultString, extra) 
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class MissingCallerGID(GeniFault):
+class MissingCallerGID(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing Caller GID: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing Caller GID: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra) 
+        SfaFault.__init__(self, 102, faultString, extra) 
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class RecordNotFound(GeniFault):
+class RecordNotFound(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Record not found: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Record not found: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     #def __str__(self):
     #    return repr(self.value)
 
     #def __str__(self):
     #    return repr(self.value)
 
-class UnknownGeniType(GeniFault):
+class UnknownSfaType(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
     def __init__(self, value, extra = None):
         self.value = value
-        faultString = "Unknown Geni Type: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        faultString = "Unknown SFA Type: %(value)s" % locals()
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class MissingAuthority(GeniFault):
+class MissingAuthority(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing authority: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing authority: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class PlanetLabRecordDoesNotExist(GeniFault):
+class PlanetLabRecordDoesNotExist(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "PlanetLab record does not exist : %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "PlanetLab record does not exist : %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class PermissionError(GeniFault):
+class PermissionError(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Permission error: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Permission error: %(value)s" % locals()
-        GeniFault.__init__(self, 108, faultString, extra)
+        SfaFault.__init__(self, 108, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class InsufficientRights(GeniFault):
+class InsufficientRights(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Insufficient rights: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Insufficient rights: %(value)s" % locals()
-        GeniFault.__init__(self, 108, faultString, extra)
+        SfaFault.__init__(self, 108, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class MissingDelegateBit(GeniFault):
+class MissingDelegateBit(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing delegate bit: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Missing delegate bit: %(value)s" % locals()
-        GeniFault.__init__(self, 108, faultString, extra)
+        SfaFault.__init__(self, 108, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class ChildRightsNotSubsetOfParent(GeniFault):
+class ChildRightsNotSubsetOfParent(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Child rights not subset of parent: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Child rights not subset of parent: %(value)s" % locals()
-        GeniFault.__init__(self, 103, faultString, extra)
+        SfaFault.__init__(self, 103, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class CertMissingParent(GeniFault):
+class CertMissingParent(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Cert missing parent: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Cert missing parent: %(value)s" % locals()
-        GeniFault.__init__(self, 103, faultString, extra)
+        SfaFault.__init__(self, 103, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class CertNotSignedByParent(GeniFault):
+class CertNotSignedByParent(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Cert not signed by parent: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Cert not signed by parent: %(value)s" % locals()
-        GeniFault.__init__(self, 103, faultString, extra)
+        SfaFault.__init__(self, 103, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class GidInvalidParentHrn(GeniFault):
+class GidInvalidParentHrn(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "GID invalid parent hrn: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "GID invalid parent hrn: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
-class SliverDoesNotExist(GeniFault):
+class SliverDoesNotExist(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Sliver does not exist : %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Sliver does not exist : %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra)
+        SfaFault.__init__(self, 102, faultString, extra)
     def __str__(self):
         return repr(self.value)
 
     def __str__(self):
         return repr(self.value)
 
@@ -239,10 +239,19 @@ class BadRequestHash(xmlrpclib.Fault):
         faultString = "bad request hash: " + str(hash)
         xmlrpclib.Fault.__init__(self, 902, faultString)
 
         faultString = "bad request hash: " + str(hash)
         xmlrpclib.Fault.__init__(self, 902, faultString)
 
-class MissingTrustedRoots(GeniFault):
+class MissingTrustedRoots(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Trusted root directory does not exist: %(value)s" % locals()
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Trusted root directory does not exist: %(value)s" % locals()
-        GeniFault.__init__(self, 102, faultString, extra) 
+        SfaFault.__init__(self, 102, faultString, extra) 
     def __str__(self):
         return repr(self.value)
     def __str__(self):
         return repr(self.value)
+
+class MissingSfaInfo(SfaFault):
+    def __init__(self, value, extra = None):
+        self.value = value
+        faultString = "Missing information: %(value)s" % locals()
+        SfaFault.__init__(self, 102, faultString, extra) 
+    def __str__(self):
+        return repr(self.value)
+
index 5ab1664..bc22f1b 100644 (file)
@@ -1,5 +1,5 @@
-# $Id: Filter.py 14587 2009-07-19 13:18:50Z thierry $
-# $URL: svn+ssh://svn.planet-lab.org/svn/PLCAPI/trunk/PLC/Filter.py $
+# $Id$
+# $URL$
 from types import StringTypes
 try:
     set
 from types import StringTypes
 try:
     set
@@ -136,7 +136,7 @@ class Filter(Parameter, dict):
             # filter on fields
             if not modifiers['-']:
                 if field not in self.fields:
             # filter on fields
             if not modifiers['-']:
                 if field not in self.fields:
-                    raise GeniInvalidArgument, "Invalid filter field '%s'" % field
+                    raise SfaInvalidArgument, "Invalid filter field '%s'" % field
 
                 if isinstance(value, (list, tuple, set)):
                     # handling filters like '~slice_id':[]
 
                 if isinstance(value, (list, tuple, set)):
                     # handling filters like '~slice_id':[]
@@ -186,7 +186,7 @@ class Filter(Parameter, dict):
             # sorting and clipping
             else:
                 if field not in ('SORT','OFFSET','LIMIT'):
             # sorting and clipping
             else:
                 if field not in ('SORT','OFFSET','LIMIT'):
-                    raise GeniInvalidArgument, "Invalid filter, unknown sort and clip field %r"%field
+                    raise SfaInvalidArgument, "Invalid filter, unknown sort and clip field %r"%field
                 # sorting
                 if field == 'SORT':
                     if not isinstance(value,(list,tuple,set)):
                 # sorting
                 if field == 'SORT':
                     if not isinstance(value,(list,tuple,set)):
@@ -199,7 +199,7 @@ class Filter(Parameter, dict):
                             field = field[1:]
                             order = 'DESC'
                         if field not in self.fields:
                             field = field[1:]
                             order = 'DESC'
                         if field not in self.fields:
-                            raise GeniInvalidArgument, "Invalid field %r in SORT filter"%field
+                            raise SfaInvalidArgument, "Invalid field %r in SORT filter"%field
                         sorts.append("%s %s"%(field,order))
                 # clipping
                 elif field == 'OFFSET':
                         sorts.append("%s %s"%(field,order))
                 # clipping
                 elif field == 'OFFSET':
index f24dee5..1df1245 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Base class for all GeniAPI functions
+# Base class for all SfaAPI functions
 #
 #
 
 #
 #
 
@@ -22,7 +22,7 @@ from sfa.util.debug import profile, log
 # we inherit object because we use new-style classes for legacy methods
 class Method (object):
     """
 # we inherit object because we use new-style classes for legacy methods
 class Method (object):
     """
-    Base class for all GeniAPI functions. At a minimum, all GeniAPI
+    Base class for all SfaAPI functions. At a minimum, all SfaAPI
     functions must define:
 
     interfaces = [allowed interfaces]
     functions must define:
 
     interfaces = [allowed interfaces]
@@ -47,7 +47,7 @@ class Method (object):
 
     def call(self, *args):
         """
 
     def call(self, *args):
         """
-        Method body for all GeniAPI functions. Must override.
+        Method body for all SfaAPI functions. Must override.
 
         """
 
 
         """
 
@@ -66,7 +66,7 @@ class Method (object):
        
     def __call__(self, *args, **kwds):
         """
        
     def __call__(self, *args, **kwds):
         """
-        Main entry point for all GeniAPI functions. Type checks
+        Main entry point for all SfaAPI functions. Type checks
         arguments, authenticates, and executes call().
         """
 
         arguments, authenticates, and executes call().
         """
 
@@ -74,7 +74,7 @@ class Method (object):
             start = time.time()
             methodname = self.name
             if not self.api.interface or self.api.interface not in self.interfaces:
             start = time.time()
             methodname = self.name
             if not self.api.interface or self.api.interface not in self.interfaces:
-                raise GeniInvalidAPIMethod, methodname, self.api.interface 
+                raise SfaInvalidAPIMethod, methodname, self.api.interface 
 
             # legacy code cannot be type-checked, due to the way Method.args() works
             if not hasattr(self,"skip_typecheck"):
 
             # legacy code cannot be type-checked, due to the way Method.args() works
             if not hasattr(self,"skip_typecheck"):
@@ -82,7 +82,7 @@ class Method (object):
                                
                 # Check that the right number of arguments were passed in
                 if len(args) < len(min_args) or len(args) > len(max_args):
                                
                 # Check that the right number of arguments were passed in
                 if len(args) < len(min_args) or len(args) > len(max_args):
-                    raise GeniInvalidArgumentCount(len(args), len(min_args), len(max_args))
+                    raise SfaInvalidArgumentCount(len(args), len(min_args), len(max_args))
 
                 for name, value, expected in zip(max_args, args, self.accepts):
                     self.type_check(name, value, expected, args)
 
                 for name, value, expected in zip(max_args, args, self.accepts):
                     self.type_check(name, value, expected, args)
@@ -97,7 +97,7 @@ class Method (object):
 
             return result
 
 
             return result
 
-        except GeniFault, fault:
+        except SfaFault, fault:
 
             caller = ""
 
 
             caller = ""
 
@@ -218,7 +218,7 @@ class Method (object):
                 try:
                     self.type_check(name, value, item, args)
                     return
                 try:
                     self.type_check(name, value, item, args)
                     return
-                except GeniInvalidArgument, fault:
+                except SfaInvalidArgument, fault:
                     pass
             raise fault
 
                     pass
             raise fault
 
@@ -257,7 +257,7 @@ class Method (object):
             pass
 
         elif not isinstance(value, expected_type):
             pass
 
         elif not isinstance(value, expected_type):
-            raise GeniInvalidArgument("expected %s, got %s" % \
+            raise SfaInvalidArgument("expected %s, got %s" % \
                                      (xmlrpc_type(expected_type),
                                       xmlrpc_type(type(value))),
                                      name)
                                      (xmlrpc_type(expected_type),
                                       xmlrpc_type(type(value))),
                                      name)
@@ -266,20 +266,20 @@ class Method (object):
         if expected_type in StringTypes:
             if min is not None and \
                len(value.encode(self.api.encoding)) < min:
         if expected_type in StringTypes:
             if min is not None and \
                len(value.encode(self.api.encoding)) < min:
-                raise GeniInvalidArgument, "%s must be at least %d bytes long" % (name, min)
+                raise SfaInvalidArgument, "%s must be at least %d bytes long" % (name, min)
             if max is not None and \
                len(value.encode(self.api.encoding)) > max:
             if max is not None and \
                len(value.encode(self.api.encoding)) > max:
-                raise GeniInvalidArgument, "%s must be at most %d bytes long" % (name, max)
+                raise SfaInvalidArgument, "%s must be at most %d bytes long" % (name, max)
         elif expected_type in (list, tuple, set):
             if min is not None and len(value) < min:
         elif expected_type in (list, tuple, set):
             if min is not None and len(value) < min:
-                raise GeniInvalidArgument, "%s must contain at least %d items" % (name, min)
+                raise SfaInvalidArgument, "%s must contain at least %d items" % (name, min)
             if max is not None and len(value) > max:
             if max is not None and len(value) > max:
-                raise GeniInvalidArgument, "%s must contain at most %d items" % (name, max)
+                raise SfaInvalidArgument, "%s must contain at most %d items" % (name, max)
         else:
             if min is not None and value < min:
         else:
             if min is not None and value < min:
-                raise GeniInvalidArgument, "%s must be > %s" % (name, str(min))
+                raise SfaInvalidArgument, "%s must be > %s" % (name, str(min))
             if max is not None and value > max:
             if max is not None and value > max:
-                raise GeniInvalidArgument, "%s must be < %s" % (name, str(max))
+                raise SfaInvalidArgument, "%s must be < %s" % (name, str(max))
 
         # If a list with particular types of items is expected
         if isinstance(expected, (list, tuple, set)):
 
         # If a list with particular types of items is expected
         if isinstance(expected, (list, tuple, set)):
@@ -300,7 +300,7 @@ class Method (object):
                 if isinstance(subparam, Parameter) and \
                    subparam.optional is not None and \
                    not subparam.optional and key not in value.keys():
                 if isinstance(subparam, Parameter) and \
                    subparam.optional is not None and \
                    not subparam.optional and key not in value.keys():
-                    raise GeniInvalidArgument("'%s' not specified" % key, name)
+                    raise SfaInvalidArgument("'%s' not specified" % key, name)
 
         #if auth is not None:
         #    auth.check(self, *args)
 
         #if auth is not None:
         #    auth.check(self, *args)
index e46d8de..ca8dbba 100644 (file)
@@ -28,8 +28,8 @@ def hostname_to_hrn(auth_hrn, login_base, hostname):
     """
     Convert hrn to plantelab name.
     """
     """
     Convert hrn to plantelab name.
     """
-    genihostname = ".".join([auth_hrn, login_base, hostname.split(".")[0]])
-    return genihostname
+    sfa_hostname = ".".join([auth_hrn, login_base, hostname.split(".")[0]])
+    return sfa_hostname
 
 def slicename_to_hrn(auth_hrn, slicename):
     """
 
 def slicename_to_hrn(auth_hrn, slicename):
     """
index 86af66f..61b05b9 100644 (file)
@@ -1,5 +1,5 @@
-### $Id: namespace.py 15020 2009-09-14 23:11:37Z tmack $
-### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/util/namespace.py $
+### $Id$
+### $URL$
 
 from sfa.util.faults import *
 
 
 from sfa.util.faults import *
 
@@ -30,8 +30,8 @@ def hostname_to_hrn(auth_hrn, login_base, hostname):
     """
     Convert hrn to plantelab name.
     """
     """
     Convert hrn to plantelab name.
     """
-    genihostname = ".".join([auth_hrn, login_base, hostname.split(".")[0]])
-    return genihostname
+    sfa_hostname = ".".join([auth_hrn, login_base, hostname.split(".")[0]])
+    return sfa_hostname
 
 def slicename_to_hrn(auth_hrn, slicename):
     """
 
 def slicename_to_hrn(auth_hrn, slicename):
     """
index ebf8408..be07cf8 100644 (file)
@@ -12,6 +12,7 @@ class NodeManager:
     
     def __call__(self, *args):
         method = self.method
     
     def __call__(self, *args):
         method = self.method
+        ### WARNING -- hardwired name needs to be computed 
         sfa_slice = "pl_genicw"
         python = "/usr/bin/python"
         vserver_path = "/vservers/%s" % (sfa_slice)
         sfa_slice = "pl_genicw"
         python = "/usr/bin/python"
         vserver_path = "/vservers/%s" % (sfa_slice)
index fb45bd1..00d9319 100644 (file)
@@ -105,4 +105,4 @@ def xmlrpc_type(arg):
         # documentation purposes.
         return "mixed"
     else:
         # documentation purposes.
         return "mixed"
     else:
-        raise GeniAPIError, "XML-RPC cannot marshal %s objects" % arg_type
+        raise SfaAPIError, "XML-RPC cannot marshal %s objects" % arg_type
index de221fc..aad12ca 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# Implements support for geni records
+# Implements support for SFA records
 #
 # TODO: Use existing PLC database methods? or keep this separate?
 ##
 #
 # TODO: Use existing PLC database methods? or keep this separate?
 ##
@@ -17,9 +17,9 @@ from sfa.util.parameter import *
 from sfa.util.namespace import *
 from sfa.util.row import Row
 
 from sfa.util.namespace import *
 from sfa.util.row import Row
 
-class GeniRecord(Row):
+class SfaRecord(Row):
     """ 
     """ 
-    The GeniRecord class implements a Geni Record. A GeniRecord is a tuple
+    The SfaRecord class implements an SFA Record. A SfaRecord is a tuple
     (Hrn, GID, Type, Info).
  
     Hrn specifies the Human Readable Name of the object
     (Hrn, GID, Type, Info).
  
     Hrn specifies the Human Readable Name of the object
@@ -58,7 +58,7 @@ class GeniRecord(Row):
     }
     all_fields = dict(fields.items() + internal_fields.items())
     ##
     }
     all_fields = dict(fields.items() + internal_fields.items())
     ##
-    # Create a Geni Record
+    # Create an SFA Record
     #
     # @param name if !=None, assign the name of the record
     # @param gid if !=None, assign the gid of the record
     #
     # @param name if !=None, assign the name of the record
     # @param gid if !=None, assign the gid of the record
@@ -309,8 +309,8 @@ class GeniRecord(Row):
         record = RecordSpec()
         record.parseString(str)
         record_dict = record.toDict()
         record = RecordSpec()
         record.parseString(str)
         record_dict = record.toDict()
-        geni_dict = record_dict['record']
-        self.load_from_dict(geni_dict)
+        sfa_dict = record_dict['record']
+        self.load_from_dict(sfa_dict)
 
     ##
     # Dump the record to stdout
 
     ##
     # Dump the record to stdout
@@ -331,7 +331,7 @@ class GeniRecord(Row):
         #    self.get_gid_object().dump(8, dump_parents)
         #print "    pointer:", self.pointer
        
         #    self.get_gid_object().dump(8, dump_parents)
         #print "    pointer:", self.pointer
        
-        order = GeniRecord.fields.keys() 
+        order = SfaRecord.fields.keys() 
         for key in self.keys():
             if key not in order:
                 order.append(key)
         for key in self.keys():
             if key not in order:
                 order.append(key)
@@ -348,7 +348,7 @@ class GeniRecord(Row):
         return dict(self)
     
 
         return dict(self)
     
 
-class UserRecord(GeniRecord):
+class UserRecord(SfaRecord):
 
     fields = {
         'email': Parameter(str, 'email'),
 
     fields = {
         'email': Parameter(str, 'email'),
@@ -358,9 +358,9 @@ class UserRecord(GeniRecord):
         'key': Parameter(str, 'Public key'),
         'slices': Parameter([str], 'List of slices this user belongs to'),
         }
         'key': Parameter(str, 'Public key'),
         'slices': Parameter([str], 'List of slices this user belongs to'),
         }
-    fields.update(GeniRecord.fields)
+    fields.update(SfaRecord.fields)
     
     
-class SliceRecord(GeniRecord):
+class SliceRecord(SfaRecord):
     fields = {
         'name': Parameter(str, 'Slice name'),
         'url': Parameter(str, 'Slice url'),
     fields = {
         'name': Parameter(str, 'Slice name'),
         'url': Parameter(str, 'Slice url'),
@@ -368,10 +368,10 @@ class SliceRecord(GeniRecord):
         'researcher': Parameter([str], 'List of users for this slice'),
         'description': Parameter([str], 'Description of this slice'), 
         }
         'researcher': Parameter([str], 'List of users for this slice'),
         'description': Parameter([str], 'Description of this slice'), 
         }
-    fields.update(GeniRecord.fields)
+    fields.update(SfaRecord.fields)
 
  
 
  
-class NodeRecord(GeniRecord):
+class NodeRecord(SfaRecord):
     fields = {
         'hostname': Parameter(str, 'This nodes dns name'),
         'node_type': Parameter(str, 'Type of node this is'),
     fields = {
         'hostname': Parameter(str, 'This nodes dns name'),
         'node_type': Parameter(str, 'Type of node this is'),
@@ -379,10 +379,10 @@ class NodeRecord(GeniRecord):
         'latitude': Parameter(str, 'latitude'),
         'longitude': Parameter(str, 'longitude'),
         }
         'latitude': Parameter(str, 'latitude'),
         'longitude': Parameter(str, 'longitude'),
         }
-    fields.update(GeniRecord.fields)
+    fields.update(SfaRecord.fields)
 
 
 
 
-class AuthorityRecord(GeniRecord):
+class AuthorityRecord(SfaRecord):
     fields =  {
         'name': Parameter(str, 'Name'),
         'login_base': Parameter(str, 'login base'),
     fields =  {
         'name': Parameter(str, 'Name'),
         'login_base': Parameter(str, 'login base'),
@@ -393,6 +393,6 @@ class AuthorityRecord(GeniRecord):
         'researcher': Parameter([str], 'List of researchers'),
         'PI': Parameter([str], 'List of Principal Investigators'),
         }
         'researcher': Parameter([str], 'List of researchers'),
         'PI': Parameter([str], 'List of Principal Investigators'),
         }
-    fields.update(GeniRecord.fields)
+    fields.update(SfaRecord.fields)
     
 
     
 
index f4db141..7334fcc 100644 (file)
@@ -25,7 +25,7 @@ class Row(dict):
         #mandatory_fields = self.db.fields(self.table_name, notnull = True, hasdef = False)
         #for field in mandatory_fields:
         #    if not self.has_key(field) or self[field] is None:
         #mandatory_fields = self.db.fields(self.table_name, notnull = True, hasdef = False)
         #for field in mandatory_fields:
         #    if not self.has_key(field) or self[field] is None:
-        #        raise GeniInvalidArgument, field + " must be specified and cannot be unset in class %s"%self.__class__.__name__
+        #        raise SfaInvalidArgument, field + " must be specified and cannot be unset in class %s"%self.__class__.__name__
 
         # Validate values before committing
         for key, value in self.iteritems():
 
         # Validate values before committing
         for key, value in self.iteritems():
@@ -52,6 +52,6 @@ class Row(dict):
         human = time.strftime(time_format, time.gmtime(timestamp))
 
         if check_future and timestamp < time.time():
         human = time.strftime(time_format, time.gmtime(timestamp))
 
         if check_future and timestamp < time.time():
-            raise GeniInvalidArgument, "'%s' not in the future" % human
+            raise SfaInvalidArgument, "'%s' not in the future" % human
 
         return human
 
         return human
similarity index 95%
rename from sfa/util/geniserver.py
rename to sfa/util/server.py
index 8944f54..757d945 100644 (file)
@@ -25,7 +25,7 @@ from sfa.trust.certificate import Keypair, Certificate
 from sfa.trust.credential import *
 
 from sfa.util.faults import *
 from sfa.trust.credential import *
 
 from sfa.util.faults import *
-from sfa.plc.api import GeniAPI 
+from sfa.plc.api import SfaAPI 
 from sfa.util.debug import log
 
 ##
 from sfa.util.debug import log
 
 ##
@@ -146,10 +146,10 @@ class SecureXMLRpcRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
         It was copied out from SimpleXMLRPCServer.py and modified to shutdown the socket cleanly.
         """
         try:
         It was copied out from SimpleXMLRPCServer.py and modified to shutdown the socket cleanly.
         """
         try:
-            self.api = GeniAPI(peer_cert = self.server.peer_cert, 
-                           interface = self.server.interface, 
-                           key_file = self.server.key_file, 
-                           cert_file = self.server.cert_file)
+            self.api = SfaAPI(peer_cert = self.server.peer_cert, 
+                              interface = self.server.interface, 
+                              key_file = self.server.key_file, 
+                              cert_file = self.server.cert_file)
             # get arguments
             request = self.rfile.read(int(self.headers["content-length"]))
             # In previous versions of SimpleXMLRPCServer, _dispatch
             # get arguments
             request = self.rfile.read(int(self.headers["content-length"]))
             # In previous versions of SimpleXMLRPCServer, _dispatch
@@ -182,16 +182,16 @@ class SecureXMLRpcRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
             self.connection.shutdown() # Modified here!
 
 ##
             self.connection.shutdown() # Modified here!
 
 ##
-# Implements an HTTPS XML-RPC server. Generally it is expected that GENI
+# Implements an HTTPS XML-RPC server. Generally it is expected that SFA
 # functions will take a credential string, which is passed to
 # decode_authentication. Decode_authentication() will verify the validity of
 # the credential, and verify that the user is using the key that matches the
 # GID supplied in the credential.
 
 # functions will take a credential string, which is passed to
 # decode_authentication. Decode_authentication() will verify the validity of
 # the credential, and verify that the user is using the key that matches the
 # GID supplied in the credential.
 
-class GeniServer(threading.Thread):
+class SfaServer(threading.Thread):
 
     ##
 
     ##
-    # Create a new GeniServer object.
+    # Create a new SfaServer object.
     #
     # @param ip the ip address to listen on
     # @param port the port to listen on
     #
     # @param ip the ip address to listen on
     # @param port the port to listen on
index 856b19c..8d9b3d1 100644 (file)
@@ -1,4 +1,4 @@
-# SOAP-specific code for GeniClient
+# SOAP-specific code for SFA Client
 
 import pdb
 from ZSI.client import Binding
 
 import pdb
 from ZSI.client import Binding
similarity index 87%
rename from sfa/util/genitable.py
rename to sfa/util/table.py
index bf436bc..c1bfdfb 100644 (file)
@@ -1,15 +1,14 @@
-# genitable.py
+### $Id$
+### $URL$
 #
 #
-# implements support for geni records stored in db tables
+# implements support for SFA records stored in db tables
 #
 # TODO: Use existing PLC database methods? or keep this separate?
 
 #
 # TODO: Use existing PLC database methods? or keep this separate?
 
-### $Id$
-### $URL$
-
 import report
 import report
-import  pgdb
+import pgdb
 from pg import DB, ProgrammingError
 from pg import DB, ProgrammingError
+
 from sfa.util.PostgreSQL import *
 from sfa.trust.gid import *
 from sfa.util.record import *
 from sfa.util.PostgreSQL import *
 from sfa.trust.gid import *
 from sfa.util.record import *
@@ -17,14 +16,14 @@ from sfa.util.debug import *
 from sfa.util.config import *
 from sfa.util.filter import *
 
 from sfa.util.config import *
 from sfa.util.filter import *
 
-class GeniTable(list):
+class SfaTable(list):
 
 
-    GENI_TABLE_PREFIX = "sfa"
+    SFA_TABLE_PREFIX = "sfa"
 
     def __init__(self, record_filter = None):
 
         # pgsql doesn't like table names with "." in them, to replace it with "$"
 
     def __init__(self, record_filter = None):
 
         # pgsql doesn't like table names with "." in them, to replace it with "$"
-        self.tablename = GeniTable.GENI_TABLE_PREFIX
+        self.tablename = SfaTable.SFA_TABLE_PREFIX
         self.config = Config()
         self.db = PostgreSQL(self.config)
         # establish a connection to the pgsql server
         self.config = Config()
         self.db = PostgreSQL(self.config)
         # establish a connection to the pgsql server
@@ -46,10 +45,10 @@ class GeniTable(list):
 
     def db_fields(self, obj=None):
         
 
     def db_fields(self, obj=None):
         
-        db_fields = self.db.fields(self.GENI_TABLE_PREFIX)
+        db_fields = self.db.fields(self.SFA_TABLE_PREFIX)
         return dict( [ (key,value) for (key, value) in obj.items() \
                         if key in db_fields and
         return dict( [ (key,value) for (key, value) in obj.items() \
                         if key in db_fields and
-                        self.is_writable(key, value, GeniRecord.fields)] )      
+                        self.is_writable(key, value, SfaRecord.fields)] )      
 
     @staticmethod
     def is_writable (key,value,dict):
 
     @staticmethod
     def is_writable (key,value,dict):
@@ -157,16 +156,16 @@ class GeniTable(list):
         if isinstance(record_filter, (list, tuple, set)):
             ints = filter(lambda x: isinstance(x, (int, long)), record_filter)
             strs = filter(lambda x: isinstance(x, StringTypes), record_filter)
         if isinstance(record_filter, (list, tuple, set)):
             ints = filter(lambda x: isinstance(x, (int, long)), record_filter)
             strs = filter(lambda x: isinstance(x, StringTypes), record_filter)
-            record_filter = Filter(GeniRecord.all_fields, {'record_id': ints, 'hrn': strs})
+            record_filter = Filter(SfaRecord.all_fields, {'record_id': ints, 'hrn': strs})
             sql += "AND (%s) %s " % record_filter.sql("OR") 
         elif isinstance(record_filter, dict):
             sql += "AND (%s) %s " % record_filter.sql("OR") 
         elif isinstance(record_filter, dict):
-            record_filter = Filter(GeniRecord.all_fields, record_filter)        
+            record_filter = Filter(SfaRecord.all_fields, record_filter)        
             sql += " AND (%s) %s" % record_filter.sql("AND")
         elif isinstance(record_filter, StringTypes):
             sql += " AND (%s) %s" % record_filter.sql("AND")
         elif isinstance(record_filter, StringTypes):
-            record_filter = Filter(GeniRecord.all_fields, {'hrn':[record_filter]})    
+            record_filter = Filter(SfaRecord.all_fields, {'hrn':[record_filter]})    
             sql += " AND (%s) %s" % record_filter.sql("AND")
         elif isinstance(record_filter, int):
             sql += " AND (%s) %s" % record_filter.sql("AND")
         elif isinstance(record_filter, int):
-            record_filter = Filter(GeniRecord.all_fields, {'record_id':[record_filter]})    
+            record_filter = Filter(SfaRecord.all_fields, {'record_id':[record_filter]})    
             sql += " AND (%s) %s" % record_filter.sql("AND")
 
         results = self.cnx.query(sql).dictresult()
             sql += " AND (%s) %s" % record_filter.sql("AND")
 
         results = self.cnx.query(sql).dictresult()
@@ -188,7 +187,7 @@ class GeniTable(list):
             elif result['type'] in ['user']:
                 result_rec_list.append(UserRecord(dict=result))
             else:
             elif result['type'] in ['user']:
                 result_rec_list.append(UserRecord(dict=result))
             else:
-                result_rec_list.append(GeniRecord(dict=result))
+                result_rec_list.append(SfaRecord(dict=result))
         return result_rec_list
 
 
         return result_rec_list
 
 
@@ -202,14 +201,14 @@ class GeniTable(list):
                 pass
     
     @staticmethod
                 pass
     
     @staticmethod
-    def geni_records_purge(cninfo):
+    def sfa_records_purge(cninfo):
 
         cnx = DB(cninfo['dbname'], cninfo['address'], 
                  port=cninfo['port'], user=cninfo['user'], passwd=cninfo['password'])
         tableList = cnx.get_tables()
         for table in tableList:
 
         cnx = DB(cninfo['dbname'], cninfo['address'], 
                  port=cninfo['port'], user=cninfo['user'], passwd=cninfo['password'])
         tableList = cnx.get_tables()
         for table in tableList:
-            if table.startswith(GeniTable.GENI_TABLE_PREFIX) or \
-                    table.startswith('public.' + GeniTable.GENI_TABLE_PREFIX) or \
-                    table.startswith('public."' + GeniTable.GENI_TABLE_PREFIX):
+            if table.startswith(SfaTable.SFA_TABLE_PREFIX) or \
+                    table.startswith('public.' + SfaTable.SFA_TABLE_PREFIX) or \
+                    table.startswith('public."' + SfaTable.SFA_TABLE_PREFIX):
                 report.trace("dropping table " + table)
                 cnx.query("DROP TABLE " + table)
                 report.trace("dropping table " + table)
                 cnx.query("DROP TABLE " + table)
index 58b19e2..be44f08 100644 (file)
@@ -1,4 +1,4 @@
-# XMLRPC-specific code for GeniClient
+# XMLRPC-specific code for SFA Client
 
 import xmlrpclib
 
 
 import xmlrpclib
 
index 7aa2163..bcb86cc 100644 (file)
@@ -18,13 +18,13 @@ from sfa.util.faults import *
 from sfa.util.misc import *
 from sfa.util.record import *
 from sfa.util.sfaticket import SfaTicket
 from sfa.util.misc import *
 from sfa.util.record import *
 from sfa.util.sfaticket import SfaTicket
-from sfa.util.geniserver import *
+from sfa.util.server import *
 
 ##
 
 ##
-# ComponentManager is a GeniServer that serves slice and
+# ComponentManager is a SfaServer that serves slice and
 # management operations at a node.
 
 # management operations at a node.
 
-class ComponentManager(GeniServer):
+class ComponentManager(SfaServer):
 
     ##
     # Create a new ComponentManager object.
 
     ##
     # Create a new ComponentManager object.
@@ -35,14 +35,14 @@ class ComponentManager(GeniServer):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
-        GeniServer.__init__(self, ip, port, key_file, cert_file)
+        SfaServer.__init__(self, ip, port, key_file, cert_file)
         self.nodemanager = ServerProxy('http://127.0.0.1:812/')
 
     ##
     # Register the server RPCs for the component
 
     def register_functions(self):
         self.nodemanager = ServerProxy('http://127.0.0.1:812/')
 
     ##
     # Register the server RPCs for the component
 
     def register_functions(self):
-        GeniServer.register_functions(self)
+        SfaServer.register_functions(self)
         self.server.register_function(self.stop_slice)
         self.server.register_function(self.start_slice)
         self.server.register_function(self.reset_slice)
         self.server.register_function(self.stop_slice)
         self.server.register_function(self.start_slice)
         self.server.register_function(self.reset_slice)
@@ -119,7 +119,7 @@ class ComponentManager(GeniServer):
     # signed and verified correctly. Throw an exception if something is
     # wrong with the ticket.
     #
     # signed and verified correctly. Throw an exception if something is
     # wrong with the ticket.
     #
-    # This is similar to geniserver.decode_authentication
+    # This is similar to decode_authentication
     #
     # @param ticket_string the string representation of the ticket
 
     #
     # @param ticket_string the string representation of the ticket
 
@@ -165,7 +165,7 @@ class ComponentManager(GeniServer):
         else:
             data["initscripts"] = {}
 
         else:
             data["initscripts"] = {}
 
-        # copy the rspec attributes from the geniticket into the plticket
+        # copy the rspec attributes from the sfaticket into the plticket
         # attributes. The NM will later copy them back out and put them into
         # the rspec field of the slice record
         for itemname in ticket_rspec.keys():
         # attributes. The NM will later copy them back out and put them into
         # the rspec field of the slice record
         for itemname in ticket_rspec.keys():
index 77bea0f..aacc266 100755 (executable)
@@ -3,6 +3,6 @@
 source component_slice_config.sh
 
 echo connecting to node: $1
 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/sfaticket.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/server.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
 echo $FILES
 scp -i $KEY_FILE -r $FILES $USER@$1:$DEST_DIR
index 351853f..7d581b4 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Geniwrapper XML-RPC and SOAP interfaces
+# SFA XML-RPC and SOAP interfaces
 #
 ### $Id: api.py 15596 2009-10-31 21:42:05Z anil $
 ### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $
 #
 ### $Id: api.py 15596 2009-10-31 21:42:05Z anil $
 ### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $
index ab76961..34aadc9 100644 (file)
@@ -1,5 +1,5 @@
 #
 #
-# Component is a GeniServer that implements the Component interface
+# Component is a SfaServer that implements the Component interface
 #
 ### $Id: 
 ### $URL: 
 #
 ### $Id: 
 ### $URL: 
@@ -10,7 +10,7 @@ import os
 import time
 import sys
 
 import time
 import sys
 
-from sfa.util.geniserver import GeniServer
+from sfa.util.server import SfaServer
 from sfacomponent.plc.api import ComponentAPI
  
 # GeniLight client support is optional
 from sfacomponent.plc.api import ComponentAPI
  
 # GeniLight client support is optional
@@ -20,9 +20,9 @@ except ImportError:
     GeniClientLight = None            
 
 ##
     GeniClientLight = None            
 
 ##
-# Component is a GeniServer that serves component operations.
+# Component is a SfaServer that serves component operations.
 
 
-class Component(GeniServer):
+class Component(SfaServer):
     ##
     # Create a new registry object.
     #
     ##
     # Create a new registry object.
     #
@@ -32,7 +32,7 @@ class Component(GeniServer):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
     # @param cert_file certificate filename containing public key (could be a GID file)
 
     def __init__(self, ip, port, key_file, cert_file):
-        GeniServer.__init__(self, ip, port, key_file, cert_file)
+        SfaServer.__init__(self, ip, port, key_file, cert_file)
         # re-initialize the servers api as Component api  
         self.server.api = ComponentAPI(interface='component', key_file=key_file, cert_file=cert_file)  
         self.server.interface = 'component'
         # re-initialize the servers api as Component api  
         self.server.api = ComponentAPI(interface='component', key_file=key_file, cert_file=cert_file)  
         self.server.interface = 'component'
index 6564e9b..bd8c88e 100644 (file)
@@ -122,7 +122,7 @@ class Command:
                 try:
                     self.type_check(name, value, item, args)
                     return
                 try:
                     self.type_check(name, value, item, args)
                     return
-                except GeniInvalidArgument, fault:
+                except SfaInvalidArgument, fault:
                     pass
             raise fault
 
                     pass
             raise fault
 
@@ -161,7 +161,7 @@ class Command:
             pass
 
         elif not isinstance(value, expected_type):
             pass
 
         elif not isinstance(value, expected_type):
-            raise GeniInvalidArgument("expected %s, got %s" % \
+            raise SfaInvalidArgument("expected %s, got %s" % \
                                      (xmlrpc_type(expected_type),
                                       xmlrpc_type(type(value))),
                                      name)
                                      (xmlrpc_type(expected_type),
                                       xmlrpc_type(type(value))),
                                      name)
@@ -170,20 +170,20 @@ class Command:
         if expected_type in StringTypes:
             if min is not None and \
                len(value.encode(self.api.encoding)) < min:
         if expected_type in StringTypes:
             if min is not None and \
                len(value.encode(self.api.encoding)) < min:
-                raise GeniInvalidArgument, "%s must be at least %d bytes long" % (name, min)
+                raise SfaInvalidArgument, "%s must be at least %d bytes long" % (name, min)
             if max is not None and \
                len(value.encode(self.api.encoding)) > max:
             if max is not None and \
                len(value.encode(self.api.encoding)) > max:
-                raise GeniInvalidArgument, "%s must be at most %d bytes long" % (name, max)
+                raise SfaInvalidArgument, "%s must be at most %d bytes long" % (name, max)
         elif expected_type in (list, tuple, set):
             if min is not None and len(value) < min:
         elif expected_type in (list, tuple, set):
             if min is not None and len(value) < min:
-                raise GeniInvalidArgument, "%s must contain at least %d items" % (name, min)
+                raise SfaInvalidArgument, "%s must contain at least %d items" % (name, min)
             if max is not None and len(value) > max:
             if max is not None and len(value) > max:
-                raise GeniInvalidArgument, "%s must contain at most %d items" % (name, max)
+                raise SfaInvalidArgument, "%s must contain at most %d items" % (name, max)
         else:
             if min is not None and value < min:
         else:
             if min is not None and value < min:
-                raise GeniInvalidArgument, "%s must be > %s" % (name, str(min))
+                raise SfaInvalidArgument, "%s must be > %s" % (name, str(min))
             if max is not None and value > max:
             if max is not None and value > max:
-                raise GeniInvalidArgument, "%s must be < %s" % (name, str(max))
+                raise SfaInvalidArgument, "%s must be < %s" % (name, str(max))
 
         # If a list with particular types of items is expected
         if isinstance(expected, (list, tuple, set)):
 
         # If a list with particular types of items is expected
         if isinstance(expected, (list, tuple, set)):
@@ -204,7 +204,7 @@ class Command:
                 if isinstance(subparam, Parameter) and \
                    subparam.optional is not None and \
                    not subparam.optional and key not in value.keys():
                 if isinstance(subparam, Parameter) and \
                    subparam.optional is not None and \
                    not subparam.optional and key not in value.keys():
-                    raise GeniInvalidArgument("'%s' not specified" % key, name)
+                    raise SfaInvalidArgument("'%s' not specified" % key, name)
 
         #if auth is not None:
         #    auth.check(self, *args)
 
         #if auth is not None:
         #    auth.check(self, *args)
index e2bf7ef..0f9e77e 100644 (file)
@@ -1,6 +1,6 @@
 from pprint import pprint
 
 from pprint import pprint
 
-from sfa.util.geniclient import *
+from sfa.util.client import *
 from sfa.trust.credential import *
 
 cred = Credential(filename = 'tmack.pl.sa.cred')
 from sfa.trust.credential import *
 
 cred = Credential(filename = 'tmack.pl.sa.cred')
index 8370f08..081a9bf 100755 (executable)
@@ -9,7 +9,7 @@ class TestRecord(unittest.TestCase):
         pass
 
     def testCreate(self):
         pass
 
     def testCreate(self):
-        r = GeniRecord()
+        r = SfaRecord()
 
 if __name__ == "__main__":
     unittest.main()
 
 if __name__ == "__main__":
     unittest.main()