Examples of ExecCommandConfig


Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            connect(sshGui,
                    new ConnectionCallback() {
                        @Override
                        public void done(final int flag) {
                            setConnected();
                            getSSH().execCommandAndWait(new ExecCommandConfig()
                                                            .command(":") /* activate sudo */
                                                            .silentCommand()
                                                            .silentOutput()
                                                            .sshCommandTimeout(10000));
                                    getSSH().installGuiHelper();
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        }
    }

    /** Gets and stores info about the host. */
    void getAllInfo() {
        execCommand(new ExecCommandConfig().commandString("GetHostAllInfo")
                .execCallback(new ExecCallback() {
                    @Override
                    public void done(final String ans) {
                        parseHostInfo(ans);
                        setLoadingDone();
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        if (updateLVM) {
            cmd = "GetHostHWInfoLVM";
        } else {
            cmd = "GetHostHWInfo";
        }
        execCommand(new ExecCommandConfig().commandString(cmd)
                         .execCallback(new ExecCallback() {
                             @Override
                             public void done(final String ans) {
                                 parseHostInfo(ans);
                                 for (final CategoryInfo ci : infosToUpdate) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        }
        return out;
    }

    public void startPing() {
        ssh.execCommand(new ExecCommandConfig()
                         .commandString("PingCommand")
                         .inBash(true)
                         .inSudo(false)
                         .execCallback(new ExecCallback() {
                             @Override
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

    /** Gets and stores hardware info about the host. */
    public void startHWInfoDaemon(final CategoryInfo[] infosToUpdate, final ResourceGraph[] graphs) {
        final Host host = this;
        LOG.debug1("startHWInfoDaemon: " + getName());
        serverStatusThread = ssh.execCommand(new ExecCommandConfig()
                         .commandString("HostHWInfoDaemon")
                         .inBash(false)
                         .inSudo(false)
                         .execCallback(new ExecCallback() {
                             @Override
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        }
        command.append(" 2>&1");
        int i = 0;
        SshOutput out;
        do {
            out = getSSH().execCommandAndWait(new ExecCommandConfig().command(command.toString())
                                                                     .sshCommandTimeout(60000));
            if (out.getExitCode() == 0 || out.getExitCode() == 10) {
                break;
            }
            i++;
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            }
        }
        application.setLastHbPmInstalledMethod(getHost().getDistString("PmInst.install.text." + installMethod));
        application.setLastInstalledClusterStack(Application.COROSYNC_NAME);

        getHost().execCommandInBash(new ExecCommandConfig()
                         .commandString(installCommand)
                         .progressBar(getProgressBar())
                         .execCallback(new ExecCallback() {
                             @Override
                             public void done(final String answer) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        /* check if modules are loaded. */
        final Host[] hosts = getCluster().getHostsArray();
        final ExecCommandThread[] infoThreads = new ExecCommandThread[hosts.length];
        int i = 0;
        for (final Host h : hosts) {
            infoThreads[i] = h.execCommand(new ExecCommandConfig()
                                               .commandString("Cluster.Init.getInstallationInfo")
                                               .execCallback(new ExecCallback() {
                                                   @Override
                                                   public void done(final String answer) {
                                                       for (final String line : answer.split("\\r?\\n")) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            }
            String cmd = command.replaceAll("@DRYRUN@", "-d");
            if (cmd.contains("@DRYRUNCONF@")) {
                cmd = cmd.replaceAll("@DRYRUNCONF@", "-c /var/lib/drbd/drbd.conf-lcmc-test");
            }
            final SshOutput output = host.captureCommand(new ExecCommandConfig().command(cmd)
                                                                                .silentCommand()
                                                                                .silentOutput());
            M_DRBD_TEST_WRITELOCK.lock();
            try {
                if (drbdtestOutput == null) {
                    drbdtestOutput = output.getOutput();
                } else {
                    drbdtestOutput += output.getOutput();
                }
            } finally {
                M_DRBD_TEST_WRITELOCK.unlock();
            }
            return output;
        } else {
            String cmd;
            if (command.contains("@DRYRUN@")) {
                cmd = command.replaceAll("@DRYRUN@", "");
            } else {
                cmd = command;
            }
            cmd = cmd.replaceAll("@DRYRUNCONF@", "");
            final String progressText = Tools.getString("DRBD.ExecutingCommand")
                                        + ' '
                                        + cmd.replaceAll(DistResource.SUDO, " ")
                                        + "...";
            return host.captureCommandProgressIndicator(progressText,
                                                        new ExecCommandConfig().command(cmd)
                                                                               .execCallback(execCallback)
                                                                               .commandVisible(outputVisible)
                                                                               .outputVisible(outputVisible));
        }
    }
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        }
    }

    public final String updateDrbdParameters(final Host host) {
        final String command = host.getDistCommand("Drbd.getParameters", (ConvertCmdCallback) null);
        final SshOutput ret = host.captureCommand(new ExecCommandConfig().command(command)
                                                                         .silentCommand()
                                                                         .silentOutput());
        if (ret.getExitCode() != 0) {
            return null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.