Examples of GlobalInfo


Examples of lcmc.drbd.ui.resource.GlobalInfo

    final void installationDone() {
        final ClusterBrowser clusterBrowser = getHost().getBrowser().getClusterBrowser();
        if (clusterBrowser != null) {
            clusterBrowser.getHostDrbdParameters().clear();
            final GlobalInfo globalInfo = clusterBrowser.getGlobalInfo();
            globalInfo.clearPanelLists();
            globalInfo.updateDrbdInfo();
            globalInfo.resetInfoPanel();
            globalInfo.getInfoPanel();
        }
        checkInstallationDialog = checkInstallationFactory.get();
        checkInstallationDialog.init(getPreviousDialog().getPreviousDialog().getPreviousDialog().getPreviousDialog().getPreviousDialog(),
                                     getHost(),
                                     getDrbdInstallation());
View Full Code Here

Examples of lcmc.drbd.ui.resource.GlobalInfo

     */
    void checkAnswer(final String ans) {
        final ClusterBrowser clusterBrowser = getHost().getBrowser().getClusterBrowser();
        if (clusterBrowser != null) {
            clusterBrowser.getHostDrbdParameters().clear();
            final GlobalInfo globalInfo = clusterBrowser.getGlobalInfo();
            globalInfo.clearPanelLists();
            globalInfo.updateDrbdInfo();
            globalInfo.resetInfoPanel();
            globalInfo.getInfoPanel();
        }
        checkInstallation = checkInstallationProvider.get();
        checkInstallation.init(getPreviousDialog().getPreviousDialog().getPreviousDialog(),
                               getHost(),
                               getDrbdInstallation());
View Full Code Here

Examples of lcmc.drbd.ui.resource.GlobalInfo

    }

    @Test
    @Parameters(method="parametersForTestVersionBeforePacemaker")
    public void testVersionBeforePacemaker(final String pcmkVersion, final String hbVersion) {
        final GlobalInfo globalInfo = new GlobalInfo();
        final Host host = new Host();

        host.setPacemakerVersion(pcmkVersion);
        host.setHeartbeatVersion(hbVersion);
        assertTrue(Tools.versionBeforePacemaker(host));
View Full Code Here

Examples of lcmc.drbd.ui.resource.GlobalInfo

            proxyHost.setCluster(dri.getCluster());
            final NewProxyHostDialog newProxyHostDialog = newProxyHostDialogProvider.get();
            newProxyHostDialog.init(this, proxyHost, getDrbdVolumeInfo(), this, new DrbdInstallation());
            return newProxyHostDialog;
        }
        final GlobalInfo globalInfo = dri.getBrowser().getGlobalInfo();
        final boolean protocolInNetSection = globalInfo.atLeastVersion("8.4");
        if (globalInfo.getDrbdResources().size() <= 1) {
            for (final String commonP : COMMON_PARAMS) {
                if (!protocolInNetSection && DrbdXml.PROTOCOL_PARAM.equals(commonP)) {
                    continue;
                }
                final Widget wi = globalInfo.getWidget(commonP, null);
                if (wi == null) {
                    LOG.appError("widget for param: " + commonP + " was not created");
                    return null;
                }
                final Value value = dri.getComboBoxValue(commonP);
                globalInfo.getResource().setValue(commonP, value);
                wi.setValue(value);
            }
        }
        volumeDialog.init(this, getDrbdVolumeInfo());
        return volumeDialog;
View Full Code Here

Examples of lcmc.drbd.ui.resource.GlobalInfo

        commonPreferredValue.put(CRAM_HMAC_ALG_PARAM, new StringValue("sha1"));
        commonPreferredValue.put(SHARED_SECRET_PARAM, new StringValue(getRandomSecret()));
        commonPreferredValue.put(ON_IO_ERROR_PARAM, new StringValue("detach"));
        commonPreferredValue.put(PROXY_MEMLIMIT_PARAM, new StringValue("100", DrbdXml.getUnitMiBytes("")));
        commonPreferredValue.put(PROXY_PLUGIN_ZLIB_PARAM, new StringValue("level 9"));
        final GlobalInfo globalInfo = dri.getBrowser().getGlobalInfo();
        final boolean protocolInNetSection = globalInfo.atLeastVersion("8.4");
        if (globalInfo.getDrbdResources().size() <= 1) {
            for (final String commonP : COMMON_PARAMS) {
                if (!protocolInNetSection && DrbdXml.PROTOCOL_PARAM.equals(commonP)) {
                    continue;
                }
                final Widget widget = globalInfo.getWidget(commonP, null);
                if (widget == null) {
                    LOG.appError("widget for param: " + commonP + " was not created");
                    return new JPanel();
                }
                /* for the first resource set common options. */
                final Value commonValue = globalInfo.getResource().getValue(commonP);
                if (commonPreferredValue.containsKey(commonP)) {
                    final Value defaultValue = globalInfo.getParamDefault(commonP);
                    if (Tools.areEqual(defaultValue, commonValue)) {
                        widget.setValue(commonPreferredValue.get(commonP));
                        dri.getResource().setValue(commonP, commonPreferredValue.get(commonP));
                    } else {
                        dri.getResource().setValue(commonP, commonValue);
                    }
                }
            }
        } else {
            /* resource options, if not defined in common section. */
            for (final String commonP : COMMON_PARAMS) {
                final Value commonValue = globalInfo.getResource().getValue(commonP);
                if (commonValue == null || commonValue.isNothingSelected()
                    && commonPreferredValue.containsKey(commonP)) {
                    dri.getResource().setValue(commonP, commonPreferredValue.get(commonP));
                }
            }
View Full Code Here

Examples of org.xmlBlaster.contrib.GlobalInfo

  
  
   public GlobalInfo prepare(String[] args) throws Exception {
      cmdLineArgs = args;
      Global global = new Global(cmdLineArgs);
      GlobalInfo cfgInfo = createOwnGlobalInfo(global, null, "configuration");
      stopWatcherOnIU = fillInfoWithCommandLine(cmdLineArgs, cfgInfo);
      return cfgInfo;
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.GlobalInfo

      try {
         // I_Info cfgInfo = new PropertiesInfo(new Properties());
        
         ReplicationAgent agent = new ReplicationAgent();

         GlobalInfo cfgInfo = agent.prepare(args);
         I_Info readerInfo = agent.createReaderInfo(cfgInfo);
         I_Info writerInfo = agent.createWriterInfo(agent.prepare(args));
        
         if (ReplicationAgent.needsHelp(args)) {
            agent.displayHelp(readerInfo, writerInfo);
            System.exit(-1);
         }

         boolean isInteractive = cfgInfo.getBoolean("interactive", false);
         agent.init(readerInfo, writerInfo);

         log.info("REPLICATION AGENT IS NOW READY");
         if (isInteractive)
            agent.process(readerInfo, writerInfo);
View Full Code Here

Examples of org.xmlBlaster.contrib.GlobalInfo

         shutdownDbWatcher();
   }
  
   public void stopInitialUpdate() throws Exception {
      if (hasDbWatcher) {
         GlobalInfo cfgInfo = prepare(cmdLineArgs);
         I_Info readerInfo = createReaderInfo(cfgInfo);
         startDbWatcher(readerInfo);
         log.info("The DbWatcher has been successfully restarted");
      }
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.GlobalInfo

         global.getProperty().set("${test.replace.key}", "testReplaceKey");
         global.getProperty().set("${test.replace.key1}", "testReplaceKey1");
         global.getProperty().set("someKey3", "testReplaceKey1");
         global.getProperty().set("${test.replace.key}", "testReplaceKey");
         global.getProperty().set("test.replace.key", "someKey");
         GlobalInfo info = new OwnGlobalInfo();
         info.init(global, null);
         String val = info.get("someKey", null);
         assertNotNull("The value must be set", val);
         assertEquals("wrong value of replaced key", "testReplaceKey", val);

         val = info.get("${test.replace.key1}", null);
         assertNotNull("The value must be set", val);
        
         val = global.getProperty().get("someKey3", (String)null);
         assertNotNull("The value must be set", val);

        
         Properties props = new Properties();
         props.put("one", "one");
         val = props.getProperty("one");
         assertNotNull("The value must be set", val);

         props.remove("one");
         val = props.getProperty("one");
         assertNull("The value must NOT be set", val);
        
        
         global.getProperty().removeProperty("someKey3");
         val = global.getProperty().get("someKey3", (String)null);
         assertNull("The value must NOT be set", val);
        
         val = info.get("${test.replace.key}", null);
         assertNotNull("The value must be set", val);
        
         val = global.getProperty().get("someKey3", (String)null);
         assertNull("The value must NOT be set", val);
        
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.