Package lcmc.cluster.domain

Examples of lcmc.cluster.domain.Cluster


                if (clusters != null) {
                    for (int i = 0; i < clusters.getLength(); i++) {
                        final Node clusterNode = clusters.item(i);
                        if ("cluster".equals(clusterNode.getNodeName())) {
                            final String clusterName = getAttribute(clusterNode, CLUSTER_NAME_ATTR);
                            final Cluster cluster = clusterProvider.get();
                            cluster.setName(clusterName);
                            application.addClusterToClusters(cluster);
                            loadClusterHosts(clusterNode, cluster, hostMap);
                        }
                    }
                }
View Full Code Here


                                                   1, 1/* initX, initY */
                                                   1, 1); /* xPad, yPad */

        pane.add(inputPane);
        final JPanel hostsPane = new JPanel(new FlowLayout(FlowLayout.LEADING));
        final Cluster cluster = blockDevInfo.getHost().getCluster();
        hostCheckBoxes = Tools.getHostCheckBoxes(cluster);
        hostsPane.add(new JLabel("Select Hosts: "));
        final Host host = blockDevInfo.getHost();
        final String lv = blockDevInfo.getBlockDevice().getLogicalVolume();
        for (final Map.Entry<Host, JCheckBox> hostEntry : hostCheckBoxes.entrySet()) {
View Full Code Here

                        hostOptions.getUseSudo(),
                        false);
            }
        }
        for (final String clusterName : clusters.keySet()) {
            final Cluster cluster = clusterProvider.get();
            cluster.setName(clusterName);
            cluster.setSavable(false);
            application.addClusterToClusters(cluster);
            for (final HostOptions ho : clusters.get(clusterName)) {
                userConfig.setHostCluster(hostMap, cluster, ho.getHost(), !UserConfig.PROXY_HOST);
            }
        }
View Full Code Here

        application.waitForSwing();

        LoggerFactory.setDebugLevel(-1);
        final String username = TEST_USERNAME;
        final boolean useSudo = false;
        final Cluster cluster = clusterProvider.get();
        cluster.setName("test");
        for (int i = 1; i <= NUMBER_OF_HOSTS; i++) {
            final String hostName = "test" + i;
            final Host host = hostProvider.get();
            host.init();

            initHost(host, hostName, username, useSudo);
            hosts.add(host);
            host.setCluster(cluster);
            cluster.addHost(host);
            final String saveFile = application.getDefaultSaveFile();
            application.saveConfig(saveFile, false);
        }
        for (final Host host : hosts) {
            host.disconnect();
        }
        cluster.connect(null, true, 0);
        for (final Host host : hosts) {
            final boolean r = waitForCondition(
                new Condition() {
                    @Override
                    public boolean passed() {
                        return host.isConnected();
                    }
                }, 300, 20000);
            if (!r) {
                error("could not establish connection to " + host.getName());
            }
        }
        application.addClusterToClusters(cluster);
        application.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                clusterTabFactory.createClusterTab(cluster);
            }
        });
       
        //guiData.getEmptyBrowser().addClusterBox(cluster);
        final String saveFile = application.getDefaultSaveFile();
        application.saveConfig(saveFile, false);
        guiData.refreshClustersPanel();
       
        guiData.expandTerminalSplitPane(GUIData.TerminalSize.COLLAPSE);
        cluster.getClusterTab().addClusterView();
        cluster.getClusterTab().requestFocus();
        guiData.checkAddClusterButtons();
        for (final Host host : hosts) {
            host.waitForServerStatusLatch();
        }
        clusterLoaded = true;
View Full Code Here

        }
        bdPane.add(new JLabel(Tools.join(", ", bds)));
        pane.add(bdPane);
        final JPanel hostsPane = new JPanel(new FlowLayout(FlowLayout.LEADING));
        final Host host = blockDevInfos.get(0).getHost();
        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

                                                   1, 1/* initX, initY */
                                                   1, 1); /* xPad, yPad */

        pane.add(inputPane);
        final JPanel hostsPane = new JPanel(new FlowLayout(FlowLayout.LEADING));
        final Cluster cluster = selectedHosts.iterator().next().getCluster();
        hostCheckBoxes = Tools.getHostCheckBoxes(cluster);
        hostsPane.add(new JLabel("Select Hosts: "));
        for (final Map.Entry<Host, JCheckBox> hostEntry : hostCheckBoxes.entrySet()) {
            hostEntry.getValue().addItemListener(
                    new ItemListener() {
View Full Code Here

    @Test
    public void testIsInCluster() {
        for (final Host host : integrationTestLauncher.getHosts()) {
            assertTrue(host.isInCluster());
            assertTrue(host.isInCluster(null));
            assertTrue(host.isInCluster(new Cluster()));
        }
    }
View Full Code Here

        setResource(new Resource(name));
    }

    public void setParameters() {
        final DrbdXml dxml = getBrowser().getDrbdXml();
        final Cluster cluster = getCluster();
        for (final String hostName : dxml.getProxyHostNames()) {
            final Host proxyHost = cluster.getProxyHostByName(hostName);
            if (proxyHost == null) {
                final Host hp = hostFactory.createInstance();
                hp.setHostname(hostName);
                cluster.addProxyHost(hp);
                addProxyHostNode(hp);
            } else {
                if (proxyHostInfo != null && proxyHostInfo.getNode() == null) {
                    addProxyHostNode(proxyHost);
                }
View Full Code Here

                });
        repMenuItem.onUpdate(new Runnable() {
            @Override
            public void run() {
                repMenuItem.updateMenuComponents();
                final Cluster cluster = getHost().getCluster();
                final Host[] otherHosts = cluster.getHostsArray();
                final Collection<MyMenu> hostMenus = new ArrayList<MyMenu>();
                for (final Host oHost : otherHosts) {
                    if (oHost == getHost()) {
                        continue;
                    }
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.