Package lcmc.host.domain

Examples of lcmc.host.domain.Host


    @Inject
    private WidgetFactory widgetFactory;
    private MyButton resolveButton;

    protected void resolve() {
        final Host h1 = getDrbdVolumeInfo().getFirstBlockDevInfo().getHost();
        final Host h2 = getDrbdVolumeInfo().getSecondBlockDevInfo().getHost();
        final String h = hostWithBetterDataWidget.getStringValue();

        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                final Host hostPri;
                final Host hostSec;
                if (h.equals(h1.getName())) {
                    hostPri = h1;
                    hostSec = h2;
                } else if (h.equals(h2.getName())) {
                    hostPri = h2;
View Full Code Here


                    return;
                }
                mouseStillOver = false;
                final CountDownLatch startTestLatch = new CountDownLatch(1);
                crmg.startTestAnimation((JComponent) component, startTestLatch);
                final Host dcHost = getBrowser().getClusterBrowser().getDCHost();
                getBrowser().getClusterBrowser().ptestLockAcquire();
                try {
                    final ClusterStatus clStatus = getBrowser().getClusterBrowser().getClusterStatus();
                    clStatus.setPtestResult(null);
                    CRM.crmConfigureCommit(host, ta.getText(), Application.RunMode.TEST);
View Full Code Here

        final VolumeInfo dvi = volumeInfo;
        if (dvi == null) {
            return null;
        }
        final ResourceInfo dri = dvi.getDrbdResourceInfo();
        final Host pHost = dri.getProxyHost(getHost(), !WIZARD);
        if (dri.isProxy(getHost())) {
            if (pHost == null) {
                return "ERROR";
            }
            if (pHost.isConnected()) {
                if (pHost.isDrbdProxyUp(dri.getName())) {
                    return PROXY_UP;
                } else {
                    return PROXY_DOWN;
                }
            } else {
                if (dvi.isConnected(runMode)) {
                    return PROXY_UP;
                } else {
                    return pHost.getName();
                }
            }
        }
        return null;
    }
View Full Code Here

    @Override
    public final void updateInfo(final JEditorPane ep) {
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                final Host host = getBrowser().getHost();
                final SshOutput ret = host.captureCommand(new ExecCommandConfig()
                                                              .command("/sbin/ip a l " + getName()));
                ep.setText(ret.getOutput());
            }
        };
        final Thread thread = new Thread(runnable);
View Full Code Here

    public void updateInfo(final JEditorPane ep) {
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                if (cachedModinfoOutput == null) {
                    final Host host = getBrowser().getHost();
                    final SshOutput ret = host.captureCommand(new ExecCommandConfig()
                                                                  .command("/sbin/modinfo " + getName()));
                    cachedModinfoOutput = ret.getOutput();
                }
                ep.setText("<html><pre>" + cachedModinfoOutput + "</html></pre>");
            }
View Full Code Here

            }
        } else {
            noConfigs = false;
            int j;
            for (j = 1; j < configs.length; j++) {
                final Host host = hosts[j];
                if (configs[j].equals(OPENAIS_CONF_READ_ERROR_STRING)) {
                    application.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            configStatus.setText(host
View Full Code Here

            /**
             * Whether the whole thing should be enabled.
             */
            @Override
            public boolean isEnabled() {
                final Host dcHost = getBrowser().getDCHost();
                return dcHost != null && !Tools.versionBeforePacemaker(dcHost);
            }

            @Override
            public void mouseOut(final ComponentWithTest component) {
                if (!isEnabled()) {
                    return;
                }
                mouseStillOver = false;
                hg.stopTestAnimation((JComponent) component);
                component.setToolTipText("");
            }

            @Override
            public void mouseOver(final ComponentWithTest component) {
                if (!isEnabled()) {
                    return;
                }
                mouseStillOver = true;
                component.setToolTipText(ClusterBrowser.STARTING_PTEST_TOOLTIP);
                component.setToolTipBackground(Tools.getDefaultColor("ClusterBrowser.Test.Tooltip.Background"));
                Tools.sleep(250);
                if (!mouseStillOver) {
                    return;
                }
                mouseStillOver = false;
                final CountDownLatch startTestLatch = new CountDownLatch(1);
                hg.startTestAnimation((JComponent) component, startTestLatch);
                final Host dcHost = getBrowser().getDCHost();
                getBrowser().ptestLockAcquire();
                try {
                    final ClusterStatus clStatus = getBrowser().getClusterStatus();
                    clStatus.setPtestResult(null);
                    apply(dcHost, Application.RunMode.TEST);
View Full Code Here

    @Inject
    private TreeMenuController treeMenuController;

    public void init(final String name, final Browser browser) {
        super.init(name, browser);
        final Host firstHost = getBrowser().getClusterHosts()[0];
        preferredEmulator = firstHost.getDistString("KVM.emulator");
        final List<Value> hostsList = new ArrayList<Value>();
        hostsList.add(null);
        for (final Host h : getBrowser().getClusterHosts()) {
            hostsList.add(new StringValue(h.getName()));
        }
View Full Code Here

            lockGraph();
            getGraph().addVertex(v);
            unlockGraph();
        }
        /* add block devices vertices */
        final Host host = hostDrbdInfo.getHost();
        final Point2D hostPos = getVertexLocations().get(v);
        putVertexLocations();
        final double hostXPos = hostPos.getX() - VERTEX_SIZE_HOST / 2;
        final double hostYPos = hostPos.getY();
        int devYPos = (int) hostYPos + BD_STEP_Y;
        List<Vertex> vertexList = hostBDVerticesMap.get(hostDrbdInfo);
        List<Vertex> oldVertexList = null;
        if (vertexList == null) {
            vertexList = new ArrayList<Vertex>();
            hostBDVerticesMap.put(hostDrbdInfo, vertexList);
        } else {
            oldVertexList = new ArrayList<Vertex>(vertexList);
        }
        final Set<BlockDevInfo> blockDevInfos = host.getBrowser().getSortedBlockDevInfos();
        if (oldVertexList != null) {
            for (final Vertex vertex : oldVertexList) {
                final BlockDevInfo bdi = (BlockDevInfo) getInfo(vertex);
                if (bdi == null) {
                    continue;
View Full Code Here

        return check;
    }

    @Override
    boolean isStarted(final Application.RunMode runMode) {
        final Host dcHost = getBrowser().getDCHost();
        if (Tools.versionBeforePacemaker(dcHost)) {
            return super.isStarted(runMode);
        } else {
            final ServiceInfo cs = containedService;
            return cs != null && cs.isStarted(runMode) && super.isStarted(runMode);
View Full Code Here

TOP

Related Classes of lcmc.host.domain.Host

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.