Examples of ExecCommandConfig


Examples of lcmc.cluster.service.ssh.ExecCommandConfig

    public String getConfig(final Host host) {
        if (!host.isConnected()) {
            return null;
        }
        final String command2 = host.getDistCommand("Drbd.getConfig", (ConvertCmdCallback) null);
        final SshOutput ret = host.captureCommand(new ExecCommandConfig().command(command2)
                                                                         .silentCommand()
                                                                         .silentOutput());
        if (ret.getExitCode() == 0) {
            final StringBuffer confSB = new StringBuffer(ret.getOutput());
            return host.getOutput("drbd", confSB);
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        this.host = host;
        this.crmXML = crmXML;
        final String command = host.getDistCommand("Heartbeat.getClusterMetadata",
                                                   (ConvertCmdCallback) null);
        final SshOutput ret = host.captureCommandProgressIndicator(Tools.getString("Heartbeat.getClusterMetadata"),
                                                                   new ExecCommandConfig().command(command)
                                                                                          .silentCommand()
                                                                                          .silentOutput());
        final String output = ret.getOutput();
        if (ret.getExitCode() != 0) {
            return;
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        // TODO: disable buttons if disconnected?
        final MyButton procDrbdButton = widgetFactory.createButton("/proc/drbd");
        procDrbdButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                host.execCommand(new ExecCommandConfig().commandString("DRBD.getProcDrbd")
                                                        .silentCommand()
                                                        .silentOutput()
                                                        .execCallback(execCallback));
            }
        });
        host.registerEnableOnConnect(procDrbdButton);
        final MyButton drbdProcsButton = widgetFactory.createButton("DRBD Processes");
        drbdProcsButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                host.execCommand(new ExecCommandConfig().commandString("DRBD.getProcesses")
                                                        .silentCommand()
                                                        .silentOutput()
                                                        .execCallback(execCallback));
            }
        });
        host.registerEnableOnConnect(drbdProcsButton);

        final JPanel mainPanel = new JPanel();
        mainPanel.setBackground(HostBrowser.PANEL_BACKGROUND);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));

        final JPanel buttonPanel = new JPanel(new BorderLayout());
        buttonPanel.setBackground(HostBrowser.BUTTON_PANEL_BACKGROUND);
        buttonPanel.setMinimumSize(new Dimension(0, application.scaled(50)));
        buttonPanel.setPreferredSize(new Dimension(0, application.scaled(50)));
        buttonPanel.setMaximumSize(new Dimension(Short.MAX_VALUE, application.scaled(50)));
        mainPanel.add(buttonPanel);

        /* Actions */
        buttonPanel.add(getActionsButton(), BorderLayout.LINE_END);
        final JPanel panel = new JPanel(new SpringLayout());
        panel.setBackground(HostBrowser.BUTTON_PANEL_BACKGROUND);

        panel.add(procDrbdButton);
        panel.add(drbdProcsButton);
        SpringUtilities.makeCompactGrid(panel, 2, 1// rows, cols
                                           1, 1// initX, initY
                                           1, 1); // xPad, yPad
        mainPanel.setMinimumSize(new Dimension(application.getDefaultSize("HostBrowser.ResourceInfoArea.Width"),
                                               application.getDefaultSize("HostBrowser.ResourceInfoArea.Height")));
        mainPanel.setPreferredSize(new Dimension(application.getDefaultSize("HostBrowser.ResourceInfoArea.Width"),
                                                 application.getDefaultSize("HostBrowser.ResourceInfoArea.Height")));
        buttonPanel.add(panel);
        mainPanel.add(new JScrollPane(textArea));
        host.execCommand(new ExecCommandConfig().commandString("DRBD.getProcDrbd")
                                                .silentCommand()
                                                .silentOutput()
                                                .execCallback(execCallback));
        return mainPanel;
    }
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        application.setLastDrbdInstalledMethod(getHost().getDistString("DrbdInst.install.text." + installMethod));
        LOG.debug1("installDrbd: cmd: " + installCommand
                   + " arch: " + archString
                   + " version: " + drbdVersionUrlString
                   + '/' + drbdVersion);
        getHost().execCommandInBash(new ExecCommandConfig()
                         .commandString(installCommand + ";;;DRBD.load")
                         .progressBar(getProgressBar())
                         .execCallback(new ExecCallback() {
                             @Override
                             public void done(final String answer) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

        if (existCache != null) {
            return existCache;
        }
        final SshOutput out = host.captureCommandProgressIndicator(
                                            "executing...",
                                            new ExecCommandConfig().command(DistResource.SUDO
                                                                            + "stat "
                                                                            + Tools.getUnixPath(toString())
                                                                            + " 2>/dev/null")
                                                                    .silentOutput());
        return out.getExitCode() == 0;
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            availBuilds();
        }
    }

    protected final void availBuilds() {
        getHost().execCommand(new ExecCommandConfig().commandString("DrbdAvailBuilds")
                                                     .convertCmdCallback(getDrbdInstallationConvertCmdCallback())
                                                     .execCallback(new ExecCallback() {
                @Override
                public void done(final String answer) {
                    String defaultValue = getDrbdInstallation().getDrbdBuildToInstall();
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

    }

    /** Finds available files. */
    protected final void availFiles() {
        drbdBuildCombo.setEnabled(true);
        getHost().execCommand(new ExecCommandConfig().commandString("DrbdAvailFiles")
                                                     .convertCmdCallback(getDrbdInstallationConvertCmdCallback())
                                                     .execCallback(new ExecCallback() {
            @Override
            public void done(final String answer) {
                final List<String> files = new ArrayList<String>(Arrays.asList(answer.split("\\r?\\n")));
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

         * are first directory part in the download area.*/
        drbdDistributionWidget.setEnabled(false);
        drbdKernelDirWidget.setEnabled(false);
        drbdArchWidget.setEnabled(false);
        getProgressBar().start(20000);
        final ExecCommandThread t = getHost().execCommand(new ExecCommandConfig()
                .commandString("DrbdAvailVersions")
                .convertCmdCallback(getDrbdInstallationConvertCmdCallback())
                .execCallback(new ExecCallback() {
                    @Override
                    public void done(final String answer) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

            public void run() {
                drbdKernelDirWidget.setEnabled(false);
                drbdArchWidget.setEnabled(false);
            }
        });
        final ExecCommandThread t = getHost().execCommand(new ExecCommandConfig()
                .commandString("DrbdAvailDistributions")
                .convertCmdCallback(getDrbdInstallationConvertCmdCallback())
                .execCallback(new ExecCallback() {
                    @Override
                    public void done(String answer) {
View Full Code Here

Examples of lcmc.cluster.service.ssh.ExecCommandConfig

                }
            });
            availArchs();
            return;
        }
        final ExecCommandThread t = getHost().execCommand(new ExecCommandConfig()
                        .commandString("DrbdAvailKernels")
                        .convertCmdCallback(getDrbdInstallationConvertCmdCallback())
                        .execCallback(new ExecCallback() {
                            @Override
                            public void done(String answer) {
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.