renamed persistentobjs into model
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 26 Jan 2012 14:39:21 +0000 (15:39 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 26 Jan 2012 14:39:21 +0000 (15:39 +0100)
17 files changed:
sfa/client/sfi.py
sfa/importer/sfa-import-openstack.py
sfa/importer/sfa-import-plc.py
sfa/importer/sfa-nuke-plc.py
sfa/importer/sfaImport.py
sfa/managers/registry_manager.py
sfa/managers/registry_manager_openstack.py
sfa/methods/GetSelfCredential.py
sfa/plc/pldriver.py
sfa/server/registry.py
sfa/server/sfa-ca.py
sfa/server/sfa-clean-peer-records.py
sfa/server/sfa-start.py
sfa/server/sfaapi.py
sfa/storage/alchemy.py
sfa/storage/model.py [moved from sfa/storage/persistentobjs.py with 100% similarity]
tests/testStorage.py

index ec34f45..9ddef9f 100644 (file)
@@ -28,8 +28,8 @@ from sfa.util.config import Config
 from sfa.util.version import version_core
 from sfa.util.cache import Cache
 
-from sfa.storage.persistentobjs import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
-from sfa.storage.persistentobjs import make_record
+from sfa.storage.model import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
+from sfa.storage.model import make_record
 
 from sfa.rspecs.rspec import RSpec
 from sfa.rspecs.rspec_converter import RSpecConverter
index cb4873e..78032e2 100755 (executable)
@@ -29,7 +29,7 @@ from sfa.trust.certificate import convert_public_key, Keypair
 from sfa.openstack.openstack_shell import OpenstackShell    
 
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
+from sfa.storage.model import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
 
 from sfa.importer.sfaImport import sfaImport, _cleanup_string
 
index 8a9e13d..cba4323 100755 (executable)
@@ -28,7 +28,7 @@ from sfa.trust.certificate import convert_public_key, Keypair
 from sfa.plc.plshell import PlShell    
 
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
+from sfa.storage.model import RegRecord, RegAuthority, RegUser, RegSlice, RegNode
 
 from sfa.importer.sfaImport import sfaImport, _cleanup_string
 
@@ -66,7 +66,7 @@ def _get_site_hrn(interface_hrn, site):
             hrn = ".".join([interface_hrn, "internet2", site['login_base']])
     return hrn
 
-# maybe could use a call to persistentobjs.init_tables somewhere
+# maybe could use a call to model.init_tables somewhere
 # however now import s expected to be done after service creation..
 def main():
 
index 6cf5836..83c9e4b 100755 (executable)
@@ -14,7 +14,7 @@ from optparse import OptionParser
 from sfa.util.sfalogging import logger
 
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import init_tables,drop_tables
+from sfa.storage.model import init_tables,drop_tables
 
 def main():
    usage="%prog: trash the registry DB"
index a9d6bd7..e2101fc 100644 (file)
@@ -16,7 +16,7 @@ from sfa.trust.certificate import convert_public_key, Keypair
 from sfa.trust.trustedroots import TrustedRoots
 from sfa.trust.hierarchy import Hierarchy
 from sfa.trust.gid import create_uuid
-from sfa.storage.persistentobjs import RegRecord, RegAuthority, RegUser
+from sfa.storage.model import RegRecord, RegAuthority, RegUser
 from sfa.storage.alchemy import dbsession
 
 def _un_unicode(str):
index d82ef57..79ac91c 100644 (file)
@@ -18,7 +18,7 @@ from sfa.trust.credential import Credential
 from sfa.trust.certificate import Certificate, Keypair, convert_public_key
 from sfa.trust.gid import create_uuid
 
-from sfa.storage.persistentobjs import make_record,RegRecord
+from sfa.storage.model import make_record,RegRecord
 from sfa.storage.alchemy import dbsession
 
 class RegistryManager:
index aee536f..6e210fa 100644 (file)
@@ -18,7 +18,7 @@ from sfa.trust.credential import Credential
 from sfa.trust.certificate import Certificate, Keypair, convert_public_key
 from sfa.trust.gid import create_uuid
 
-from sfa.storage.persistentobjs import make_record,RegRecord
+from sfa.storage.model import make_record,RegRecord
 from sfa.storage.alchemy import dbsession
 
 from sfa.managers.registry_manager import RegistryManager
index 4022008..073ae94 100644 (file)
@@ -57,7 +57,7 @@ class GetSelfCredential(Method):
         ### authenticate the gid
         # import here so we can load this module at build-time for sfa2wsdl
         #from sfa.storage.alchemy import dbsession
-        from sfa.storage.persistentobjs import RegRecord
+        from sfa.storage.model import RegRecord
 
         # xxx-local - the current code runs Resolve, which would forward to 
         # another registry if needed
index 78395b4..2b86f6c 100644 (file)
@@ -12,7 +12,7 @@ from sfa.util.cache import Cache
 
 # one would think the driver should not need to mess with the SFA db, but..
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import RegRecord
+from sfa.storage.model import RegRecord
 
 # used to be used in get_ticket
 #from sfa.trust.sfaticket import SfaTicket
index 5bc7af5..0919a1b 100644 (file)
@@ -22,7 +22,7 @@ class Registry(SfaServer):
         SfaServer.__init__(self, ip, port, key_file, cert_file,'registry')
         # initialize db schema
         from sfa.storage.alchemy import dbsession
-        from sfa.storage.persistentobjs import init_tables
+        from sfa.storage.model import init_tables
         init_tables(dbsession)
 
 #
index 2864751..9ab75e7 100755 (executable)
@@ -28,7 +28,7 @@ from sfa.trust.gid import GID, create_uuid
 from sfa.trust.hierarchy import Hierarchy
 
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import RegRecord
+from sfa.storage.model import RegRecord
 
 def main():
     args = sys.argv
index 0e04ecd..795c747 100644 (file)
@@ -13,7 +13,7 @@ from sfa.trust.hierarchy import Hierarchy
 from sfa.server.registry import Registries
 
 from sfa.storage.alchemy import dbsession
-from sfa.storage.persistentobjs import RegRecord
+from sfa.storage.model import RegRecord
 
 from sfa.client.sfaserverproxy import SfaServerProxy 
 
index 22a8091..e996f3b 100755 (executable)
@@ -131,7 +131,7 @@ def update_cert_records(gids):
     """
     # import db stuff here here so this module can be loaded by PlcComponentApi
     from sfa.storage.alchemy import dbsession
-    from sfa.storage.persistentobjs import RegRecord
+    from sfa.storage.model import RegRecord
     if not gids:
         return
     # get records that actually exist in the db
index 280bf14..2510ec4 100644 (file)
@@ -161,7 +161,7 @@ class SfaApi (XmlrpcApi):
             auth_hrn = hrn
         auth_info = self.auth.get_auth_info(auth_hrn)
         from sfa.storage.alchemy import dbsession
-        from sfa.storage.persistentobjs import RegRecord
+        from sfa.storage.model import RegRecord
         record = dbsession.query(RegRecord).filter_by(type='authority+sa', hrn=hrn).first()
         if not record:
             raise RecordNotFound(hrn)
index 84879a6..917d878 100644 (file)
@@ -10,7 +10,7 @@ from sqlalchemy import ForeignKey
 from sfa.util.sfalogging import logger
 
 # this module is designed to be loaded when the configured db server is reachable
-# OTOH persistentobjs can be loaded from anywhere including the client-side
+# OTOH model can be loaded from anywhere including the client-side
 
 class Alchemy:
 
index 1790b73..8324e9b 100755 (executable)
@@ -1,7 +1,7 @@
 import unittest
 from sfa.trust.gid import *
 from sfa.util.config import *
-from sfa.storage.persistentobjs import RegRecord
+from sfa.storage.model import RegRecord
 
 class TestStorage(unittest.TestCase):
     def setUp(self):