import traceback
import string
import xmlrpclib
+
+from sfa.util.sfalogging import sfa_logger
import sfa.util.xmlrpcprotocol as xmlrpcprotocol
from sfa.trust.auth import Auth
from sfa.util.config import *
from sfa.util.faults import *
-from sfa.util.debug import *
from sfa.trust.rights import *
from sfa.trust.credential import *
from sfa.trust.certificate import *
from sfa.util.namespace import *
from sfa.util.api import *
from sfa.util.nodemanager import NodeManager
-from sfa.util.sfalogging import *
try:
from collections import defaultdict
except:
self.hrn = self.config.SFA_INTERFACE_HRN
self.time_format = "%Y-%m-%d %H:%M:%S"
- self.logger=get_sfa_logger()
+ self.logger=sfa_logger()
def getPLCShell(self):
self.plauth = {'Username': self.config.SFA_PLC_USER,
def getCredential(self):
"""
- Retrun a valid credential for this interface.
+ Return a valid credential for this interface.
"""
if self.interface in ['registry']:
return self.getCredentialFromLocalRegistry()
registry = registries[self.hrn]
cert_string=self.cert.save_to_string(save_parents=True)
# get self credential
- self_cred = registry.get_self_credential(cert_string, type, self.hrn)
+ self_cred = registry.GetSelfCredential(cert_string, self.hrn, type)
# get credential
- cred = registry.get_credential(self_cred, type, self.hrn)
+ cred = registry.GetCredential(self_cred, self.hrn, type)
# save cred to file
Credential(string=cred).save_to_file(cred_filename, save_parents=True)
# 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)
+ cred = registry.GetSelfCredential(cert_str, hrn, 'node')
Credential(string=cred).save_to_file(credfile, save_parents=True)
return cred
os.unlink(f)
# install the new key pair
- # get_credential will take care of generating the new keypair
+ # GetCredential will take care of generating the new keypair
# and credential
self.get_node_key()
self.getCredential()