git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
52e791c
)
renamed persistentobjs into model
author
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Thu, 26 Jan 2012 14:39:21 +0000
(15:39 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Thu, 26 Jan 2012 14:39:21 +0000
(15:39 +0100)
17 files changed:
sfa/client/sfi.py
patch
|
blob
|
history
sfa/importer/sfa-import-openstack.py
patch
|
blob
|
history
sfa/importer/sfa-import-plc.py
patch
|
blob
|
history
sfa/importer/sfa-nuke-plc.py
patch
|
blob
|
history
sfa/importer/sfaImport.py
patch
|
blob
|
history
sfa/managers/registry_manager.py
patch
|
blob
|
history
sfa/managers/registry_manager_openstack.py
patch
|
blob
|
history
sfa/methods/GetSelfCredential.py
patch
|
blob
|
history
sfa/plc/pldriver.py
patch
|
blob
|
history
sfa/server/registry.py
patch
|
blob
|
history
sfa/server/sfa-ca.py
patch
|
blob
|
history
sfa/server/sfa-clean-peer-records.py
patch
|
blob
|
history
sfa/server/sfa-start.py
patch
|
blob
|
history
sfa/server/sfaapi.py
patch
|
blob
|
history
sfa/storage/alchemy.py
patch
|
blob
|
history
sfa/storage/model.py
[moved from
sfa/storage/persistentobjs.py
with 100% similarity]
patch
|
blob
|
history
tests/testStorage.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfi.py
b/sfa/client/sfi.py
index
ec34f45
..
9ddef9f
100644
(file)
--- a/
sfa/client/sfi.py
+++ b/
sfa/client/sfi.py
@@
-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.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.rspecs.rspec import RSpec
from sfa.rspecs.rspec_converter import RSpecConverter
diff --git
a/sfa/importer/sfa-import-openstack.py
b/sfa/importer/sfa-import-openstack.py
index
cb4873e
..
78032e2
100755
(executable)
--- a/
sfa/importer/sfa-import-openstack.py
+++ b/
sfa/importer/sfa-import-openstack.py
@@
-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.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.importer.sfaImport import sfaImport, _cleanup_string
diff --git
a/sfa/importer/sfa-import-plc.py
b/sfa/importer/sfa-import-plc.py
index
8a9e13d
..
cba4323
100755
(executable)
--- a/
sfa/importer/sfa-import-plc.py
+++ b/
sfa/importer/sfa-import-plc.py
@@
-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.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
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
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():
# however now import s expected to be done after service creation..
def main():
diff --git
a/sfa/importer/sfa-nuke-plc.py
b/sfa/importer/sfa-nuke-plc.py
index
6cf5836
..
83c9e4b
100755
(executable)
--- a/
sfa/importer/sfa-nuke-plc.py
+++ b/
sfa/importer/sfa-nuke-plc.py
@@
-14,7
+14,7
@@
from optparse import OptionParser
from sfa.util.sfalogging import logger
from sfa.storage.alchemy import dbsession
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"
def main():
usage="%prog: trash the registry DB"
diff --git
a/sfa/importer/sfaImport.py
b/sfa/importer/sfaImport.py
index
a9d6bd7
..
e2101fc
100644
(file)
--- a/
sfa/importer/sfaImport.py
+++ b/
sfa/importer/sfaImport.py
@@
-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.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.storage.alchemy import dbsession
def _un_unicode(str):
diff --git
a/sfa/managers/registry_manager.py
b/sfa/managers/registry_manager.py
index
d82ef57
..
79ac91c
100644
(file)
--- a/
sfa/managers/registry_manager.py
+++ b/
sfa/managers/registry_manager.py
@@
-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.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.storage.alchemy import dbsession
class RegistryManager:
diff --git
a/sfa/managers/registry_manager_openstack.py
b/sfa/managers/registry_manager_openstack.py
index
aee536f
..
6e210fa
100644
(file)
--- a/
sfa/managers/registry_manager_openstack.py
+++ b/
sfa/managers/registry_manager_openstack.py
@@
-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.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
from sfa.storage.alchemy import dbsession
from sfa.managers.registry_manager import RegistryManager
diff --git
a/sfa/methods/GetSelfCredential.py
b/sfa/methods/GetSelfCredential.py
index
4022008
..
073ae94
100644
(file)
--- a/
sfa/methods/GetSelfCredential.py
+++ b/
sfa/methods/GetSelfCredential.py
@@
-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
### 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
# xxx-local - the current code runs Resolve, which would forward to
# another registry if needed
diff --git
a/sfa/plc/pldriver.py
b/sfa/plc/pldriver.py
index
78395b4
..
2b86f6c
100644
(file)
--- a/
sfa/plc/pldriver.py
+++ b/
sfa/plc/pldriver.py
@@
-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
# 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
# used to be used in get_ticket
#from sfa.trust.sfaticket import SfaTicket
diff --git
a/sfa/server/registry.py
b/sfa/server/registry.py
index
5bc7af5
..
0919a1b
100644
(file)
--- a/
sfa/server/registry.py
+++ b/
sfa/server/registry.py
@@
-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
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)
#
init_tables(dbsession)
#
diff --git
a/sfa/server/sfa-ca.py
b/sfa/server/sfa-ca.py
index
2864751
..
9ab75e7
100755
(executable)
--- a/
sfa/server/sfa-ca.py
+++ b/
sfa/server/sfa-ca.py
@@
-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.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
def main():
args = sys.argv
diff --git
a/sfa/server/sfa-clean-peer-records.py
b/sfa/server/sfa-clean-peer-records.py
index
0e04ecd
..
795c747
100644
(file)
--- a/
sfa/server/sfa-clean-peer-records.py
+++ b/
sfa/server/sfa-clean-peer-records.py
@@
-13,7
+13,7
@@
from sfa.trust.hierarchy import Hierarchy
from sfa.server.registry import Registries
from sfa.storage.alchemy import dbsession
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
from sfa.client.sfaserverproxy import SfaServerProxy
diff --git
a/sfa/server/sfa-start.py
b/sfa/server/sfa-start.py
index
22a8091
..
e996f3b
100755
(executable)
--- a/
sfa/server/sfa-start.py
+++ b/
sfa/server/sfa-start.py
@@
-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
"""
# 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
if not gids:
return
# get records that actually exist in the db
diff --git
a/sfa/server/sfaapi.py
b/sfa/server/sfaapi.py
index
280bf14
..
2510ec4
100644
(file)
--- a/
sfa/server/sfaapi.py
+++ b/
sfa/server/sfaapi.py
@@
-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
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)
record = dbsession.query(RegRecord).filter_by(type='authority+sa', hrn=hrn).first()
if not record:
raise RecordNotFound(hrn)
diff --git
a/sfa/storage/alchemy.py
b/sfa/storage/alchemy.py
index
84879a6
..
917d878
100644
(file)
--- a/
sfa/storage/alchemy.py
+++ b/
sfa/storage/alchemy.py
@@
-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
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:
class Alchemy:
diff --git
a/sfa/storage/persistentobjs.py
b/sfa/storage/model.py
similarity index 100%
rename from
sfa/storage/persistentobjs.py
rename to
sfa/storage/model.py
diff --git
a/tests/testStorage.py
b/tests/testStorage.py
index
1790b73
..
8324e9b
100755
(executable)
--- a/
tests/testStorage.py
+++ b/
tests/testStorage.py
@@
-1,7
+1,7
@@
import unittest
from sfa.trust.gid import *
from sfa.util.config import *
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):
class TestStorage(unittest.TestCase):
def setUp(self):