Examples of ExecCommandConfig


Examples of lcmc.cluster.service.ssh.ExecCommandConfig

    }

    /** Checks whether the files have to be downloaded. */
    final void checkFile(final String ans) {
        answerPaneSetText(Tools.getString("Dialog.Host.DrbdLinbitInst.CheckingFile"));
        getHost().execCommand(new ExecCommandConfig().commandString("DrbdInst.test")
                          .progressBar(getProgressBar())
                          .execCallback(new ExecCallback() {
                              // TODO: exchange here done and doneError
                              // TODO: treat file exist differently as other
                              // errors.
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

                          }));
    }

    final void downloadDrbd() {
        answerPaneSetText(Tools.getString("Dialog.Host.DrbdLinbitInst.Downloading"));
        getHost().execCommand(new ExecCommandConfig().commandString("DrbdInst.wget")
                          .progressBar(getProgressBar())
                          .execCallback(new ExecCallback() {
                               @Override
                               public void done(final String answer) {
                                  installDrbd();
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        application.setLastDrbdInstalledMethod(drbdInstallation.getDrbdInstallMethodIndex());
        application.setLastDrbdInstalledMethod(
                           getHost().getDistString("DrbdInst.install.text."
                                                   + drbdInstallation.getDrbdInstallMethodIndex()));
        answerPaneSetText(Tools.getString("Dialog.Host.DrbdLinbitInst.Installing"));
        getHost().execCommandInBash(new ExecCommandConfig().commandString("DrbdInst.install;;;DRBD.load")
                          .progressBar(getProgressBar())
                          .execCallback(new ExecCallback() {
                               @Override
                               public void done(final String answer) {
                                  installationDone();
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        getProgressBar().start(2000);
        findAvailTarballs();
    }

    protected void findAvailTarballs() {
        final SshOutput ret = getHost().captureCommand(new ExecCommandConfig()
                                    .commandString("DrbdAvailVersionsSource")
                                    .convertCmdCallback(getDrbdInstallationConvertCmdCallback()).silentOutput());
        final int exitCode = ret.getExitCode();
        final String output = ret.getOutput();
        if (exitCode == 0) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            });
        }
    }

    private String getLastDrbdUtilFileName() {
        final SshOutput ret = getHost().captureCommand(new ExecCommandConfig()
                .commandString("DrbdUtilAvailVersionsSource")
                .convertCmdCallback(getDrbdInstallationConvertCmdCallback()).silentOutput());
        final int exitCode = ret.getExitCode();
        final String output = ret.getOutput();
        if (exitCode == 0) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

                    @Override
                    public void run(final String text) {
                        final String hostName = host.getName();
                        final String command = "MakeKernelPanic";
                        guiData.startProgressIndicator(hostName, host.getDistString(command));
                        host.execCommand(new ExecCommandConfig().commandString(command));
                        guiData.stopProgressIndicator(hostName, host.getDistString(command));
                    }
                });
        submenu.add(panicMenuItem);

        /* reboot */
        final MyMenuItem rebootMenuItem = menuFactory.createMenuItem(
                Tools.getString("HostBrowser.MakeKernelReboot") + host.getName(),
                null,
                new AccessMode(AccessMode.GOD, AccessMode.NORMAL),
                new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL))
                .enablePredicate(new EnablePredicate() {
                    @Override
                    public String check() {
                        if (!host.isConnected()) {
                            return Host.NOT_CONNECTED_MENU_TOOLTIP_TEXT;
                        }
                        return null;
                    }
                })

                .addAction(new MenuAction() {
                    @Override
                    public void run(final String text) {
                        final String hostName = host.getName();
                        final String command = "MakeKernelReboot";
                        guiData.startProgressIndicator(hostName, host.getDistString(command));
                        host.execCommand(new ExecCommandConfig().commandString(command));
                        guiData.stopProgressIndicator(hostName, host.getDistString(command));
                    }
                });
        submenu.add(rebootMenuItem);
    }
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        final Host[] hosts = getCluster().getHostsArray();
        final ExecCommandThread[] infoThreads = new ExecCommandThread[hosts.length];
        getProgressBar().start(10000);
        int i = 0;
        for (final Host host : hosts) {
            infoThreads[i] = host.execCommand(new ExecCommandConfig()
                                                  .commandString("Cluster.Init.getInstallationInfo")
                                                  .progressBar(getProgressBar())
                                                  .execCallback(new ExecCallback() {
                                                      @Override
                                                      public void done(final String answer) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        configStatus.setText(Tools.getString("Dialog.Cluster.HbConfig.Loading"));
        int i = 0;

        for (final Host h : hosts) {
            final int index = i;
            ts[i] = h.execCommand(new ExecCommandConfig().commandString("Heartbeat.getHbConfig")
                             .execCallback(new ExecCallback() {
                                 @Override
                                 public void done(final String answer) {
                                     configs[index] = answer;
                                 }
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

     * block device object. The command is 'drbdsetup /dev/drbdX events'
     * The session is stored, so that in can be stopped with 'stop' button.
     */
    public void execDrbdStatusCommand(final ExecCallback execCallback, final NewOutputCallback outputCallback) {
        if (drbdStatusThread == null) {
            drbdStatusThread = ssh.execCommand(new ExecCommandConfig()
                                                   .commandString("DRBD.getDrbdStatus")
                                                   .inBash(false)
                                                   .inSudo(false)
                                                   .execCallback(execCallback)
                                                   .newOutputCallback(outputCallback)
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

    }

    public void execCrmStatusCommand(final ExecCallback execCallback,
                                     final NewOutputCallback outputCallback) {
        if (crmStatusThread == null) {
            crmStatusThread = ssh.execCommand(new ExecCommandConfig()
                                                 .commandString("Heartbeat.getClStatus")
                                                 .inBash(false)
                                                 .inSudo(false)
                                                 .execCallback(execCallback)
                                                 .newOutputCallback(outputCallback)
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.