# appropriate geni records. This is done by running the "import.py" tool.
#
# 3) Create a "trusted_roots" directory and place the certificate of the root
-# authority in that directory. Given the defaults in import.py, this
+# authority in that directory. Given the defaults in import.py, this
# certificate would be named "planetlab.gid". For example,
#
# mkdir trusted_roots; cp authorities/planetlab.gid trusted_roots/
from util.trustedroot import TrustedRootList
from util.cert import Keypair, Certificate
from registry import Registry
-from aggregate import Aggregate
+#from aggregate import Aggregate
from slicemgr import SliceMgr
def main():
if (options.registry):
r = Registry("", registry_port, key_file, cert_file)
r.trusted_cert_list = TrustedRoots.get_list()
+ r.hierarchy = AuthHierarchy
r.start()
# start aggregate manager
import time
import sys
+from util.credential import Credential
from util.hierarchy import Hierarchy
from util.trustedroot import TrustedRootList
from util.cert import Keypair, Certificate
from util.gid import GID
from util.geniserver import GeniServer
from util.record import GeniRecord
+from util.rights import RightList
from util.genitable import GeniTable
from util.geniticket import Ticket
from util.excep import *
from util.misc import *
+from util.config import *
+
##
# Convert geni fields to PLC fields for use when registering up updating
# registry record in the PLC database
# @param auth_hrn human readable name of authority
def get_auth_info(self, auth_hrn):
- return AuthHierarchy.get_auth_info(auth_hrn)
+ return self.hierarchy.get_auth_info(auth_hrn)
##
# Given an authority name, return the database table for that authority. If
if (type == "sa") or (type=="ma"):
# update the tree
- if not AuthHierarchy.auth_exists(name):
- AuthHierarchy.create_auth(name)
+ if not self.hierarchy.auth_exists(name):
+ self.hierarchy.create_auth(name)
# authorities are special since they are managed by the registry
# rather than by the caller. We create our own GID for the
rl = self.determine_rights(type, name)
cred.set_privileges(rl)
- cred.set_parent(AuthHierarchy.get_auth_cred(auth_hrn))
+ cred.set_parent(self.hierarchy.get_auth_cred(auth_hrn))
cred.encode()
cred.sign()
rl = self.determine_rights(type, name)
new_cred.set_privileges(rl)
- new_cred.set_parent(AuthHierarchy.get_auth_cred(auth_hrn))
+ new_cred.set_parent(self.hierarchy.get_auth_cred(auth_hrn))
new_cred.encode()
new_cred.sign()
pkey = Keypair()
pkey.load_pubkey_from_string(pubkey_str)
- gid = AuthHierarchy.create_gid(name, uuid, pkey)
+ gid = self.hierarchy.create_gid(name, uuid, pkey)
return gid.save_to_string(save_parents=True)