You can subscribe to this list here.
2007 |
Jan
|
Feb
(65) |
Mar
(276) |
Apr
(544) |
May
(638) |
Jun
(225) |
Jul
(204) |
Aug
(294) |
Sep
(532) |
Oct
(506) |
Nov
(324) |
Dec
(359) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(208) |
Feb
(225) |
Mar
(248) |
Apr
(388) |
May
(222) |
Jun
(47) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ze...> - 2008-05-02 13:16:57
|
Author: chris Date: 2008-05-02 09:17:04 -0400 (Fri, 02 May 2008) New Revision: 9162 Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Configuration.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Main.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/OptionsFactory.java Log: * fixes #3089 * warn when --configfile is not specified * define some reasonable default values and use them if we can't load --configfile Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Configuration.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Configuration.java 2008-05-02 12:54:25 UTC (rev 9161) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Configuration.java 2008-05-02 13:17:04 UTC (rev 9162) @@ -50,6 +50,15 @@ /** + * Returns the value of the property requested, or the defaultValue + * of the property with the name provided does not exist. + */ + public String getProperty(String name, String defaultValue) { + return _properties.getProperty(name, defaultValue); + } + + + /** * Loads properties from the InputStream provided */ public void load(InputStream stream) Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Main.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Main.java 2008-05-02 12:54:25 UTC (rev 9161) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/Main.java 2008-05-02 13:17:04 UTC (rev 9162) @@ -127,6 +127,9 @@ } catch (IOException e) { _logger.error("failed to load configuration file", e); } + } else { + _logger.warn("no config file option (--" + CONFIG_FILE + ") specified"); + _logger.warn("only setting options based on command line arguments"); } for (String arg : _args) { @@ -173,14 +176,19 @@ private void startReactor() throws XmlRpcException, MalformedURLException { - String hubUrl = _config.getProperty(HUB_URL); - String confName = _config.getProperty(CONF_NAME); - String username = _config.getProperty(HUB_USERNAME); - String password = _config.getProperty(HUB_PASSWORD); - int cycleTime = Integer.valueOf(_config.getProperty(CYCLE_TIME)); - int poolSize = Integer.valueOf(_config.getProperty(JMX_POOL_SIZE)); - int timeout = Integer.valueOf(_config.getProperty(JMX_TIMEOUT)); + String hubUrl = _config.getProperty(HUB_URL, DEFAULT_HUB_URL); + String confName = _config.getProperty(CONF_NAME, DEFAULT_CONF_NAME); + String username = _config.getProperty(HUB_USERNAME, DEFAULT_HUB_USERNAME); + String password = _config.getProperty(HUB_PASSWORD, DEFAULT_HUB_PASSWORD); + String valueStr = _config.getProperty(CYCLE_TIME, DEFAULT_CYCLE_TIME); + int cycleTime = Integer.valueOf(valueStr); + valueStr = _config.getProperty(JMX_POOL_SIZE, DEFAULT_JMX_POOL_SIZE); + int poolSize = Integer.valueOf(valueStr); + + valueStr = _config.getProperty(JMX_TIMEOUT, DEFAULT_JMX_TIMEOUT); + int timeout = Integer.valueOf(valueStr); + XmlRpcClient client = new XmlRpcClient(hubUrl, confName); client.setCredentials(username, password); Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/OptionsFactory.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/OptionsFactory.java 2008-05-02 12:54:25 UTC (rev 9161) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/OptionsFactory.java 2008-05-02 13:17:04 UTC (rev 9162) @@ -40,7 +40,18 @@ public static final String JMX_TIMEOUT = "jmxTimeOut"; public static final String HELP = "help"; + // default values (also set in zenjmx.conf) + public static final String DEFAULT_HUB_URL = "http://localhost:8081/"; + public static final String DEFAULT_HUB_USERNAME = "admin"; + public static final String DEFAULT_HUB_PASSWORD = "zenoss"; + public static final String DEFAULT_CONF_NAME = "localhost"; + public static final String DEFAULT_COMPONENT_NAME = "zenjmx"; + public static final String DEFAULT_CYCLE = "False"; + public static final String DEFAULT_CYCLE_TIME = "300"; + public static final String DEFAULT_JMX_POOL_SIZE = "10"; + public static final String DEFAULT_JMX_TIMEOUT = "30"; + // singleton instance private static OptionsFactory _instance; |
From: <sv...@ze...> - 2008-05-02 12:54:17
|
Author: chris Date: 2008-05-02 08:54:25 -0400 (Fri, 02 May 2008) New Revision: 9161 Modified: trunk/zenpacks/zenpacks.spec Log: * do a full zenoss restart after the install * fixes #3084 * don't do two restarts on an upgrade situation Modified: trunk/zenpacks/zenpacks.spec =================================================================== --- trunk/zenpacks/zenpacks.spec 2008-05-01 21:44:56 UTC (rev 9160) +++ trunk/zenpacks/zenpacks.spec 2008-05-02 12:54:25 UTC (rev 9161) @@ -82,9 +82,9 @@ # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= %post -restart_zope() { - echo "Restarting Zope..." - su - zenoss -c "%{zenhome}/bin/zopectl restart" +restart() { + echo "Restarting Zenoss..." + su - zenoss -c "%{zenhome}/bin/zenoss restart" echo "" } @@ -118,11 +118,11 @@ echo "" done -restart_zope +restart # run these commands when upgrading (but not installing or reinstalling) if [ $1 -eq 2 -a "${PRODUCT_NAME}" = "zenoss" ] ; then - restart_zope + /bin/true fi # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
From: <sv...@ze...> - 2008-05-01 21:44:49
|
Author: chris Date: 2008-05-01 17:44:56 -0400 (Thu, 01 May 2008) New Revision: 9160 Modified: trunk/zenpacks/zenpacks.spec Log: * only restart zope once Modified: trunk/zenpacks/zenpacks.spec =================================================================== --- trunk/zenpacks/zenpacks.spec 2008-05-01 21:35:51 UTC (rev 9159) +++ trunk/zenpacks/zenpacks.spec 2008-05-01 21:44:56 UTC (rev 9160) @@ -116,10 +116,10 @@ echo "Installing ${PACK}..." su - zenoss -c "%{zenhome}/bin/zenpack ${INSTALL_ARGS} ${PACK}" echo "" - - restart_zope done +restart_zope + # run these commands when upgrading (but not installing or reinstalling) if [ $1 -eq 2 -a "${PRODUCT_NAME}" = "zenoss" ] ; then restart_zope |
From: <sv...@ze...> - 2008-05-01 21:35:44
|
Author: chris Date: 2008-05-01 17:35:51 -0400 (Thu, 01 May 2008) New Revision: 9159 Modified: trunk/inst/rpm/zenoss.spec Log: * fixes #3088 * wipe out the /tmp/renderserver when we're erased Modified: trunk/inst/rpm/zenoss.spec =================================================================== --- trunk/inst/rpm/zenoss.spec 2008-05-01 21:19:08 UTC (rev 9158) +++ trunk/inst/rpm/zenoss.spec 2008-05-01 21:35:51 UTC (rev 9159) @@ -411,7 +411,8 @@ %{zenhome}/Products \ %{zenhome}/log \ %{zenhome}/.fresh_install \ - %{zenhome}/.upgraded + %{zenhome}/.upgraded \ + /tmp/renderserver do rm -rf ${target} done |
From: <sv...@ze...> - 2008-05-01 21:19:02
|
Author: chris Date: 2008-05-01 17:19:08 -0400 (Thu, 01 May 2008) New Revision: 9158 Modified: trunk/zenpacks/zenpacks.spec Log: * restart zope after we install the zenpack. in the past we just restarted on an upgrade but we also need to restart when we install for the first time Modified: trunk/zenpacks/zenpacks.spec =================================================================== --- trunk/zenpacks/zenpacks.spec 2008-05-01 20:27:51 UTC (rev 9157) +++ trunk/zenpacks/zenpacks.spec 2008-05-01 21:19:08 UTC (rev 9158) @@ -81,6 +81,13 @@ # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= %post + +restart_zope() { + echo "Restarting Zope..." + su - zenoss -c "%{zenhome}/bin/zopectl restart" + echo "" +} + export ZENHOME=%{zenhome} export PATH="${ZENHOME}/bin:${PATH}" export PYTHONPATH="${ZENHOME}/lib/python" @@ -109,13 +116,13 @@ echo "Installing ${PACK}..." su - zenoss -c "%{zenhome}/bin/zenpack ${INSTALL_ARGS} ${PACK}" echo "" + + restart_zope done # run these commands when upgrading (but not installing or reinstalling) if [ $1 -eq 2 -a "${PRODUCT_NAME}" = "zenoss" ] ; then - echo "Restarting Zope..." - su - zenoss -c "%{zenhome}/bin/zopectl restart" - echo "" + restart_zope fi # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
From: <sv...@ze...> - 2008-05-01 20:27:43
|
Author: ecn Date: 2008-05-01 16:27:51 -0400 (Thu, 01 May 2008) New Revision: 9157 Modified: trunk/Products/DataCollector/zendisc.py Log: fixes #3086 Modified: trunk/Products/DataCollector/zendisc.py =================================================================== --- trunk/Products/DataCollector/zendisc.py 2008-05-01 20:23:16 UTC (rev 9156) +++ trunk/Products/DataCollector/zendisc.py 2008-05-01 20:27:51 UTC (rev 9157) @@ -42,9 +42,8 @@ name = 'zendisc' scanned = 0 - def __init__(self,noopts=0,app=None,single=True, - threaded=False,keeproot=True): - ZenModeler.__init__(self, noopts, app, single, threaded, keeproot) + def __init__(self,noopts=0,app=None,single=True, keeproot=True): + ZenModeler.__init__(self, noopts, app, single, keeproot) if not self.options.useFileDescriptor: self.openPrivilegedPort('--ping') self.discovered = [] |
From: <sv...@ze...> - 2008-05-01 20:23:08
|
Author: ecn Date: 2008-05-01 16:23:16 -0400 (Thu, 01 May 2008) New Revision: 9156 Modified: trunk/bin/zenoss Log: fixes #3085 Modified: trunk/bin/zenoss =================================================================== --- trunk/bin/zenoss 2008-05-01 19:24:46 UTC (rev 9155) +++ trunk/bin/zenoss 2008-05-01 20:23:16 UTC (rev 9156) @@ -65,7 +65,8 @@ C="$C zencommand" C="$C zenprocess" #C="$C zenmail" -if [ -f $ZENHOME/lib/python/pywmi.py ] +$ZENHOME/bin/python -c 'import pywmi' 2>/dev/null +if [ $? -eq 0 ] then C="$C zenwin" C="$C zeneventlog" |
From: <sv...@ze...> - 2008-05-01 19:24:43
|
Author: chris Date: 2008-05-01 15:24:46 -0400 (Thu, 01 May 2008) New Revision: 9155 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py Log: * use find_packages() rather than explicit package names. * fixes #3082 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) +++ trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py 2008-05-01 19:24:46 UTC (rev 9155) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) |
From: <sv...@ze...> - 2008-05-01 19:08:23
|
Author: chris Date: 2008-05-01 15:08:22 -0400 (Thu, 01 May 2008) New Revision: 9154 Modified: trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.FtpMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.NNTPMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.RPCMonitor/setup.py Log: * use find_packages() rather than explicit package names. * fixes #3082 Modified: trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.FtpMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.FtpMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.FtpMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -52,7 +52,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -81,4 +81,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.NNTPMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.NNTPMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.NNTPMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) Modified: trunk/zenpacks/ZenPacks.zenoss.RPCMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.RPCMonitor/setup.py 2008-05-01 15:37:40 UTC (rev 9153) +++ trunk/zenpacks/ZenPacks.zenoss.RPCMonitor/setup.py 2008-05-01 19:08:22 UTC (rev 9154) @@ -39,7 +39,7 @@ namespace_packages = NAMESPACE_PACKAGES, # Tell setuptools what packages this zenpack provides. - packages = PACKAGES, + packages = find_packages(), # Tell setuptools to figure out for itself which files to include # in the binary egg when it is built. @@ -68,4 +68,4 @@ # All ZenPack eggs must be installed in unzipped form. zip_safe = False, -) \ No newline at end of file +) |
From: <sv...@ze...> - 2008-05-01 15:37:34
|
Author: edahl Date: 2008-05-01 11:37:40 -0400 (Thu, 01 May 2008) New Revision: 9153 Modified: trunk/Products/DataCollector/zenmodeler.py Log: * add return to fix undefined client variable problem Modified: trunk/Products/DataCollector/zenmodeler.py =================================================================== --- trunk/Products/DataCollector/zenmodeler.py 2008-05-01 15:33:53 UTC (rev 9152) +++ trunk/Products/DataCollector/zenmodeler.py 2008-05-01 15:37:40 UTC (rev 9153) @@ -164,8 +164,8 @@ "Start the wmi collector" if self.options.nowmi: return + client = None try: - client = None plugins = self.selectPlugins(device, 'wmi') if not plugins: self.log.info("no wmi plugins found for %s" % device.id) @@ -177,6 +177,7 @@ client = WmiClient.WmiClient(device, self) if not client or not plugins: self.log.warn("wmi client creation failed") + return except (SystemExit, KeyboardInterrupt): raise except Exception: |
From: <sv...@ze...> - 2008-05-01 15:33:45
|
Author: abray Date: 2008-05-01 11:33:53 -0400 (Thu, 01 May 2008) New Revision: 9152 Modified: trunk/zendocs/DevGuide/devguide/model.xml Log: more devguide changes Modified: trunk/zendocs/DevGuide/devguide/model.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/model.xml 2008-05-01 15:33:07 UTC (rev 9151) +++ trunk/zendocs/DevGuide/devguide/model.xml 2008-05-01 15:33:53 UTC (rev 9152) @@ -394,4 +394,107 @@ </programlisting> </section> </section> + + <section> + <title>Zenoss Permissions</title> + + <para>In this example we'll be adding a new permission named "Example + Permission", assigning it to a method, then checking for that permission. + </para> + + <section> + <title>Adding New Permissions</title> + + <orderedlist> + <listitem> + <para>Add the new permission to + $ZENHOME/Products/ZenModel/ZenossSecurity.py</para> + + <para>ZenossSecurity.py is a file where all the string constants for + Zenoss permissions are held. By adding this line to + ZenossSecurity.py we've made a new constant that will be used to + assign to a method.</para> + + <para><programlisting> ZEN_EXAMPLE_PERMISSION='Example Permission'</programlisting></para> + </listitem> + + <listitem> + <para>Now that we have a "name" for the permission available, we + should add the permission to Zope. In + $ZENHOME/Products/ZenModel/ZentinalPortal.py there is a class named + PortalGenerator. There is a method named setupPermissions defined in + PortalGenerator.</para> + + <para>Here you'll see a group of calls to manage_permissions. Add a + new line to this method that adds your new permission.</para> + + <para><programlisting> mp(ZEN_EXAMPLE_PERMISSION, [ZEN_MANAGER_ROLE, MANAGER_ROLE], 1)</programlisting>The + first parameter is the permission. In this example the permission + being managed is ZEN_EXAMPLE_PERMISSION. The second parameter is the + list of default roles assigned to the permission. In this example + ZEN_MANAGER_ROLE and MANAGER_ROLE are set as defaults. The third + argument is the acquired flag. When the flag is set to true, the + permissions will be acquired in addition to the ones + specified.</para> + </listitem> + + <listitem> + <para>To make your permission official you'll need to use this + permission. Apply your newly added permission to a method. See the + next section on assigning permissions to a method. Your permission + must be delcared and used by a method to make it a valid + permission.</para> + </listitem> + </orderedlist> + </section> + + <section> + <title>Assigning Permissions to a Method</title> + + <orderedlist> + <listitem> + <para>Import your your new permission:<programlisting> from Products.ZenModel.ZenossSecurity import *</programlisting></para> + </listitem> + + <listitem> + <para>Import ClassSecurityInfo. In most cases we have set + ClassSecurityInfo to security</para> + + <para><programlisting> from AccessControl import ClassSecurityInfo + security = ClassSecurityInfo()</programlisting></para> + </listitem> + + <listitem> + <para>Above the method definition add this line of code</para> + + <para><programlisting> security.declareProtected(ZEN_EXAMPLE_PERMISSION, 'exampleMethod') + def exampleMethod(self): + ...</programlisting>The first parameter to declareProtected is the + permission to be set on the method. In this case the permission is + ZEN_EXAMPLE_PERMISSION. The second parameter is the name of the + method. In this case the name of the method is exampleMethod.</para> + + <para></para> + </listitem> + </orderedlist> + </section> + + <section> + <title>Checking Links</title> + + <orderedlist> + <listitem> + <para>To check permission on a object, call checkRemotePerm.</para> + + <para><programlisting> self.checkRemotePerm(ZEN_EXAMPLE_PERMISSION, foo)</programlisting>The + first parameter is the permission to check. In this case the + permission is ZEN_EXAMPLE_PERMISSION. The second parameter is the + object being checked. In this case the name of the object is foo. + This call will check if foo has the ZEN_EXAMPLE_PERMISSION.</para> + </listitem> + </orderedlist> + + <para></para> + </section> + </section> </chapter> \ No newline at end of file |
From: <sv...@ze...> - 2008-05-01 15:33:03
|
Author: abray Date: 2008-05-01 11:33:07 -0400 (Thu, 01 May 2008) New Revision: 9151 Modified: trunk/zendocs/DevGuide/devguide/ui.xml Log: devguide changes Modified: trunk/zendocs/DevGuide/devguide/ui.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/ui.xml 2008-05-01 15:30:36 UTC (rev 9150) +++ trunk/zendocs/DevGuide/devguide/ui.xml 2008-05-01 15:33:07 UTC (rev 9151) @@ -55,9 +55,9 @@ <para>Zope page templates are a combination of METAL, TAL and TALES, each of which is summarized more succinctly than one familiar with them might - expect here: </para> + expect here:</para> - <para> http://www.owlfish.com/software/simpleTAL/tal-guide.html </para> + <para>http://www.owlfish.com/software/simpleTAL/tal-guide.html</para> <para>In short: METAL allows templates to define macros (which are essentially subtemplates that may be called by other templates) and slots @@ -79,7 +79,7 @@ </tal:block> </body> </html></programlisting>Then on a template that might be used to - view an object, one could: </para> + view an object, one could:</para> <para><programlisting> <tal:block metal:use-macro="here/base/macros/base_template"> <tal:block metal:fill-slot="subtitle"> @@ -89,7 +89,7 @@ My Content </tal:block> </tal:block></programlisting>This allows for relatively complex - abstraction. </para> + abstraction.</para> <para>Zenoss has a base template providing several basic page types that include global CSS and javascript resources, the basic page structure, and @@ -100,25 +100,25 @@ <para>TAL comprises a set of attributes for page elements allowing for iteration loops, dynamic attribute mutation, and other dynamic content. - The above resource will summarize these more fully. </para> + The above resource will summarize these more fully.</para> <para>TALES allows access to the template's namespace. Some useful properties available on all templates:</para> - <para> here: the context object </para> + <para>here: the context object</para> - <para> container: the folder containing the context object </para> + <para>container: the folder containing the context object</para> - <para> template: the template object </para> + <para>template: the template object</para> - <para> root: the portal object (zport) </para> + <para>root: the portal object (zport)</para> - <para> user: the current authenticated user object </para> + <para>user: the current authenticated user object</para> - <para> request: the current HttpRequest object </para> + <para>request: the current HttpRequest object</para> - <para> portal_url: the base url of the portal - ('http://localhost:8080/zport') </para> + <para>portal_url: the base url of the portal + ('http://localhost:8080/zport')</para> <para>TALES accepts paths (e.g. here/id) which it resolves into object properties. It will attempt to resolve the final path element as a key @@ -127,7 +127,7 @@ mydict[mykey]. If 'getSomething' is a method on the context, 'here/getSomething' will return the result of that method. However, if here.getSomething() returns a dictionary, one cannot do - 'here/getSomething/mykey'. </para> + 'here/getSomething/mykey'.</para> <para>The path resolution is fairly limited -- for example, one cannot pass arguments to methods. In case something more complex is needed, one @@ -224,11 +224,254 @@ </section> <section> - <title>Adding Menu Items</title> + <title>Creating a Dialog</title> + <para>The dialog container exists on every page in Zenoss; it's a DIV with + the id 'dialog'. Loading a dialog comprises 1) Fetching (via an XHR) HTML + to display inside the dialog container, and 2) Showing the dialog + container. These can be accomplished by calling the show() method on the + dialog container, passing the event and a URL that will return the + contents:</para> + + <para><programlisting> $('dialog').show(this.event, 'dialog_MyDialog')</programlisting>The + dialog can then be hidden with, predictably, $('dialog').hide(). Since + dialogs are almost always loaded via clicking on a menu item, menu items + whose isdialog attribute is True will generate the javascript to show the + dialog automatically. See the "Menus" section of this guide for more + information.'</para> + + <para>As for the dialog box contents themselves, any valid HTML will do, + but certain conventions exist. Dialogs should have a header:</para> + + <para><programlisting> <h2>Perform Action</h2></programlisting>Dialogs + should also provide a cancel button: </para> + + <para><programlisting> <input id="dialog_cancel" type="button" value="Cancel" + onclick="$('dialog').hide()"/></programlisting>The main wrinkle + with dialogs occurs in the area of form submission. Some dialogs are + self-contained, and can carry their own form that is created and submitted + just like any other form. Other dialogs, however, submit forms that exist + elsewhere on the page -- for example, dialogs that perform actions against + multiple rows checked in a table. These dialogs may use the submit_form + method on the dialog container, which submits the form surrounding the + menu item that caused the dialog to be loaded to the url passed in to the + method. Thus for a table surrounded by a <form> and containing + several checkboxes, dialogs loaded by menu items in the table's menu may + submit the table's form to a url by providing a button:</para> + + <para><programlisting> <input type="submit" name="doAction:method" value="Do It" + tal:attributes="onclick string: + $('dialog').submit_form('${here/absolute_url_path}')"/></programlisting>See + the section on "Zope Templates" for more information about tal:attributes + and the "${here/absolute_url_path}" syntax.</para> + + <para>Finally, dialogs that create objects should validate the desired id + before submitting. A method on the dialog container called + submit_form_and_check(), which accepts the same parameter as submit_form() + (URL), will do this. It requires:</para> + + <orderedlist> + <listitem> + <para>A text box with the id 'new_id', the value of which will be + checked</para> + </listitem> + + <listitem> + <para>A hidden input field with the id "checkValidIdPath", with a + value containing the path in which the id should be valid (for + example, creating a device under /zport/dmd/Devices will require + checking that no other devices in /zport/dmd/Devices has the same id, + so the value of checkValidIdPath should be "/zport/dmd/Devices". + here/getPrimaryUrlPath works well for most cases)</para> + </listitem> + + <listitem> + <para>An element with the id 'errmsg' into which the error message + from the validation method, if any, will be put</para> + </listitem> + </orderedlist> + + <para>For example, a generic object creation dialog:</para> + + <para><programlisting> <h2>Create Object</h2> + <span id="errmsg" style="color:red;"></span> + <br/> + <span>ID: </span> + <input id="new_id" name="id"/> + <input type="hidden" id="checkValidIdPath" + tal:attributes="value here/getPrimaryUrlPath"/> + <br/> + <input tal:attributes="onclick string: + return $$('dialog').submit_form_and_check('${here/getPrimaryUrlPath}')" + id="dialog_submit" + type="submit" + value="Create" + name="createObject:method"/> + <input id="dialog_cancel" type="button" value="Cancel" + onclick="$('dialog').hide()"/> +</programlisting>These examples will cover most cases; generally, a good idea + is to look at other dialog templates that contain similar elements or + perform similar actions.</para> + <para></para> </section> + <section> + <title>Adding a New Menu or Menu Item</title> + + <para>Classes that inherit from the ZenMenuable mixin have a method called + getMenus, which traverses up the object's path aggregating ZenMenuItem + objects owned by its ancestors. These objects comprise an action to be + executed, a human-readable description, and various attributes restricting + the objects to which the item is applicable.</para> + + <para>For example, imagine basic menus exist on dmd and + dmd.Devices:</para> + + <para><programlisting> dmd + More (menu) + See more... (menu item) + Do more... + Manage + Manage object... + dmd.Devices + More + See more... + Do less...</programlisting>A call to dmd.Devices.getMenus() will + return: </para> + + <para><programlisting> More + See more... (from dmd.Devices) + Do more... (from dmd) + Do less... (from dmd.Devices) + Manage + Manage object... (from dmd)</programlisting>As you can see, menu items + inherit their ancestors' unless they define their own, which override when + their ancestors' conflict.</para> + + <para>In theory, all ZenMenuables (which includes nearly all objects in + Zenoss) may own menu items; in practice, all but a few menus live on + /zport/dmd.</para> + + <para>Adding a new menu item is fairly straightforward. Because menu items + are persistent objects, modifications must happen in a migrate script (or + be included as XML in a ZenPack). The method ZenMenuable.buildMenus + accepts a dictionary of menus, each of which is a list of dictionaries + representing the attributes of menu items. Instructions on writing migrate + scripts can be found elsewhere in this guide.</para> + + <para></para> + + <orderedlist> + <listitem> + <para>Find the id of the menu to which you wish to add items. The + simplest way to do this is to locate the menu_ids definition on the + page template that renders the menu. Tables will have a single menu + id. The page menu may have several, which will be rendered as + submenus. The "TopLevel" menu is a special case; it appears in the + page menu, but its items are rendered as siblings of the other + menus.</para> + + <para></para> + </listitem> + + <listitem> + <para>If activating the menu item will require a dialog, create one. + See the "Dialogs" section of this guide for more info.</para> + + <para></para> + </listitem> + + <listitem> + <para>Determine the objects for which the menu item should be visible. + Menu items will use several criteria for determining whether to + apply:</para> + + <itemizedlist> + <listitem> + <para>allowed_classes: A list of strings of class names for which + the menu item should be rendered.</para> + + <para></para> + </listitem> + + <listitem> + <para>banned_classes: A list of strings of class names for which + the menu item should not be rendered.</para> + + <para></para> + </listitem> + + <listitem> + <para>banned_ids: A list of strings of object ids for which the + menu item should not be rendered.</para> + + <para></para> + </listitem> + + <listitem> + <para> isglobal: Whether the menu item should be inherited by + children of the menu item's owner.</para> + + <para></para> + </listitem> + + <listitem> + <para>permissions: The permissions the current user must have for + the context in order for the item to render.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> + <para>Figure out the action the menu item will perform. If it's a + dialog, then the action is the name of the dialog template, and the + isdialog attribute of the menu item should be True. If it's a regular + link, the action should be the URL or "javascript:" you would normally + have as the href attribute of an anchor.</para> + + <para></para> + </listitem> + + <listitem> + <para>Now build the dictionary. It should look like this, where MenuId + is the menu from step 1:</para> + + <para><programlisting> menus = { 'MenuId': [ + { 'id': 'myUniqueId', + 'description': 'Perform My Action...', + 'action': 'dialog_myAction', + 'isdialog': True, + 'allowed_classes': ('MyGoodClass',), + 'banned_classes': ('MyBadClass',), + 'banned_ids': ('Devices',), + 'ordering': 50.0, + 'permissions': (ZenossSecurity.ZEN_COMMON,) + }, + ]}</programlisting> 'ordering' is a float determining the item's + relative position in the menu. Greater numbers mean the item will be + placed higher. Also notice that it's almost certainly pointless to set + both 'allowed_classes' and 'banned_classes'; it was done here only as + an example. The permission ZEN_COMMON is a standard Zenoss permission + -- see the "Permissions" section of this guide for more + information.</para> + + <para>If you have more menu items in the same menu, you can add them + to that list; if you have more menus, you can create more keys in the + menus dictionary.</para> + </listitem> + + <listitem> + <para>Finally, use the dmd.buildMenus method to create the + MenuItems:</para> + + <para><programlisting> dmd.buildMenus(menus)</programlisting></para> + </listitem> + </orderedlist> + + <para></para> + </section> + <section xml:id="ui_creating_tables"> <title>Creating a Table Using ZenTableManager</title> |
From: <sv...@ze...> - 2008-05-01 15:30:30
|
Author: edahl Date: 2008-05-01 11:30:36 -0400 (Thu, 01 May 2008) New Revision: 9150 Modified: trunk/Products/ZenEvents/SyslogProcessing.py trunk/Products/ZenEvents/zensyslog.py Log: * SyslogProcessing was trying to use self.options which is only defined in the zensyslog daemon. As a result no events would be sent Modified: trunk/Products/ZenEvents/SyslogProcessing.py =================================================================== --- trunk/Products/ZenEvents/SyslogProcessing.py 2008-05-01 15:25:18 UTC (rev 9149) +++ trunk/Products/ZenEvents/SyslogProcessing.py 2008-05-01 15:30:36 UTC (rev 9150) @@ -62,10 +62,11 @@ class SyslogProcessor(object): - def __init__(self, sendEvent, minpriority, parsehost, defaultPriority): + def __init__(self,sendEvent,minpriority,parsehost,monitor,defaultPriority): self.minpriority = minpriority self.parsehost = parsehost self.sendEvent = sendEvent + self.monitor = monitor self.defaultPriority = defaultPriority @@ -85,7 +86,7 @@ evt = self.parseTag(evt, msg) #rest of msg now in summary of event evt = self.buildEventClassKey(evt) - evt['monitor'] = self.options.monitor + evt['monitor'] = self.monitor self.sendEvent(evt) Modified: trunk/Products/ZenEvents/zensyslog.py =================================================================== --- trunk/Products/ZenEvents/zensyslog.py 2008-05-01 15:25:18 UTC (rev 9149) +++ trunk/Products/ZenEvents/zensyslog.py 2008-05-01 15:30:36 UTC (rev 9150) @@ -132,6 +132,7 @@ self.processor = SyslogProcessor(self.sendEvent, self.options.minpriority, self.options.parsehost, + self.options.monitor, driver.next()) self.log.info("Configuration finished") return drive(inner) |
From: <sv...@ze...> - 2008-05-01 15:25:14
|
Author: edahl Date: 2008-05-01 11:25:18 -0400 (Thu, 01 May 2008) New Revision: 9149 Modified: trunk/Products/ZenEvents/tests/sendSyslog.py Log: * change default send address to localhost Modified: trunk/Products/ZenEvents/tests/sendSyslog.py =================================================================== --- trunk/Products/ZenEvents/tests/sendSyslog.py 2008-05-01 14:54:57 UTC (rev 9148) +++ trunk/Products/ZenEvents/tests/sendSyslog.py 2008-05-01 15:25:18 UTC (rev 9149) @@ -18,4 +18,4 @@ m = '''<165>%s localhost myproc[10]: %%%% It's time to make the do-nuts. %%%% Ingredients: Mix=OK, Jelly=OK # Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport: Conveyer1=OK, Conveyer2=OK # %%%%''' % now now = time.strftime('%b %d %T') m = '''<165>%s foo@win2003 myproc[10]: %%%% It's time to make the do-nuts. %%%% Ingredients: Mix=OK, Jelly=OK # Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport: Conveyer1=OK, Conveyer2=OK # %%%%''' % now -s.sendto(m, ('192.168.1.102', 514) ) +s.sendto(m, ('127.0.0.1', 514) ) |
From: <sv...@ze...> - 2008-05-01 14:54:51
|
Author: ecn Date: 2008-05-01 10:54:57 -0400 (Thu, 01 May 2008) New Revision: 9148 Modified: trunk/inst/shared-functions.sh Log: do not sed zensocket, it loses setuid Modified: trunk/inst/shared-functions.sh =================================================================== --- trunk/inst/shared-functions.sh 2008-05-01 14:16:20 UTC (rev 9147) +++ trunk/inst/shared-functions.sh 2008-05-01 14:54:57 UTC (rev 9148) @@ -70,5 +70,6 @@ shebang() { # replace the first line of any python sh-bang script with # #!/usr/bin/env python - sed -i '1,1 s%#!.*python$%#!/usr/bin/env python%' $ZENHOME/bin/* + ls -1 $ZENHOME/bin/* | grep -v zensocket | xargs \ + sed -i '1,1 s%#!.*python$%#!/usr/bin/env python%' } |
From: <sv...@ze...> - 2008-05-01 14:16:12
|
Author: ecn Date: 2008-05-01 10:16:20 -0400 (Thu, 01 May 2008) New Revision: 9147 Modified: trunk/bin/zenoss_init_post trunk/bin/zenoss_upgrade_pre Log: fix the shebang on upgrade, too Modified: trunk/bin/zenoss_init_post =================================================================== --- trunk/bin/zenoss_init_post 2008-05-01 14:13:24 UTC (rev 9146) +++ trunk/bin/zenoss_init_post 2008-05-01 14:16:20 UTC (rev 9147) @@ -42,4 +42,3 @@ # add localhost as a device to zenoss add_localhost_device -shebang Modified: trunk/bin/zenoss_upgrade_pre =================================================================== --- trunk/bin/zenoss_upgrade_pre 2008-05-01 14:13:24 UTC (rev 9146) +++ trunk/bin/zenoss_upgrade_pre 2008-05-01 14:16:20 UTC (rev 9147) @@ -48,8 +48,10 @@ /usr/bin/replace /usr/bin/python $ZENHOME/bin/python -- $ZENHOME/bin/* 2>/dev/null /usr/bin/replace /usr/bin/python $ZENHOME/bin/python -- $ZENHOME/etc/zeo.conf +# set the python shebang to be the proper python +shebang + # migrate the zeo database start_zeodb run_zenmigrate stop_zeodb - |
From: <sv...@ze...> - 2008-05-01 14:13:16
|
Author: ecn Date: 2008-05-01 10:13:24 -0400 (Thu, 01 May 2008) New Revision: 9146 Modified: trunk/bin/zenoss_init_post trunk/bin/zenoss_init_pre Log: force shebang on startup and upgrade Modified: trunk/bin/zenoss_init_post =================================================================== --- trunk/bin/zenoss_init_post 2008-05-01 14:11:22 UTC (rev 9145) +++ trunk/bin/zenoss_init_post 2008-05-01 14:13:24 UTC (rev 9146) @@ -42,3 +42,4 @@ # add localhost as a device to zenoss add_localhost_device +shebang Modified: trunk/bin/zenoss_init_pre =================================================================== --- trunk/bin/zenoss_init_pre 2008-05-01 14:11:22 UTC (rev 9145) +++ trunk/bin/zenoss_init_pre 2008-05-01 14:13:24 UTC (rev 9146) @@ -38,6 +38,9 @@ . ${ZENHOME}/bin/shared-functions.sh . ${ZENHOME}/bin/install-functions.sh +# set the python shebang line +shebang + # create the log directory mkdir -p ${ZENHOME}/log |
From: <sv...@ze...> - 2008-05-01 14:11:14
|
Author: ecn Date: 2008-05-01 10:11:22 -0400 (Thu, 01 May 2008) New Revision: 9145 Modified: trunk/inst/shared-functions.sh Log: set the shebang line Modified: trunk/inst/shared-functions.sh =================================================================== --- trunk/inst/shared-functions.sh 2008-05-01 13:59:48 UTC (rev 9144) +++ trunk/inst/shared-functions.sh 2008-05-01 14:11:22 UTC (rev 9145) @@ -66,3 +66,9 @@ echo "export $VARIABLE=\"${VALUE}\"" >> ${FILE} fi } + +shebang() { + # replace the first line of any python sh-bang script with + # #!/usr/bin/env python + sed -i '1,1 s%#!.*python$%#!/usr/bin/env python%' $ZENHOME/bin/* +} |
From: <sv...@ze...> - 2008-05-01 13:59:40
|
Author: ecn Date: 2008-05-01 09:59:48 -0400 (Thu, 01 May 2008) New Revision: 9144 Modified: trunk/bin/zensnpp Log: consistent spacing for sh-bang Modified: trunk/bin/zensnpp =================================================================== --- trunk/bin/zensnpp 2008-04-30 20:34:26 UTC (rev 9143) +++ trunk/bin/zensnpp 2008-05-01 13:59:48 UTC (rev 9144) @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python ############################################################################# # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2008, Zenoss Inc. |
From: <sv...@ze...> - 2008-04-30 20:34:20
|
Author: marc Date: 2008-04-30 16:34:26 -0400 (Wed, 30 Apr 2008) New Revision: 9143 Modified: trunk/bin/runtests Log: * On the appliance zopectl isn't in ZOPEHOME but in ZENHOME, all zenoss instances have zopectl in ZENHOME. fixes #3077 Modified: trunk/bin/runtests =================================================================== --- trunk/bin/runtests 2008-04-30 17:31:09 UTC (rev 9142) +++ trunk/bin/runtests 2008-04-30 20:34:26 UTC (rev 9143) @@ -50,7 +50,7 @@ def runUnitTests(packages=[], regex=None, coverage=False): for prod in findTestableProducts(packages, regex): - parts = [ zopehome('bin', 'zopectl'), 'test'] + parts = [ zenhome('bin', 'zopectl'), 'test'] if coverage: parts.append('--coverage') parts.extend(['--libdir', zenhome('Products', prod)]) if regex: parts.append(regex) |
From: <sv...@ze...> - 2008-04-30 17:31:05
|
Author: edahl Date: 2008-04-30 13:31:09 -0400 (Wed, 30 Apr 2008) New Revision: 9142 Modified: trunk/Products/DataCollector/DeviceProxy.py Log: * for some reason _snmpStatus isn't always defined on a DeviceProxy. Used getattr with a default argument to handle this situation more gracefully Modified: trunk/Products/DataCollector/DeviceProxy.py =================================================================== --- trunk/Products/DataCollector/DeviceProxy.py 2008-04-30 16:51:00 UTC (rev 9141) +++ trunk/Products/DataCollector/DeviceProxy.py 2008-04-30 17:31:09 UTC (rev 9142) @@ -24,7 +24,7 @@ return DateTime(float(self._snmpLastCollection)) def getSnmpStatus(self): - return self._snmpStatus + return getattr(self, '_snmpStatus', 0) getSnmpStatusNumber = getSnmpStatus def getId(self): |
From: <sv...@ze...> - 2008-04-30 16:50:53
|
Author: edahl Date: 2008-04-30 12:51:00 -0400 (Wed, 30 Apr 2008) New Revision: 9141 Modified: trunk/Products/DataCollector/zenmodeler.py Log: * client variable could be referenced before it was assigned Modified: trunk/Products/DataCollector/zenmodeler.py =================================================================== --- trunk/Products/DataCollector/zenmodeler.py 2008-04-30 15:24:36 UTC (rev 9140) +++ trunk/Products/DataCollector/zenmodeler.py 2008-04-30 16:51:00 UTC (rev 9141) @@ -165,6 +165,7 @@ if self.options.nowmi: return try: + client = None plugins = self.selectPlugins(device, 'wmi') if not plugins: self.log.info("no wmi plugins found for %s" % device.id) |
From: <sv...@ze...> - 2008-04-30 15:24:30
|
Author: chris Date: 2008-04-30 11:24:36 -0400 (Wed, 30 Apr 2008) New Revision: 9140 Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/jmx/JmxClient.java Log: * remove the _url = null assignment * this is a band-aid solution to get us past a higher level synchronization bug we will troubleshoot in the future. for some reason the JmxClient connections are being re-used by JmxCalls even though they should not be. each new JmxCall should create a new JmxClient and for an unknown reason (possibly due to the _calls field in the Reactor) they are not. Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/jmx/JmxClient.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/jmx/JmxClient.java 2008-04-29 20:50:11 UTC (rev 9139) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/jmx/JmxClient.java 2008-04-30 15:24:36 UTC (rev 9140) @@ -142,7 +142,6 @@ _connector = null; _server = null; _creds = null; - _url = null; } |
From: <sv...@ze...> - 2008-04-29 20:50:04
|
Author: ian Date: 2008-04-29 16:50:11 -0400 (Tue, 29 Apr 2008) New Revision: 9139 Modified: trunk/Products/ZenEvents/skins/zenevents/actionRuleWindowDetail.pt Log: * Fixes #3044: Removed apparently useless input box on action rule schedule screen Modified: trunk/Products/ZenEvents/skins/zenevents/actionRuleWindowDetail.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/actionRuleWindowDetail.pt 2008-04-29 19:48:50 UTC (rev 9138) +++ trunk/Products/ZenEvents/skins/zenevents/actionRuleWindowDetail.pt 2008-04-29 20:50:11 UTC (rev 9139) @@ -89,9 +89,6 @@ tal:content="e" tal:attributes="value e; selected python:e==here.repeat"/> </select> - every - <input class="tablevalues" name="skip" - tal:attributes="value here/skip" size="5"/> </td> </tr> <tr> |
From: <sv...@ze...> - 2008-04-29 19:48:56
|
Author: edahl Date: 2008-04-29 15:48:50 -0400 (Tue, 29 Apr 2008) New Revision: 9138 Modified: trunk/Products/ZenModel/GraphGroup.py Log: * GraphGroup had improperly defined relationship Modified: trunk/Products/ZenModel/GraphGroup.py =================================================================== --- trunk/Products/ZenModel/GraphGroup.py 2008-04-29 19:02:35 UTC (rev 9137) +++ trunk/Products/ZenModel/GraphGroup.py 2008-04-29 19:48:50 UTC (rev 9138) @@ -54,7 +54,8 @@ _relations = ( ('report', - ToOne(ToMany, 'Products.ZenModel.MultiGraphReport', 'graphGroups')), + ToOne(ToManyCont, 'Products.ZenModel.MultiGraphReport', + 'graphGroups')), ) factory_type_information = ( |