source/Tools Integration/CE-Integration/CE-automation-scripts/1-Install-Linux.py [106:175]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            stdin, stdout, stderr = ssh.exec_command("sudo yum install wget -y")
        # Check if there is any error while installing wget
        error = ''
        for line in stderr.readlines():
            error = error + line
        if not error:
            print("wget got installed successfully")
            # Execute the command wget and check if it got configured correctly
            stdin, stdout, stderr = ssh.exec_command("wget")
            error = ''
            for line in stderr.readlines():
                error = error + line
            if "not found" in error or "command-not-found" in error:
                print(
                    "wget is not recognized, unable to proceed! due to " + error)
        else:
            print("something went wrong while installing wget ", error)
    finally:
        if ssh is not None:
            ssh.close()


def check_python(host, username, key_pwd, using_key):
    output, error = execute_cmd(host, username, key_pwd, "python --version",
                                using_key)
    if error:
        if "Python 2" in error:
            return True
        else:
            return False
    else:
        return True


def check_python3(host, username, key_pwd, using_key):
    output, error = execute_cmd(host, username, key_pwd, "python3 --version",
                                using_key)
    if error:
        if "Python 3" in error:
            return True
        else:
            return False
    else:
        return True


def install_python3(host, username, key_pwd, using_key):
    ssh = None
    try:
        print("")
        print("***** Installing python3 *****")
        ssh = open_ssh(host, username, key_pwd, using_key)
        # Find the distribution
        distribution = find_distribution(host, username, key_pwd, using_key)
        if distribution == "ubuntu":
            ssh.exec_command("sudo apt-get update")
            command = "sudo DEBIAN_FRONTEND=noninteractive apt-get install " \
                      "python3"
            stdin, stdout, stderr = ssh.exec_command(command)
            stdin.write('Y\n')
            stdin.flush()
        elif distribution == 'suse':
            stdin, stdout, stderr = ssh.exec_command("sudo zypper install python3")
            stdin.write('Y\n')
            stdin.flush()
        elif distribution == "fedora":
            stdin, stdout, stderr = ssh.exec_command("sudo dnf install python3")
            stdin.write('Y\n')
            stdin.flush()
        else: #This installs on centos
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



source/Tools Integration/MGN-Integration/MGN-automation-scripts/1-Install-Linux.py [106:175]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            stdin, stdout, stderr = ssh.exec_command("sudo yum install wget -y")
        # Check if there is any error while installing wget
        error = ''
        for line in stderr.readlines():
            error = error + line
        if not error:
            print("wget got installed successfully")
            # Execute the command wget and check if it got configured correctly
            stdin, stdout, stderr = ssh.exec_command("wget")
            error = ''
            for line in stderr.readlines():
                error = error + line
            if "not found" in error or "command-not-found" in error:
                print(
                    "wget is not recognized, unable to proceed! due to " + error)
        else:
            print("something went wrong while installing wget ", error)
    finally:
        if ssh is not None:
            ssh.close()


def check_python(host, username, key_pwd, using_key):
    output, error = execute_cmd(host, username, key_pwd, "python --version",
                                using_key)
    if error:
        if "Python 2" in error:
            return True
        else:
            return False
    else:
        return True


def check_python3(host, username, key_pwd, using_key):
    output, error = execute_cmd(host, username, key_pwd, "python3 --version",
                                using_key)
    if error:
        if "Python 3" in error:
            return True
        else:
            return False
    else:
        return True


def install_python3(host, username, key_pwd, using_key):
    ssh = None
    try:
        print("")
        print("***** Installing python3 *****")
        ssh = open_ssh(host, username, key_pwd, using_key)
        # Find the distribution
        distribution = find_distribution(host, username, key_pwd, using_key)
        if distribution == "ubuntu":
            ssh.exec_command("sudo apt-get update")
            command = "sudo DEBIAN_FRONTEND=noninteractive apt-get install " \
                      "python3"
            stdin, stdout, stderr = ssh.exec_command(command)
            stdin.write('Y\n')
            stdin.flush()
        elif distribution == 'suse':
            stdin, stdout, stderr = ssh.exec_command("sudo zypper install python3")
            stdin.write('Y\n')
            stdin.flush()
        elif distribution == "fedora":
            stdin, stdout, stderr = ssh.exec_command("sudo dnf install python3")
            stdin.write('Y\n')
            stdin.flush()
        else: #This installs on centos
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



