Package lcmc.cluster.domain

Examples of lcmc.cluster.domain.Cluster


        return (HostBrowser) super.getBrowser();
    }

    @Override
    public ImageIcon getMenuIcon(final Application.RunMode runMode) {
        final Cluster cl = host.getCluster();
        if (cl != null) {
            return HostBrowser.HOST_IN_CLUSTER_ICON_RIGHT_SMALL;
        }
        return HostBrowser.HOST_ICON;
    }
View Full Code Here


        final ClusterTab selected = csp.getClusterTab();
        if (selected == null) {
            return null;
        }
        //TODO: or drbd
        final Cluster c = selected.getCluster();
        if (c == null) {
            return null;
        }
        return c.getBrowser().getServicesInfo();
    }
View Full Code Here

        final ClusterTab selected = csp.getClusterTab();
        if (selected == null) {
            return null;
        }
        //TODO: or drbd
        final Cluster c = selected.getCluster();
        if (c == null) {
            return null;
        }
        return c.getBrowser().getCrmGraph();
    }
View Full Code Here

        fileSystemsCategory.init(Tools.getString("HostBrowser.FileSystems"), this);
        fileSystemsNode = treeMenuController.createMenuItem(treeTop, fileSystemsCategory);
    }

    public ClusterBrowser getClusterBrowser() {
        final Cluster c = host.getCluster();
        if (c == null) {
            return null;
        }
        return c.getBrowser();
    }
View Full Code Here

                guiOptionName = parseGuiOptionsInfo(line, guiOptionName, newGuiOptions);
            } else if ("version-info".equals(type)) {
                versionLines.add(line);
            } else if ("drbd-proxy-info".equals(type)) {
                /* res-other.host-this.host */
                final Cluster cl = getCluster();
                if (cl != null) {
                    String res = null;
                    if (line.startsWith("up:")) {
                        for (final Host otherHost : getCluster().getProxyHosts()) {
                            if (otherHost == this) {
View Full Code Here

        final JScrollPane pvSP = new JScrollPane(pvsPane);
        pvSP.setPreferredSize(new Dimension(0, 45));
        pane.add(pvSP);

        final JPanel hostsPane = new JPanel(new FlowLayout(FlowLayout.LEADING));
        final Cluster cluster = host.getCluster();
        hostCheckBoxes = Tools.getHostCheckBoxes(cluster);
        hostsPane.add(new JLabel("Select Hosts: "));
        for (final Map.Entry<Host, JCheckBox> hostEntry : hostCheckBoxes.entrySet()) {
            hostEntry.getValue().addItemListener(new ItemChangeListener(true));
            if (host == hostEntry.getKey()) {
View Full Code Here

                LOG.debug1("quickClusterButton: BUTTON: quick cluster");
                final Thread t = new Thread(new Runnable() {
                    @Override
                    public void run() {
                        final String clusterName = clusterTF.getText();
                        final Cluster cluster = clusterProvider.get();
                        final String newClusterName;
                        if (CLUSTER_NAME_PLACE_HOLDER.equals(clusterName)) {
                            newClusterName = DEFAULT_CLUSTER_NAME;
                        } else {
                            newClusterName = clusterName;
                        }
                        if (allClusters.isClusterName(newClusterName)) {
                            cluster.setName(allClusters.getNextClusterName(newClusterName + ' '));
                        } else {
                            cluster.setName(newClusterName);
                        }
                        application.addClusterToClusters(cluster);
                        addClusterBox(cluster);
                        addCheckboxListener(cluster);
                        for (final JTextField hostTF : hostsTF) {
                            final String entered = hostTF.getText();
                            String hostName;
                            String username = null;
                            final int a = entered.indexOf('@');
                            if (a > 0) {
                                username = entered.substring(0, a);
                                hostName = entered.substring(a + 1, entered.length());
                            } else {
                                hostName = entered;
                            }
                            final int p = hostName.indexOf(':');
                            String port = null;
                            if (p > 0) {
                                port = hostName.substring(p + 1, hostName.length());
                                hostName = hostName.substring(0, p);
                            }
                            final Host host = hostFactory.createInstance(hostName);
                            if (username == null) {
                                host.setUsername(Host.ROOT_USER);
                            } else {
                                host.setUseSudo(true);
                                host.setUsername(username);
                            }
                            if (port == null) {
                                host.setSSHPort(Host.DEFAULT_SSH_PORT);
                            } else {
                                host.setSSHPort(port);
                            }
                            host.setCluster(cluster);
                            host.setHostname(hostName);
                            cluster.addHost(host);
                            application.addHostToHosts(host);
                            guiData.allHostsUpdate();
                        }
                        application.addClusterToClusters(cluster);
                        final Collection<Cluster> selectedClusters = new ArrayList<Cluster>();
View Full Code Here

                final ClusterTab clusterTab = getClusterTab();
                if (clusterTab == null) {
                    return;
                }

                final Cluster cluster = clusterTab.getCluster();
                if (cluster != null) {
                    refreshView();
                }
            }
        });
View Full Code Here

        });
        add(tabbedPane);
    }

    public void addClusterTab(final ClusterTab clusterTab) {
        final Cluster cluster = clusterTab.getCluster();
        LOG.debug2("addTab: cluster: " + cluster.getName());
        if (tabbedPane.getTabCount() == 1) {
           removeAllTabs();
        }
        final String title = Tools.join(" ", cluster.getHostNames());
        tabbedPane.addTab(cluster.getName(), ClusterTab.CLUSTER_ICON, clusterTab, title);

        addTabComponentWithCloseButton(clusterTab);
        tabbedPane.setSelectedComponent(clusterTab);
        refreshView();
    }
View Full Code Here

                         final String stacktrace,
                         final int exitCode) {
        final StringBuilder onHost = new StringBuilder("");
        if (host != null) {
            onHost.append(" on host ");
            final Cluster cluster = host.getCluster();
            if (cluster != null) {
                onHost.append(cluster.getName());
                onHost.append(" / ");
            }
            onHost.append(host.getName());
        }
        appWarning(Tools.getString("Tools.sshError.command")
View Full Code Here

TOP

Related Classes of lcmc.cluster.domain.Cluster

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.