<commit_before>import logging, os, datetime, sys
import glob, tempfile, subprocess
import paramiko
from OpenMesher.interfaces import IOpenMesherDeployPlugin
from OpenMesher.lib import *

class SSHDeploy(IOpenMesherDeployPlugin):
    def setupargs(self, parser):
        parser.add_argument('--deploy', action='store_true', help='Attempt to deploy the files to the routers (will not install or restart services)')
        parser.add_argument('--deploy-username', action='store', help='Username to use when deploying via SSH')
        parser.add_argument('--deploy-dir', action='store', help='Path to upload files')
        super(SSHDeploy, self).setupargs(parser)

    def activate(self):
        pass
    
    def deploy(self, packagePlugins = None, cliargs = None, stoponfailure = False):
        if not cliargs.deploy:
            return
        
        username = cliargs.deploy_username or 'root'
        deploydir = cliargs.deploy_dir or '/root/'
        logging.info('Assembling files for deployment...')
        
        deploy_dict = {}
        for plugin in packagePlugins:
            logging.debug('Processing files files from plugin %s...' %(plugin))
            deploy_dict = nested_dict_merge(deploy_dict, plugin.packages())
        
        ssh = paramiko.SSHClient()
        ssh.load_system_host_keys()
        
        for router in deploy_dict:
            logging.info('Connecting to %s...' %(router))
            <commit_msg>Remove custom activation code for ssh deployment--handled by base class<commit_after>import logging, os, datetime, sys
import glob, tempfile, subprocess
import paramiko
from OpenMesher.interfaces import IOpenMesherDeployPlugin
from OpenMesher.lib import *

class SSHDeploy(IOpenMesherDeployPlugin):
    def setupargs(self, parser):
        parser.add_argument('--deploy-username', action='store', help='Username to use when deploying via SSH')
        parser.add_argument('--deploy-dir', action='store', help='Path to upload files')
        super(SSHDeploy, self).setupargs(parser)
    
    def deploy(self, packagePlugins = None, cliargs = None, stoponfailure = False):
        username = cliargs.deploy_username or 'root'
        deploydir = cliargs.deploy_dir or '/root/'
        logging.info('Assembling files for deployment...')
        
        deploy_dict = {}
        for plugin in packagePlugins:
            logging.debug('Processing files files from plugin %s...' %(plugin))
            deploy_dict = nested_dict_merge(deploy_dict, plugin.packages())
        
        ssh = paramiko.SSHClient()
        ssh.load_system_host_keys()
        
        for router in deploy_dict:
            logging.info('Connecting to %s...' %(router))
            
{'fraction_non_alphanumeric': 0.10214655810510732, 'fraction_numerical': 0.0, 'mean_word_length': 2.889208633093525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1354571', 'n_tokens_mistral': 764, 'n_tokens_neox': 736, 'n_words': 204}