<commit_before>#
# Geniwrapper XML-RPC and SOAP interfaces
#
### $Id: api.py 15596 2009-10-31 21:42:05Z anil $
### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $
#

import sys
import os
import traceback
import xmlrpclib.ServerProxy
from sfa.util.api import *


class ComponentAPI(BaseAPI):

    
    def __init__(self, config = "/etc/sfa/sfa_config", encoding = "utf-8", methods='sfacomponent.methods',
                 peer_cert = None, interface = None, key_file = None, cert_file = None):

        BaseAPI.__init__(self, config=config, encoding=encoding, methods=methods, peer_cert=peer_cert, 
                         interface, key_file, cert_file) 
        self.encoding = encoding

        # Better just be documenting the API
        if config is None:
            return

        self.nodemanager = self.getNodeManagerShell()



    def getNodeManagerShell(self):
        # do we need an auth ?<commit_msg>bug fix<commit_after>#
# Geniwrapper XML-RPC and SOAP interfaces
#
### $Id: api.py 15596 2009-10-31 21:42:05Z anil $
### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/plc/api.py $
#

import sys
import os
import traceback
from xmlrpclib import ServerProxy
from sfa.util.api import *


class ComponentAPI(BaseAPI):

    
    def __init__(self, config = "/etc/sfa/sfa_config", encoding = "utf-8", methods='sfacomponent.methods',
                 peer_cert = None, interface = None, key_file = None, cert_file = None):

        BaseAPI.__init__(self, config=config, encoding=encoding, methods=methods, peer_cert=peer_cert, 
                         interface=interface, key_file=key_file, cert_file=cert_file) 
        self.encoding = encoding

        # Better just be documenting the API
        if config is None:
            return

        self.nodemanager = self.getNodeManagerShell()



    def getNodeManagerShell(self):
        # do we need an auth ?
{'fraction_non_alphanumeric': 0.10782241014799154, 'fraction_numerical': 0.021141649048625793, 'mean_word_length': 2.839756592292089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4404768', 'n_tokens_mistral': 638, 'n_tokens_neox': 587, 'n_words': 147}