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
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
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
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():
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"
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):
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:
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
### 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
# 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
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)
#
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
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
"""
# 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
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)
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:
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):