Tony fix to the sfa- start bug when aggregates.xml holds peer information .
authorSandrine Avakian <sandrine.avakian@inria.fr>
Wed, 18 Jan 2012 13:41:47 +0000 (14:41 +0100)
committerSandrine Avakian <sandrine.avakian@inria.fr>
Wed, 18 Jan 2012 13:41:47 +0000 (14:41 +0100)
sfa/server/sfa-start.py

index 0c2c0a2..73c467d 100755 (executable)
@@ -44,6 +44,7 @@ from sfa.trust.gid import GID
 from sfa.server.sfaapi import SfaApi
 from sfa.server.registry import Registries
 from sfa.server.aggregate import Aggregates
+from sfa.client.return_value import ReturnValue
 
 # after http://www.erlenstar.demon.co.uk/unix/faq_2.html
 def daemon():
@@ -102,8 +103,8 @@ def install_peer_certs(server_key_file, server_cert_file):
             if 'sfa' not in server_version:
                 logger.info("get_trusted_certs: skipping non sfa aggregate: %s" % new_hrn)
                 continue
-      
-            trusted_gids = interface.get_trusted_certs()
+            trusted_gids = ReturnValue.get_value(interface.get_trusted_certs())
+            #trusted_gids = interface.get_trusted_certs()
             print>>sys.stderr, " \r\n \r\n \t=============================================== install_peer_certs  TRUSTED_GIDS %s   " %(trusted_gids)
             if trusted_gids:
                  #and not isinstance(trusted_gids,list):
@@ -118,8 +119,8 @@ def install_peer_certs(server_key_file, server_cert_file):
                     message += "unable to install trusted gid for %s" % \
                                (new_hrn) 
                     print>>sys.stderr, " \r\n \r\n \t=============================================== install_peer_certs   message %s   " %(message)
-                    gid = GID(string=trusted_gids[0])
-                    #gid = GID(string=trusted_gid['value'][0])
+                    #gid = GID(string=trusted_gids[0])
+                    gid = GID(string=trusted_gid)
                     print>>sys.stderr, " \r\n \r\n \t=============================================== install_peer_certs   gid %s   " %(gid)
                     peer_gids.append(gid)
                     if gid.get_hrn() == new_hrn: