From: Tony Mack Date: Tue, 7 Sep 2010 21:36:30 +0000 (+0000) Subject: fix NameError in ComponentAPI.get_credential X-Git-Tag: sfa-0.9-16^0 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c7abce9389e3ca79d7d7a256d51213fd1a2addb6;hp=5a22a8a84b07acde58bf8da9d98580c4212ca541;p=sfa.git fix NameError in ComponentAPI.get_credential --- diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 61652780..b93f3712 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -1,8 +1,8 @@ # # SFA XML-RPC and SOAP interfaces # -### $Id: api.py 18673 2010-08-25 20:30:21Z tmack $ -### $URL: http://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $ +### $Id: api.py 18708 2010-09-07 21:35:41Z tmack $ +### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $ # import sys @@ -643,6 +643,7 @@ class ComponentAPI(BaseAPI): except IOError: node_pkey_file = config_dir + os.sep + "node.key" node_gid_file = config_dir + os.sep + "node.gid" + cert_filename = path + os.sep + 'server.cert' if not os.path.exists(node_pkey_file) or \ not os.path.exists(node_gid_file): self.get_node_key() @@ -651,6 +652,7 @@ class ComponentAPI(BaseAPI): gid = GID(filename=node_gid_file) hrn = gid.get_hrn() # get credential from registry + cert_str = Certificate(filename=cert_filename).save_to_string(save_parents=True) registry = self.get_registry() cred = registry.get_self_credential(cert_str, 'node', hrn) Credential(string=cred).save_to_file(credfile, save_parents=True)