Package lcmc.cluster.service.ssh

Examples of lcmc.cluster.service.ssh.SshOutput


                                     final String resource,
                                     final String volume,
                                     final ExecCallback execCallback,
                                     final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.invalidate", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here


                                      final String resource,
                                      final String volume,
                                      final ExecCallback execCallback,
                                      final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.discardData", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                 final String resource,
                                 final String volume,
                                 final ExecCallback execCallback,
                                 final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.resize", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

    public static boolean verify(final Host host,
                                 final String resource,
                                 final String volume,
                                 final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.verify", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, null, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                  final String resource,
                                  final String volume,
                                  final ExecCallback execCallback,
                                  final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.adjust.apply", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, false, runMode);
       
        final Pattern p = Pattern.compile(".*Failure: \\((\\d+)\\).*", Pattern.DOTALL);
        final Matcher m = p.matcher(ret.getOutput());
        if (m.matches()) {
            return Integer.parseInt(m.group(1));
        }
        return ret.getExitCode();
    }
View Full Code Here

                              final String resource,
                              final String volume,
                              final ExecCallback execCallback,
                              final Application.RunMode runMode) {
        final String command = getDistCommand("DRBD.proxyUp", host, resource, volume);
        final SshOutput ret = execCommand(host, command, execCallback, false, runMode);
       
        return ret.getExitCode();
    }
View Full Code Here

                                final String resource,
                                final String volume,
                                final ExecCallback execCallback,
                                final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.proxyDown", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, false, runMode);
       
        return ret.getExitCode();
    }
View Full Code Here

    public static String getGI(final Host host,
                               final String resource,
                               final String volume,
                               final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.get-gi", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, null, false, runMode);
        if (ret.getExitCode() == 0) {
            return ret.getOutput();
        }
        return null;
    }
View Full Code Here

                               final String resource,
                               final String volume,
                               final ExecCallback execCallback,
                               final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.down", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                             final String resource,
                             final String volume,
                             final ExecCallback execCallback,
                             final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.up", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

TOP

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

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.