Package lcmc.cluster.service.ssh

Examples of lcmc.cluster.service.ssh.ExecCommandConfig


     * Stops corosync on host.
     * /etc/init.d/corosync stop
     */
    public static void stopCorosync(final Host host) {
        final String command = host.getDistCommand("Corosync.stopCorosync", (ConvertCmdCallback) null);
        host.execCommandProgressIndicator(PROGRESS_TEXT, new ExecCommandConfig().command(command));
    }
View Full Code Here


     * Stops corosync with pacemaker on host.
     * /etc/init.d/corosync stop && /etc/init.d/pacemaker stop
     */
    public static void stopCorosyncWithPcmk(final Host host) {
        final String command = host.getDistCommand("Corosync.stopCorosyncWithPcmk", (ConvertCmdCallback) null);
        host.execCommandProgressIndicator(PROGRESS_TEXT, new ExecCommandConfig().command(command));
    }
View Full Code Here

    /** Starts Corosync on host and adds it to the rc. */
    public static void startCorosyncRc(final Host host) {
        final String command = host.getDistCommand("Corosync.startCorosync"
                                                   + ";;;Corosync.addToRc",
                                                   (ConvertCmdCallback) null);
        host.execCommandProgressIndicator(PROGRESS_TEXT, new ExecCommandConfig().command(command));
    }
View Full Code Here

    }

    /** Adds Corosync to the rc. */
    public static void addCorosyncToRc(final Host host) {
        final String command = host.getDistCommand("Corosync.addToRc", (ConvertCmdCallback) null);
        host.execCommandProgressIndicator(PROGRESS_TEXT, new ExecCommandConfig().command(command));
    }
View Full Code Here

     * Reloads Corosync's configuration on host.
     * /etc/init.d/corosync reload
     */
    public static void reloadCorosync(final Host host) {
        final String command = host.getDistCommand("Corosync.reloadCorosync", (ConvertCmdCallback) null);
        host.execCommandProgressIndicator(PROGRESS_TEXT, new ExecCommandConfig().command(command));
    }
View Full Code Here

            final String testCmd =
                "if [ ! -e " + LCMC_TEST_FILE + " ]; "
             + "then " + DistResource.SUDO + "/usr/sbin/cibadmin -Ql > "
             + LCMC_TEST_FILE + ";fi;"
             + "export CIB_file=" + LCMC_TEST_FILE + ';';
            return host.captureCommand(new ExecCommandConfig().command(testCmd + command)
                                                              .silentCommand()
                                                              .silentOutput());
        } else {
            LOG.debug1("execCommand: crm command: " + command);
            return host.captureCommandProgressIndicator(Tools.getString("CIB.ExecutingCommand"),
                                                        new ExecCommandConfig().command(command));
        }
    }
View Full Code Here

                } else {
                    dirSB.append("/*");
                }
                final SshOutput out = host.captureCommandProgressIndicator(
                        "executing...",
                        new ExecCommandConfig().command("stat -c \"%A %a %Y %s %n\" " + dirSB + " 2>/dev/null")
                                .silentOutput());
                final List<LinuxFile> files = new ArrayList<LinuxFile>();
                if (out.getExitCode() == 0) {
                    for (final String line : out.getOutput().split("\r\n")) {
                        if (line.trim().isEmpty()) {
View Full Code Here

                               + LCMC_TEST_FILE
                               + " 2>&1;echo '"
                               + PTEST_END_DELIM
                               + "';cat " + LCMC_TEST_FILE + " 2>/dev/null;"
                               + "mv -f " + LCMC_TEST_FILE + "{,.last} 2>/dev/null";
        final SshOutput output = host.captureCommand(new ExecCommandConfig().command(command)
                                                                            .silentCommand()
                                                                            .silentOutput());
        M_PTEST_WRITELOCK.lock();
        try {
            final String po = output.getOutput();
View Full Code Here

TOP

Related Classes of lcmc.cluster.service.ssh.ExecCommandConfig

Copyright © 2018 www.massapicom. 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.