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:
97e3b68
)
store connections to federated registries and aggregates in the api object
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 5 Apr 2010 20:46:50 +0000
(20:46 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 5 Apr 2010 20:46:50 +0000
(20:46 +0000)
sfa/util/api.py
patch
|
blob
|
history
diff --git
a/sfa/util/api.py
b/sfa/util/api.py
index
48af3ad
..
ca2557f
100644
(file)
--- a/
sfa/util/api.py
+++ b/
sfa/util/api.py
@@
-19,6
+19,8
@@
from sfa.trust.credential import *
from sfa.trust.certificate import *
from sfa.util.namespace import *
from sfa.util.sfalogging import *
from sfa.trust.certificate import *
from sfa.util.namespace import *
from sfa.util.sfalogging import *
+from sfa.server.registry import Registries
+from sfa.server.aggregate import Aggregates
# See "2.2 Characters" in the XML specification:
#
# See "2.2 Characters" in the XML specification:
#
@@
-115,6
+117,7
@@
class BaseAPI:
# Load configuration
self.config = Config(config)
self.auth = Auth(peer_cert)
# Load configuration
self.config = Config(config)
self.auth = Auth(peer_cert)
+ self.hrn = self.config.SFA_INTERFACE_HRN
self.interface = interface
self.key_file = key_file
self.key = Keypair(filename=self.key_file)
self.interface = interface
self.key_file = key_file
self.key = Keypair(filename=self.key_file)
@@
-124,6
+127,12
@@
class BaseAPI:
self.source = None
self.time_format = "%Y-%m-%d %H:%M:%S"
self.logger=get_sfa_logger()
self.source = None
self.time_format = "%Y-%m-%d %H:%M:%S"
self.logger=get_sfa_logger()
+
+ # load registries
+ self.registries = Registries(self)
+
+ # load aggregates
+ self.aggregates = Aggregates(self)
def callable(self, method):
def callable(self, method):