should check permissions in method class not manager class
[sfa.git] / sfa / managers / registry_manager_pl.py
index 135fd8d..9c74820 100644 (file)
@@ -13,11 +13,10 @@ from sfa.trust.credential import Credential
 from sfa.trust.certificate import Certificate, Keypair
 from sfa.trust.gid import create_uuid
 from sfa.util.version import version_core
-from sfa.managers.aggregate_manager_pl import slice_status
 
 # The GENI GetVersion call
 def GetVersion(api):
-    peers =dict ([ (peername,v._ServerProxy__host) for (peername,v) in api.registries.items() 
+    peers =dict ([ (peername,v._ServerProxy__host) for (peername,v) in api.registries.iteritems() 
                    if peername != api.hrn])
     xrn=Xrn(api.hrn)
     return version_core({'interface':'registry',
@@ -87,14 +86,14 @@ def get_credential(api, xrn, type, is_self=False):
 
 def resolve(api, xrns, type=None, full=True):
 
-    # load all know registry names into a prefix tree and attempt to find
+    # load all known registry names into a prefix tree and attempt to find
     # the longest matching prefix
     if not isinstance(xrns, types.ListType):
         if not type:
             type = Xrn(xrns).get_type()
         xrns = [xrns]
     hrns = [urn_to_hrn(xrn)[0] for xrn in xrns] 
-    # create a dict whre key is an registry hrn and its value is a
+    # create a dict where key is a registry hrn and its value is a
     # hrns at that registry (determined by the known prefix tree).  
     xrn_dict = {}
     registries = api.registries
@@ -175,6 +174,9 @@ def list(api, xrn, origin_hrn=None):
     return records
 
 
+def create_gid(api, xrn, cert):
+    pass
+
 def register(api, record):
 
     hrn, type = record['hrn'], record['type']
@@ -289,7 +291,6 @@ def update(api, record_dict):
     type = new_record['type']
     hrn = new_record['hrn']
     urn = hrn_to_urn(hrn,type)
-    api.auth.verify_object_permission(hrn)
     table = SfaTable()
     # make sure the record exists
     records = table.findObjects({'type': type, 'hrn': hrn})