Package lcmc.cluster.service.ssh

Examples of lcmc.cluster.service.ssh.SshOutput


        t.start();
    }

    private void initResourceAgentsWithoutMetaData() {
        final String command = host.getDistCommand("Heartbeat.getOCFParametersQuick", (ConvertCmdCallback) null);
        final SshOutput ret = host.captureCommandProgressIndicator(Tools.getString("CRMXML.GetRAMetaData"),
                                                                   new ExecCommandConfig().command(command)
                                                                                          .silentCommand()
                                                                                          .silentOutput()
                                                                                          .sshCommandTimeout(60000));
        boolean linbitDrbdPresent0 = false;
        boolean drbddiskPresent0 = false;
        if (ret.getExitCode() != 0) {
            drbddiskResourceAgentPresent = drbddiskPresent0;
            linbitDrbdResourceAgentPresent = linbitDrbdPresent0;
            return;
        }
        final String output = ret.getOutput();
        if (output == null) {
            drbddiskResourceAgentPresent = drbddiskPresent0;
            linbitDrbdResourceAgentPresent = linbitDrbdPresent0;
            return;
        }
View Full Code Here


        initOCFResourceAgentsWithMetaData(host.getDistCommand("Heartbeat.getOCFParameters",
                                          (ConvertCmdCallback) null));
    }

    private void initOCFResourceAgentsWithMetaData(final String command) {
        final SshOutput ret = host.captureCommand(new ExecCommandConfig().command(command)
                                                                         .silentCommand()
                                                                         .silentOutput()
                                                                         .sshCommandTimeout(300000));
        if (ret.getExitCode() != 0) {
            return;
        }
        final String output = ret.getOutput();
        if (output == null) {
            return;
        }
        final String[] lines = output.split("\\r?\\n");
        final Pattern pp = Pattern.compile("^provider:\\s*(.*?)\\s*$");
 
View Full Code Here

        removeXML(domainName, parametersMap, "devices/video", getVideoDataComparator(), virshOptions);
    }

    public boolean update() {
        final String command = definedOnHost.getDistCommand("VMSXML.GetData", (ConvertCmdCallback) null);
        final SshOutput ret = definedOnHost.captureCommand(new ExecCommandConfig().command(command)
                                                                                  .silentCommand()
                                                                                  .silentOutput());
        if (ret.getExitCode() != 0) {
            return false;
        }
        final String output = ret.getOutput();
        if (output == null) {
            return false;
        }
        return update(output);
    }
View Full Code Here

                                 final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(SIZE_PLACE_HOLDER, size);
        replaceHash.put(DEVICE_PLACE_HOLDER, blockDevice);
        final String command = host.getDistCommand("LVM.resize", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                   final String blockDevice,
                                   final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(DEVICE_PLACE_HOLDER, blockDevice);
        final String command = host.getDistCommand("LVM.pvcreate", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                   final String blockDevice,
                                   final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(DEVICE_PLACE_HOLDER, blockDevice);
        final String command = host.getDistCommand("LVM.pvremove", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                   final String vgName,
                                   final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(VG_NAME_PLACE_HOLDER, vgName);
        final String command = host.getDistCommand("LVM.vgremove", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                   final String blockDevice,
                                   final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(DEVICE_PLACE_HOLDER, blockDevice);
        final String command = host.getDistCommand("LVM.lvremove", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(SIZE_PLACE_HOLDER, size);
        replaceHash.put(LV_NAME_PLACE_HOLDER, lvName);
        replaceHash.put(VG_NAME_PLACE_HOLDER, vgName);
        final String command = host.getDistCommand("LVM.lvcreate", replaceHash);
        final SshOutput ret = execCommand(host, command);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                   final Application.RunMode runMode) {
        final Map<String, String> replaceHash = new HashMap<String, String>();
        replaceHash.put(PV_NAMES_PLACE_HOLDER, Tools.join(" ", pvNames));
        replaceHash.put(VG_NAME_PLACE_HOLDER, vgName);
        final String command = host.getDistCommand("LVM.vgcreate", replaceHash);
        final SshOutput ret = execCommand(host, command);
        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.