File netutil.py
has 346 lines of code (exceeds 250 allowed). Consider refactoring.
Function ssh_run_command
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
def ssh_run_command(ssh_client, command_to_run, prefix='', lines_queue=None,
print_flag=True, block_flag=True, getpty_flag=False):
"""
Runs the specified command on a remote machine
Cyclomatic complexity is too high in function ssh_run_command. (9)
def ssh_run_command(ssh_client, command_to_run, prefix='', lines_queue=None,
print_flag=True, block_flag=True, getpty_flag=False):
"""
Runs the specified command on a remote machine
Cyclomatic complexity is too high in function copy_dir_remote_to_local. (7)
def copy_dir_remote_to_local(ip, ssh_port, username, password,
remote_path, local_path):
"""
Copy recursively remote directories (Copies all files and other \
sub-directories).
Function copy_dir_remote_to_local
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
def copy_dir_remote_to_local(ip, ssh_port, username, password,
remote_path, local_path):
"""
Copy recursively remote directories (Copies all files and other \
sub-directories).
Function ssh_run_command
has 7 arguments (exceeds 4 allowed). Consider refactoring.
def ssh_run_command(ssh_client, command_to_run, prefix='', lines_queue=None,
Function copy_dir_remote_to_local
has 6 arguments (exceeds 4 allowed). Consider refactoring.
def copy_dir_remote_to_local(ip, ssh_port, username, password,
Function copy_dir_local_to_remote
has 6 arguments (exceeds 4 allowed). Consider refactoring.
def copy_dir_local_to_remote(ip, ssh_port, username, password,
Function ssh_copy_file_to_target
has 6 arguments (exceeds 4 allowed). Consider refactoring.
def ssh_copy_file_to_target(ip, ssh_port, username, password, local_file,
Function create_dir_remote
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def create_dir_remote(ip, ssh_port, username, password, remote_path):
Function ssh_connect_or_return
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def ssh_connect_or_return(ip, ssh_port, username, password, maxretries):
Function make_remote_file_executable
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def make_remote_file_executable(ip, port, username, password, remote_file):
Function isfile
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def isfile(ip, port, username, password, file_list):
Function ssh_delete_file_if_exists
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def ssh_delete_file_if_exists(ip, ssh_port, username, password, remote_file):
Function remove_remote_directory
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def remove_remote_directory(ip, ssh_port, username, password, path):
Function isfile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
def isfile(ip, port, username, password, file_list):
"""
Checks if all files in a given list exist. All files are located \
remotely
Function copy_dir_local_to_remote
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def copy_dir_local_to_remote(ip, ssh_port, username, password,
local_path, remote_path):
"""Copy a local directory on a remote machine.
:param connection: A named tuple with all the connection information. \
There are no issues that match your filters.