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...> - 2007-04-10 21:00:51
|
Author: chris Date: 2007-04-10 17:00:50 -0400 (Tue, 10 Apr 2007) New Revision: 4620 Modified: trunk/Products/ZenEvents/zensyslog.py Log: refs #1200. added support so that we can write the raw message to the log or the prettied up version Modified: trunk/Products/ZenEvents/zensyslog.py =================================================================== --- trunk/Products/ZenEvents/zensyslog.py 2007-04-10 20:57:02 UTC (rev 4619) +++ trunk/Products/ZenEvents/zensyslog.py 2007-04-10 21:00:50 UTC (rev 4620) @@ -100,7 +100,13 @@ """Use a separate thread to process the request.""" ipaddr, port = client_address if self.options.logorig: - self.olog.info(self.expand(msg, client_address)) + if self.options.logformat == 'human': + message = self.expand(msg, client_address) + else: + message = msg + + self.olog.info(message) + lookupPointer(ipaddr,timeout=(1,)).addBoth(self.gotHostname, (msg,ipaddr,time.time()) ) @@ -130,6 +136,9 @@ self.parser.add_option('--logorig', dest='logorig', action="store_true", default=False, help="log the original message") + self.parser.add_option('--logformat', + dest='logformat', default="human", + help="human (/var/log/messages) or raw (wire)") self.parser.add_option('--debug', dest='debug', action="store_true", default=False, help="debug mode no threads") |
From: <sv...@ze...> - 2007-04-10 20:57:02
|
Author: marc Date: 2007-04-10 16:57:02 -0400 (Tue, 10 Apr 2007) New Revision: 4619 Removed: trunk/Products/ZenModel/migrate/zWinServices.py Modified: trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/migrate/__init__.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt trunk/Products/ZenModel/tests/testIpRouteEntry.py Log: #1195 * Hiding tables when no items exists * Removed zWinServices property, no longer used Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-10 20:23:50 UTC (rev 4618) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-10 20:57:02 UTC (rev 4619) @@ -628,7 +628,6 @@ # Windows WMI collector properties devs._setProperty("zWinUser", "") devs._setProperty("zWinPassword", "") - devs._setProperty("zWinServices", False, type="boolean") devs._setProperty("zWinEventlogMinSeverity", 2, type="int") devs._setProperty("zWinEventlog", False, type="boolean") Modified: trunk/Products/ZenModel/migrate/__init__.py =================================================================== --- trunk/Products/ZenModel/migrate/__init__.py 2007-04-10 20:23:50 UTC (rev 4618) +++ trunk/Products/ZenModel/migrate/__init__.py 2007-04-10 20:57:02 UTC (rev 4619) @@ -71,5 +71,4 @@ import zlocal import evenbetterstandarderrormessage import zCollectorPlugins -import hubqueue -import zWinServices \ No newline at end of file +import hubqueue \ No newline at end of file Deleted: trunk/Products/ZenModel/migrate/zWinServices.py Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 20:23:50 UTC (rev 4618) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 20:57:02 UTC (rev 4619) @@ -7,7 +7,9 @@ <form method="post" tal:attributes="action here/absolute_url" name="ipInterfaceListForm"> -<tal:block tal:define="unused here/cacheComponents; +<tal:block + tal:condition="here/interfaces/countObjects" + tal:define="unused here/cacheComponents; tableName string:interfacelist; objects here/interfaces/objectValuesAll; tabletitle string:Interfaces; @@ -61,7 +63,7 @@ 'misc_/SiteScopeParser/redball_img')"> </td> <td class="tablevalues"> - <a class=tablevalues tal:content="intf/getInterfaceName" + <a class=tablevalues tal:content="intf/viewName" tal:attributes="href intf/getPrimaryUrlPath">eth0</a> </td> <td class="tablevalues"> @@ -105,12 +107,12 @@ </tal:block> </form> -<form method="post" - tal:condition="python:here.deviceClass().zenPropertyString('zWinServices')" - tal:attributes="action here/absolute_url" +<form method="post" tal:attributes="action here/absolute_url" name="winServiceListForm"> -<tal:block tal:define="tableName string:winserviceslist; +<tal:block + tal:condition="here/winservices/countObjects" + tal:define="tableName string:winserviceslist; objects here/winservices/objectValuesAll; tabletitle string:Win Services; batch python:here.ZenTableManager.getBatch(tableName,objects, @@ -177,7 +179,9 @@ <form method="post" tal:attributes="action here/absolute_url" name="osProcessListForm"> -<tal:block tal:define="tableName string:osprocesslist; +<tal:block + tal:condition="here/processes/countObjects" + tal:define="tableName string:osprocesslist; objects here/processes/objectValuesAll; tabletitle string:OS Processes; batch python:here.ZenTableManager.getBatch(tableName,objects, @@ -253,6 +257,7 @@ name="ipServiceListForm"> <tal:block metal:define-macro="ipserviceList" + tal:condition="here/ipservices/countObjects" tal:define="tableName string:ipservicelist; objects here/ipservices/objectValuesAll; tabletitle string:IP Services; @@ -332,6 +337,7 @@ name="fileSystemListForm"> <tal:block metal:define-macro="fileSysList" + tal:condition="here/filesystems/countObjects" tal:define="tableName string:fileSyslist; objects here/filesystems/objectValuesAll; tabletitle string:File Systems; @@ -426,6 +432,7 @@ name="ipRouteEntryListForm"> <tal:block metal:define-macro="routeTableList" + tal:condition="here/routes/countObjects" tal:define="tableName string:routeTablelist; objects here/routes/objectValuesAll; tabletitle string:Routes; Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 20:23:50 UTC (rev 4618) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 20:57:02 UTC (rev 4619) @@ -1,6 +1,6 @@ -<h2>Add , componentNames=[], REQUEST=None)rocess</h2> +<h2>Add OSProcess</h2> <p> -What would you like to name your , componentNames=[], REQUEST=None)rocess?<br/> +What would you like to name your OSProcess?<br/> </p> <input type="hidden" name="userCreated" value="True"> <br/> @@ -14,8 +14,8 @@ </select><br/> </p> <div id="dialog_buttons"> -<input type="submit" name="add, componentNames=[], REQUEST=None)rocess:method" - value="Yes, Create this , componentNames=[], REQUEST=None)rocess" +<input type="submit" name="addOSProcess:method" + value="Yes, Create this OSProcess" tal:attributes="onclick string:return $$('dialog').submit_form( '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" Modified: trunk/Products/ZenModel/tests/testIpRouteEntry.py =================================================================== --- trunk/Products/ZenModel/tests/testIpRouteEntry.py 2007-04-10 20:23:50 UTC (rev 4618) +++ trunk/Products/ZenModel/tests/testIpRouteEntry.py 2007-04-10 20:57:02 UTC (rev 4619) @@ -80,13 +80,13 @@ self.rEntry.setInterfaceIndex(0) self.assert_(self.rEntry.getInterfaceIndex() == 0) self.assert_(self.rEntry.getInterfaceName() == 'test0') - self.assert_(self.rEntry.getInterfaceNameString() == 'iface0') + self.assert_(self.rEntry.getInterfaceName() == 'iface0') self.assert_(self.rEntry.getInterfaceIp() == '1.2.3.4') self.rEntry.setInterfaceIndex(1) self.assert_(self.rEntry.getInterfaceIndex() == 1) self.assert_(self.rEntry.getInterfaceName() == 'test1') - self.assert_(self.rEntry.getInterfaceNameString() == 'iface1') + self.assert_(self.rEntry.getInterfaceName() == 'iface1') self.assert_(self.rEntry.getInterfaceIp() == '2.3.4.5') @@ -94,13 +94,13 @@ self.rEntry.setInterfaceName('test0') self.assert_(self.rEntry.getInterfaceIndex() == 0) self.assert_(self.rEntry.getInterfaceName() == 'test0') - self.assert_(self.rEntry.getInterfaceNameString() == 'iface0') + self.assert_(self.rEntry.getInterfaceName() == 'iface0') self.assert_(self.rEntry.getInterfaceIp() == '1.2.3.4') self.rEntry.setInterfaceName('test1') self.assert_(self.rEntry.getInterfaceIndex() == 1) self.assert_(self.rEntry.getInterfaceName() == 'test1') - self.assert_(self.rEntry.getInterfaceNameString() == 'iface1') + self.assert_(self.rEntry.getInterfaceName() == 'iface1') self.assert_(self.rEntry.getInterfaceIp() == '2.3.4.5') |
From: <sv...@ze...> - 2007-04-10 20:23:49
|
Author: marc Date: 2007-04-10 16:23:50 -0400 (Tue, 10 Apr 2007) New Revision: 4618 Modified: trunk/Products/ZenModel/OSProcess.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt trunk/Products/ZenModel/skins/zenmodel/dialog_deleteComponent.pt Log: #1193 * Fixed delete menu Modified: trunk/Products/ZenModel/OSProcess.py =================================================================== --- trunk/Products/ZenModel/OSProcess.py 2007-04-10 20:15:05 UTC (rev 4617) +++ trunk/Products/ZenModel/OSProcess.py 2007-04-10 20:23:50 UTC (rev 4618) @@ -19,6 +19,7 @@ """make an os process""" context._setObject(id, OSProcess(id)) osp = context._getOb(id) + setattr(osp, 'procName', id) if className == '/': className = '' orgPath = "/Processes%s" % className classPath = "%s/osProcessClasses/%s" % (orgPath, id) Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-10 20:15:05 UTC (rev 4617) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-10 20:23:50 UTC (rev 4618) @@ -87,7 +87,7 @@ ), {'action': 'dialog_lock', 'allowed_classes': ['Device', - 'WinService' + 'WinService', 'FileSystem', 'HardDisk', 'IpInterface', @@ -99,8 +99,7 @@ 'isdialog': True, 'permissions': ('Change Device',)}, {'action': 'dialog_deleteComponent', - 'allowed_classes': ['Device', - 'WinService' + 'allowed_classes': ['WinService', 'FileSystem', 'HardDisk', 'IpInterface', Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 20:15:05 UTC (rev 4617) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 20:23:50 UTC (rev 4618) @@ -1,6 +1,6 @@ -<h2>Add OSProcess</h2> +<h2>Add , componentNames=[], REQUEST=None)rocess</h2> <p> -What would you like to name your OSProcess?<br/> +What would you like to name your , componentNames=[], REQUEST=None)rocess?<br/> </p> <input type="hidden" name="userCreated" value="True"> <br/> @@ -14,8 +14,8 @@ </select><br/> </p> <div id="dialog_buttons"> -<input type="submit" name="addOSProcess:method" - value="Yes, Create this OSProcess" +<input type="submit" name="add, componentNames=[], REQUEST=None)rocess:method" + value="Yes, Create this , componentNames=[], REQUEST=None)rocess" tal:attributes="onclick string:return $$('dialog').submit_form( '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteComponent.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_deleteComponent.pt 2007-04-10 20:15:05 UTC (rev 4617) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_deleteComponent.pt 2007-04-10 20:23:50 UTC (rev 4618) @@ -6,7 +6,7 @@ <input type="submit" name="manage_deleteComponent:method" value="Yes, Delete this object" tal:attributes="onclick string:return $$('dialog').submit_form( - 'lockableForm', '${here/absolute_url_path}')" /> + '${here/absolute_url_path}','lockableForm')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> |
From: <sv...@ze...> - 2007-04-10 20:15:04
|
Author: marc Date: 2007-04-10 16:15:05 -0400 (Tue, 10 Apr 2007) New Revision: 4617 Modified: trunk/Products/ZenModel/migrate/menus.py Log: #1195 * Add component menu items Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-10 19:29:16 UTC (rev 4616) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-10 20:15:05 UTC (rev 4617) @@ -66,50 +66,51 @@ if hasmenus(dmd.Networks): dmd.Networks.zenMenus.removeRelation() dmd.buildMenus( - {'Edit':[ - {'action': 'objRRDTemplate', - 'allowed_classes': ['Device', - 'FileSystem', - 'HardDisk', - 'IpInterface', - 'OSProcess'], - 'description': 'PerfConf', - 'id': 'objRRDTemplate', - 'permissions': ('Change Device',)}, - dict( - id= 'addToZenPack', - description='Add to ZenPack...', - action= 'dialog_addToZenPack', - permissions=('View',), - isdialog = True, - allowed_classes = ['ZenPackable'], - ), - {'action': 'dialog_lock', - 'allowed_classes': ['Device', - 'WinService' - 'FileSystem', - 'HardDisk', - 'IpInterface', - 'IpService', - 'OSProcess', - 'IpRouteEntry'], - 'description': 'Lock', - 'id': 'lockObject', - 'isdialog': True, - 'permissions': ('Change Device',)}, - {'action': 'dialog_delete', - 'allowed_classes': ['Device', - 'WinService' - 'FileSystem', - 'HardDisk', - 'IpInterface', - 'IpService', - 'OSProcess', - 'IpRouteEntry'], - 'description': 'Delete', - 'id': 'deleteObject', - 'isdialog': True, - 'permissions': ('Change Device',)}, + { + 'Edit':[ + {'action': 'objRRDTemplate', + 'allowed_classes': ['Device', + 'FileSystem', + 'HardDisk', + 'IpInterface', + 'OSProcess'], + 'description': 'PerfConf', + 'id': 'objRRDTemplate', + 'permissions': ('Change Device',)}, + dict( + id= 'addToZenPack', + description='Add to ZenPack...', + action= 'dialog_addToZenPack', + permissions=('View',), + isdialog = True, + allowed_classes = ['ZenPackable'], + ), + {'action': 'dialog_lock', + 'allowed_classes': ['Device', + 'WinService' + 'FileSystem', + 'HardDisk', + 'IpInterface', + 'IpService', + 'OSProcess', + 'IpRouteEntry'], + 'description': 'Lock', + 'id': 'lockObject', + 'isdialog': True, + 'permissions': ('Change Device',)}, + {'action': 'dialog_deleteComponent', + 'allowed_classes': ['Device', + 'WinService' + 'FileSystem', + 'HardDisk', + 'IpInterface', + 'IpService', + 'OSProcess', + 'IpRouteEntry'], + 'description': 'Delete', + 'id': 'deleteObject', + 'isdialog': True, + 'permissions': ('Change Device',)}, {'action': 'editStatusMonitorConf', 'allowed_classes': ['StatusMonitorConf'], 'description': 'Edit', @@ -245,6 +246,54 @@ 'description': 'Edit', 'id': 'serviceClassEdit', 'permissions': ('Manage DMD',)}, + dict( + id= 'addIpInterface', + description='Add IpInterface...', + action= 'dialog_addIpInterface', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), + dict( + id= 'addOSProcess', + description='Add OSProcess...', + action= 'dialog_addOSProcess', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), + dict( + id= 'addFileSystem', + description='Add File System...', + action= 'dialog_addFileSystem', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), + dict( + id= 'addIpRouteEntry', + description='Add Route...', + action= 'dialog_addIpRouteEntry', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), + dict( + id= 'addIpService', + description='Add IpService...', + action= 'dialog_addIpService', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), + dict( + id= 'addWinService', + description='Add WinService...', + action= 'dialog_addWinService', + isdialog = True, + permissions=('Change Device',), + allowed_classes = ['OperatingSystem'], + ), ], 'Organizer_list': [ ZenPackItems, |
From: <sv...@ze...> - 2007-04-10 19:29:18
|
Author: chris Date: 2007-04-10 15:29:16 -0400 (Tue, 10 Apr 2007) New Revision: 4616 Modified: trunk/Products/ZenEvents/zensyslog.py Log: fixes #1200. based on RFC 3164. tries to handle the less-than-spectacular RFC compliance that sysklogd offers in syslog message bodies. Modified: trunk/Products/ZenEvents/zensyslog.py =================================================================== --- trunk/Products/ZenEvents/zensyslog.py 2007-04-10 19:00:34 UTC (rev 4615) +++ trunk/Products/ZenEvents/zensyslog.py 2007-04-10 19:29:16 UTC (rev 4616) @@ -33,7 +33,10 @@ class ZenSyslog(DatagramProtocol, EventServer): name = 'zensyslog' + SYSLOG_DATE_FORMAT = '%b %d %H:%M:%S' + SAMPLE_DATE = 'Apr 10 15:19:22' + def __init__(self): EventServer.__init__(self) self.changeUser() @@ -54,11 +57,50 @@ reactor.listenUDP(self.options.syslogport, self) + def expand(self, msg, client_address): + """expands a syslog message into a string format suitable for writing + to the filesystem such that it appears the same as it would + had the message been logged by the syslog daemon.""" + + # pri := facility * severity + stop = msg.find('>') + pri = msg[1:stop] + + # check for a datestamp. default to right now if date not present + start = stop + 1 + stop = start + len(ZenSyslog.SAMPLE_DATE) + dateField = msg[start:stop] + try: + date = time.strptime(dateField, ZenSyslog.SYSLOG_DATE_FORMAT) + year = time.localtime()[0] + date = (year,) + date[1:] + start = stop + 1 + except ValueError: + # date not present, so use today's date + date = time.localtime() + + # check for a hostname. default to localhost if not present + stop = msg.find(' ', start) + if msg[stop - 1] == ':': + hostname = client_address[0] + else: + hostname = msg[start:stop] + start = stop + 1 + + # the message content + body = msg[start:] + + # assemble the message + prettyTime = time.strftime(ZenSyslog.SYSLOG_DATE_FORMAT, date) + message = '%s %s %s' % (prettyTime, hostname, body) + return message + + def datagramReceived(self, msg, client_address): """Use a separate thread to process the request.""" ipaddr, port = client_address - if self.options.logorig: - self.olog.info(msg) + if self.options.logorig: + self.olog.info(self.expand(msg, client_address)) lookupPointer(ipaddr,timeout=(1,)).addBoth(self.gotHostname, (msg,ipaddr,time.time()) ) |
From: <sv...@ze...> - 2007-04-10 19:01:55
|
Author: marc Date: 2007-04-10 15:00:34 -0400 (Tue, 10 Apr 2007) New Revision: 4615 Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt Log: #1197 * changed here/os to here Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -11,7 +11,7 @@ <input type="submit" name="addFileSystem:method" value="Yes, Create this FileSystem" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -10,7 +10,7 @@ <input type="submit" name="addIpInterface:method" value="Yes, Create this IpInterface" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -27,7 +27,7 @@ <input type="submit" name="addIpRouteEntry:method" value="Yes, Create this Route" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -15,7 +15,7 @@ <input type="submit" name="addIpService:method" value="Yes, Create this IpService" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -17,7 +17,7 @@ <input type="submit" name="addOSProcess:method" value="Yes, Create this OSProcess" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt 2007-04-10 18:24:50 UTC (rev 4614) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt 2007-04-10 19:00:34 UTC (rev 4615) @@ -12,7 +12,7 @@ <input type="submit" name="addWinService:method" value="Yes, Create this WinService" tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/os/absolute_url_path}', 'addComponent')" /> + '${here/absolute_url_path}', 'addComponent')" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> \ No newline at end of file |
From: <sv...@ze...> - 2007-04-10 18:24:51
|
Author: jstevens Date: 2007-04-10 14:24:50 -0400 (Tue, 10 Apr 2007) New Revision: 4614 Modified: trunk/Products/ZenModel/skins/zenmodel/login_form.pt Log: * Bumped copyright year from 2006 to 2007 Modified: trunk/Products/ZenModel/skins/zenmodel/login_form.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/login_form.pt 2007-04-10 17:50:22 UTC (rev 4613) +++ trunk/Products/ZenModel/skins/zenmodel/login_form.pt 2007-04-10 18:24:50 UTC (rev 4614) @@ -39,7 +39,7 @@ </div></div> <div id="loginboxbottom"> </div> </div></div> -<p id="info">Copyright © 2006 Zenoss, Inc. | +<p id="info">Copyright © 2007 Zenoss, Inc. | Version <span tal:content="here/dmd/About/getZenossVersionShort" /></p> <img src="dark_loginbox_bottom_blue.gif" width="622" height="34" /></div> </body> |
From: <sv...@ze...> - 2007-04-10 17:50:22
|
Author: chris Date: 2007-04-10 13:50:22 -0400 (Tue, 10 Apr 2007) New Revision: 4613 Modified: trunk/inst/docs/INSTALL_RHEL5.txt Log: removed perl related stuff. need to double check these but i'm pretty sure they will work Modified: trunk/inst/docs/INSTALL_RHEL5.txt =================================================================== --- trunk/inst/docs/INSTALL_RHEL5.txt 2007-04-10 17:35:00 UTC (rev 4612) +++ trunk/inst/docs/INSTALL_RHEL5.txt 2007-04-10 17:50:22 UTC (rev 4613) @@ -11,32 +11,21 @@ packages Zenoss depends on in order to properly function. To run yum, issue the following command: - # yum -y install mysql mysql-server net-snmp perl-Digest-HMAC + # yum -y install mysql mysql-server net-snmp -2. Zenoss also depends on some RPMs that are not included in YUM - distributions. These dependencies are bundled together in the - "zenoss-deps" distribution for your convenience. Download the - zenoss-deps from the Zenoss downloads page under "Zenoss Red Hat - RPM Dependencies", and install them using the following command: - - # wget http://dev.zenoss.org/downloads/zenoss-deps-rhel5-1.1.2.i386.tar.bz2 - # tar xjf zenoss-deps-rhel5-1.1.2.i386.tar.bz2 - # cd zenoss-deps; rpm -Uvh *.rpm - - -3. Download the latest Zenoss RPM from the SourceForge downloads +2. Download the latest Zenoss RPM from the SourceForge downloads page, and install it using the following command: # rpm -ivh zenoss-1.1.2-0.rhel5.i386.rpm -4. Start Zenoss using the command: +3. Start Zenoss using the command: # /etc/init.d/zenoss start -5. Open a hole in the firewall policy to allow inbound TCP traffic to +4. Open a hole in the firewall policy to allow inbound TCP traffic to port 8080. This allows you to view the Zenoss Console. # iptables -I RH-Firewall-1-INPUT -p tcp --dport 8080 -j ACCEPT |
From: <sv...@ze...> - 2007-04-10 17:35:03
|
Author: marc Date: 2007-04-10 13:35:00 -0400 (Tue, 10 Apr 2007) New Revision: 4612 Modified: trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt trunk/Products/ZenModel/skins/zenmodel/performanceTemplates.pt Log: #1196 * Removed "Templates" tab * Added "All performance templates" menu item Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-10 15:31:06 UTC (rev 4611) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-10 17:35:00 UTC (rev 4612) @@ -117,11 +117,6 @@ , 'action' : 'viewHistoryEvents' , 'permissions' : ( permissions.view, ) }, - { 'id' : 'performanceTemplates' - , 'name' : 'Templates' - , 'action' : 'performanceTemplates' - , 'permissions' : ( permissions.view, ) - }, ) }, ) Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-10 15:31:06 UTC (rev 4611) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-10 17:35:00 UTC (rev 4612) @@ -214,6 +214,11 @@ 'description': 'Edit', 'id': 'osProcessClassEdit', 'permissions': ('Manage DMD',)}, + {'action': 'performanceTemplates', + 'allowed_classes': ['DeviceClass'], + 'description': 'All Performance Templates', + 'id': 'performanceTemplates', + 'permissions': ('View Device',)}, {'action': 'perfConfig', 'allowed_classes': ['DeviceClass'], 'description': 'Perf Config', Modified: trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt 2007-04-10 15:31:06 UTC (rev 4611) +++ trunk/Products/ZenModel/skins/zenmodel/perfConfig.pt 2007-04-10 17:35:00 UTC (rev 4612) @@ -9,7 +9,7 @@ objects here/getRRDTemplates; showfilterbox python:True; batch python:here.ZenTableManager.getBatch(tableName,objects); - tabletitle string:Performance Templates; "> + tabletitle string:Available Performance Templates; "> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> <tal:block metal:fill-slot="zentablecontents"> Modified: trunk/Products/ZenModel/skins/zenmodel/performanceTemplates.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/performanceTemplates.pt 2007-04-10 15:31:06 UTC (rev 4611) +++ trunk/Products/ZenModel/skins/zenmodel/performanceTemplates.pt 2007-04-10 17:35:00 UTC (rev 4612) @@ -6,9 +6,9 @@ <tal:block metal:define-macro="rrdtemplatelist" tal:define=" tableName string:rrdtemplatelist; - objects here/getAllRRDTemplates; + objects here/dmd/Devices/getAllRRDTemplates; batch python:here.ZenTableManager.getBatch(tableName,objects); - tabletitle string:Performance Templates; "> + tabletitle string:All Performance Templates; "> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> <tal:block metal:fill-slot="zentablecontents"> |
From: <sv...@ze...> - 2007-04-10 15:31:06
|
Author: edahl Date: 2007-04-10 11:31:06 -0400 (Tue, 10 Apr 2007) New Revision: 4611 Modified: trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/OperatingSystem.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt Log: * modify !OperatingSystem.py so that we can add a global menu that is specific to the OS tab on a device. This menu will have adds for all device components. If there is nothing in a component table the table will not be shown. Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-10 14:42:08 UTC (rev 4610) +++ trunk/Products/ZenModel/Device.py 2007-04-10 15:31:06 UTC (rev 4611) @@ -259,7 +259,7 @@ }, { 'id' : 'osdetail' , 'name' : 'OS' - , 'action' : 'deviceOsDetail' + , 'action' : 'os/deviceOsDetail' , 'permissions' : (permissions.view, ) }, { 'id' : 'hwdetail' Modified: trunk/Products/ZenModel/OperatingSystem.py =================================================================== --- trunk/Products/ZenModel/OperatingSystem.py 2007-04-10 14:42:08 UTC (rev 4610) +++ trunk/Products/ZenModel/OperatingSystem.py 2007-04-10 15:31:06 UTC (rev 4611) @@ -61,6 +61,62 @@ 'egp', 'ggp', 'hello', 'rip', 'is-is', 'es-is', 'ciscoIgrp', 'bbnSpfIgrp', 'ospf', 'bgp') + factory_type_information = ( + { + 'id' : 'Device', + 'meta_type' : 'Device', + 'description' : """Base class for all devices""", + 'icon' : 'Device_icon.gif', + 'product' : 'ZenModel', + 'factory' : 'manage_addDevice', + 'immediate_view' : 'deviceOsDetail', + 'actions' : + ( + { 'id' : 'status' + , 'name' : 'Status' + , 'action' : '../deviceStatus' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'osdetail' + , 'name' : 'OS' + , 'action' : 'deviceOsDetail' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'hwdetail' + , 'name' : 'Hardware' + , 'action' : '../deviceHardwareDetail' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'swdetail' + , 'name' : 'Software' + , 'action' : '../deviceSoftwareDetail' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'events' + , 'name' : 'Events' + , 'action' : '../viewEvents' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'historyEvents' + , 'name' : 'History' + , 'action' : '../viewHistoryEvents' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'perfServer' + , 'name' : 'Perf' + , 'action' : '../viewDevicePerformance' + , 'permissions' : (permissions.view, ) + }, + { 'id' : 'viewHistory' + , 'name' : 'Changes' + , 'action' : '../viewHistory' + , 'permissions' : (permissions.view, ) + }, + ) + }, + ) + + def __init__(self): id = "os" Software.__init__(self, id) @@ -68,12 +124,6 @@ # but doens't have os relationship - def __call__(self, REQUEST=None): - pp = self.getPrimaryParent() - screen = getattr(pp, "deviceOsDetail", False) - if not screen: return pp() - return screen() - def totalSwapString(self): return self.totalSwap and convToUnits(self.totalSwap) or 'unknown' Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 14:42:08 UTC (rev 4610) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 15:31:06 UTC (rev 4611) @@ -9,7 +9,7 @@ <tal:block tal:define="unused here/cacheComponents; tableName string:interfacelist; - objects here/os/interfaces/objectValuesAll; + objects here/interfaces/objectValuesAll; tabletitle string:Interfaces; batch python:here.ZenTableManager.getBatch(tableName,objects); menu_id string:IpInterface" @@ -111,7 +111,7 @@ name="winServiceListForm"> <tal:block tal:define="tableName string:winserviceslist; - objects here/os/winservices/objectValuesAll; + objects here/winservices/objectValuesAll; tabletitle string:Win Services; batch python:here.ZenTableManager.getBatch(tableName,objects, sortedHeader='caption'); @@ -178,7 +178,7 @@ name="osProcessListForm"> <tal:block tal:define="tableName string:osprocesslist; - objects here/os/processes/objectValuesAll; + objects here/processes/objectValuesAll; tabletitle string:OS Processes; batch python:here.ZenTableManager.getBatch(tableName,objects, sortedHeader='getOSProcessClass'); @@ -254,7 +254,7 @@ <tal:block metal:define-macro="ipserviceList" tal:define="tableName string:ipservicelist; - objects here/os/ipservices/objectValuesAll; + objects here/ipservices/objectValuesAll; tabletitle string:IP Services; batch python:here.ZenTableManager.getBatch(tableName,objects, sortedHeader='getPort'); @@ -333,7 +333,7 @@ <tal:block metal:define-macro="fileSysList" tal:define="tableName string:fileSyslist; - objects here/os/filesystems/objectValuesAll; + objects here/filesystems/objectValuesAll; tabletitle string:File Systems; batch python:here.ZenTableManager.getBatch(tableName,objects, sortedHeader='mount'); @@ -427,7 +427,7 @@ <tal:block metal:define-macro="routeTableList" tal:define="tableName string:routeTablelist; - objects here/os/routes/objectValuesAll; + objects here/routes/objectValuesAll; tabletitle string:Routes; batch python:here.ZenTableManager.getBatch(tableName,objects); menu_id string:IpRouteEntry"> |
From: <sv...@ze...> - 2007-04-10 14:42:37
|
Author: edahl Date: 2007-04-10 10:42:08 -0400 (Tue, 10 Apr 2007) New Revision: 4610 Modified: trunk/Products/ZenModel/IpRouteEntry.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt Log: * fix interface name issues Modified: trunk/Products/ZenModel/IpRouteEntry.py =================================================================== --- trunk/Products/ZenModel/IpRouteEntry.py 2007-04-10 14:02:12 UTC (rev 4609) +++ trunk/Products/ZenModel/IpRouteEntry.py 2007-04-10 14:42:08 UTC (rev 4610) @@ -138,13 +138,13 @@ if ipobj: return ipobj.device() - security.declareProtected('View', 'getInterfaceNameString') - def getInterfaceNameString(self): + security.declareProtected('View', 'getInterfaceName') + def getInterfaceName(self): """Return the interface name for this route as a string. If no interface is found return 'No Interface'. """ if self.interface(): - return self.interface().name + return self.interface().name() return "No Interface" @@ -228,10 +228,6 @@ else: log.warn("interface '%s' not found", intname) - def getInterfaceName(self): - return self.interface.getRelatedId() - - def getInterfaceIp(self): int = self.interface() if int: return int.getIp() Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 14:02:12 UTC (rev 4609) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 14:42:08 UTC (rev 4610) @@ -61,7 +61,7 @@ 'misc_/SiteScopeParser/redball_img')"> </td> <td class="tablevalues"> - <a class=tablevalues tal:content="intf/viewName" + <a class=tablevalues tal:content="intf/getInterfaceName" tal:attributes="href intf/getPrimaryUrlPath">eth0</a> </td> <td class="tablevalues"> @@ -442,7 +442,7 @@ <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'getNextHopIp','NextHop')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'getInterfaceNameString','Interface')"/> + tableName,'getInterfaceName','Interface')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'routeproto','Protocol')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -469,7 +469,7 @@ <td class="tablevalues"> <a tal:attributes="href route/getInterfaceLink; class string:tablevalues" - tal:content="route/getInterfaceNameString">eth0</a> + tal:content="route/getInterfaceName">eth0</a> </td> <td class="tablevalues" tal:content="route/routeproto"/> <td class="tablevalues" tal:content="route/routetype"/> |
From: <sv...@ze...> - 2007-04-10 14:02:39
|
Author: marc Date: 2007-04-10 10:02:12 -0400 (Tue, 10 Apr 2007) New Revision: 4609 Added: trunk/Products/ZenModel/migrate/zWinServices.py Modified: trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/IpInterface.py trunk/Products/ZenModel/migrate/__init__.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt trunk/Products/ZenModel/skins/zenmodel/viewIpInterface.pt Log: #748 * Hides WInServices when zWinServices is False, default behavior * Fix IpInterface name Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-10 12:06:36 UTC (rev 4608) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-10 14:02:12 UTC (rev 4609) @@ -633,7 +633,7 @@ # Windows WMI collector properties devs._setProperty("zWinUser", "") devs._setProperty("zWinPassword", "") - #devs._setProperty("zWinServices", "") + devs._setProperty("zWinServices", False, type="boolean") devs._setProperty("zWinEventlogMinSeverity", 2, type="int") devs._setProperty("zWinEventlog", False, type="boolean") Modified: trunk/Products/ZenModel/IpInterface.py =================================================================== --- trunk/Products/ZenModel/IpInterface.py 2007-04-10 12:06:36 UTC (rev 4608) +++ trunk/Products/ZenModel/IpInterface.py 2007-04-10 14:02:12 UTC (rev 4609) @@ -354,7 +354,7 @@ """Return the name of this interface. """ if self.interfaceName: return self.interfaceName - elif self.name(): return self.name() + elif self.viewName(): return self.viewName() else: return "None" security.declareProtected('View', 'getInterfaceMacaddress') Modified: trunk/Products/ZenModel/migrate/__init__.py =================================================================== --- trunk/Products/ZenModel/migrate/__init__.py 2007-04-10 12:06:36 UTC (rev 4608) +++ trunk/Products/ZenModel/migrate/__init__.py 2007-04-10 14:02:12 UTC (rev 4609) @@ -72,3 +72,4 @@ import evenbetterstandarderrormessage import zCollectorPlugins import hubqueue +import zWinServices \ No newline at end of file Added: trunk/Products/ZenModel/migrate/zWinServices.py Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 12:06:36 UTC (rev 4608) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 14:02:12 UTC (rev 4609) @@ -61,7 +61,7 @@ 'misc_/SiteScopeParser/redball_img')"> </td> <td class="tablevalues"> - <a class=tablevalues tal:content="intf/getInterfaceName" + <a class=tablevalues tal:content="intf/viewName" tal:attributes="href intf/getPrimaryUrlPath">eth0</a> </td> <td class="tablevalues"> @@ -105,8 +105,10 @@ </tal:block> </form> -<form method="post" tal:attributes="action here/absolute_url" - name="winServiceListForm"> +<form method="post" + tal:condition="python:here.deviceClass().zenPropertyString('zWinServices')" + tal:attributes="action here/absolute_url" + name="winServiceListForm"> <tal:block tal:define="tableName string:winserviceslist; objects here/os/winservices/objectValuesAll; Modified: trunk/Products/ZenModel/skins/zenmodel/viewIpInterface.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/viewIpInterface.pt 2007-04-10 12:06:36 UTC (rev 4608) +++ trunk/Products/ZenModel/skins/zenmodel/viewIpInterface.pt 2007-04-10 14:02:12 UTC (rev 4609) @@ -19,11 +19,11 @@ <tr> <td class="tableheader" align=left>Name</td> <td class="tablevalues" tal:condition="not:here/isManager" - tal:content="here/name">eth0</td> + tal:content="here/viewName">eth0</td> <td class="tablevalues" tal:condition="here/isManager"> <input tal:attributes="class string:tablevalues; - name string:name; - value here/name"> + name string:interfaceName; + value here/interfaceName"> </td> <td class="tableheader" align=left>MAC Address</td> <td class="tablevalues" tal:condition="not:here/isManager" |
From: <sv...@ze...> - 2007-04-10 12:06:36
|
Author: ian Date: 2007-04-10 08:06:36 -0400 (Tue, 10 Apr 2007) New Revision: 4608 Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/dialog.js Log: * Reposition dialog and overlay if scrolled Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/dialog.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/dialog.js 2007-04-10 03:35:50 UTC (rev 4607) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/dialog.js 2007-04-10 12:06:36 UTC (rev 4608) @@ -49,15 +49,21 @@ }, show: function(form, url) { if (url) this.fetch(url); + console.log('52'); this.form = form; var dims = getViewportDimensions(); + var vPos = getViewportPosition(); setStyle(this.box, {'z-index':'1','display':'block'}); var bdims = getElementDimensions(this.box); - setStyle(this.box, {'z-index':'5001','display':'none'}); + console.log(this.box); + setStyle(this.box, {'z-index':'10002','display':'none'}); + map(function(menu) {setStyle(menu, {'z-index':'9000'})}, + concat($$('.menu'), $$('.devmovemenu'))); setElementDimensions(this.dimbg, getViewportDimensions()); + setElementPosition(this.dimbg, getViewportPosition()); setElementPosition(this.box, { - x:(dims.w/2)-(bdims.w/2), - y:(dims.h/2)-(bdims.h/2) + x:((dims.w+vPos.x)/2)-(bdims.w/2), + y:((dims.h+vPos.y)/2)-(bdims.h/2) }); this.moveBox('front'); //connect(this.dimbg, 'onclick', bind(this.hide, this)); |
From: <sv...@ze...> - 2007-04-10 03:35:50
|
Author: jstevens Date: 2007-04-09 23:35:50 -0400 (Mon, 09 Apr 2007) New Revision: 4607 Modified: trunk/Products/ZenModel/migrate/Migrate.py Log: More graceful handling of invoking script via previous method of specifying run, help, etc. Modified: trunk/Products/ZenModel/migrate/Migrate.py =================================================================== --- trunk/Products/ZenModel/migrate/Migrate.py 2007-04-10 03:07:52 UTC (rev 4606) +++ trunk/Products/ZenModel/migrate/Migrate.py 2007-04-10 03:35:50 UTC (rev 4607) @@ -106,7 +106,8 @@ useDatabaseVersion = True def __init__(self): - ZenScriptBase.__init__(self, connect=True) + ZenScriptBase.__init__(self, connect=False) + self.connect() self.allSteps = allSteps[:] self.allSteps.sort() @@ -210,6 +211,22 @@ self.message("Migration successful") + def parseOptions(self): + ZenScriptBase.parseOptions(self) + if self.args: + if self.args == ['run']: + sys.stderr.write('Use of "run" is depracated.\n') + elif self.args == ['help']: + sys.stderr.write('Use of "help" is depracated,' + 'use --help instead.\n') + self.parser.print_help() + self.parser.exit() + elif self.args[0]: + self.parser.error('Unrecognized option(s): %s\n' % + ', '.join(self.args) + + 'Use --help for list of options.\n') + + def buildOptions(self): self.parser.add_option('--step', action='append', |
From: <sv...@ze...> - 2007-04-10 03:07:54
|
Author: jstevens Date: 2007-04-09 23:07:52 -0400 (Mon, 09 Apr 2007) New Revision: 4606 Modified: trunk/bin/zenmigrate Log: zenmigrate now subclasses ZenScriptBase instead of ZCmdBase, and so no longer is invoked as if a daemon. Modified: trunk/bin/zenmigrate =================================================================== --- trunk/bin/zenmigrate 2007-04-10 03:06:18 UTC (rev 4605) +++ trunk/bin/zenmigrate 2007-04-10 03:07:52 UTC (rev 4606) @@ -1,15 +1,6 @@ #! /usr/bin/env bash +# For some reason the zenfunctions line eats part of $*. Store +# value now to use in call to zendmd.py . $ZENHOME/bin/zenfunctions - -PRGHOME=$ZENHOME/Products/ZenModel/migrate -PRGNAME=zenmigrate.py -CFGFILE=$CFGDIR/zenmigrate.conf -PIDFILE=$VARDIR/$PRGNAME.pid - -# silly to run zenmigrate as a daemon -start() { - run "$@" -} - -notdaemon "$@" +$PYTHON $ZENHOME/Products/ZenModel/migrate/zenmigrate.py "$CMD" $* |
From: <sv...@ze...> - 2007-04-10 03:06:17
|
Author: jstevens Date: 2007-04-09 23:06:18 -0400 (Mon, 09 Apr 2007) New Revision: 4605 Added: trunk/Products/ZenUtils/ZenScriptBase.py Modified: trunk/Products/ZenModel/migrate/Migrate.py trunk/Products/ZenModel/zendmd.py Log: Refactoring some of the daemon/script parent class code to better deal with scripts that really shouldn't be run as if they were daemons. New ZenScriptBase.py class should be parent for most scripts instead of ZCmdBase now. Modified: trunk/Products/ZenModel/migrate/Migrate.py =================================================================== --- trunk/Products/ZenModel/migrate/Migrate.py 2007-04-10 03:04:10 UTC (rev 4604) +++ trunk/Products/ZenModel/migrate/Migrate.py 2007-04-10 03:06:18 UTC (rev 4605) @@ -15,7 +15,7 @@ import Globals import transaction -from Products.ZenUtils.ZCmdBase import ZCmdBase +from Products.ZenUtils.ZenScriptBase import ZenScriptBase from Products.ZenUtils.Version import Version as VersionBase from Products.ZenReports.ReportLoader import ReportLoader @@ -100,13 +100,13 @@ def name(self): return self.__class__.__name__ -class Migration(ZCmdBase): +class Migration(ZenScriptBase): "main driver for migration: walks the steps and performs commit/abort" useDatabaseVersion = True def __init__(self): - ZCmdBase.__init__(self) + ZenScriptBase.__init__(self, connect=True) self.allSteps = allSteps[:] self.allSteps.sort() @@ -211,14 +211,10 @@ def buildOptions(self): - ZCmdBase.buildOptions(self) self.parser.add_option('--step', action='append', dest="steps", help="Run the given step") - self.parser.add_option('--commit', - help='DEPRECATED - now default behavior.' - ' See --dont-commit') # NB: The flag for this setting indicates a false value for the setting. self.parser.add_option('--dont-commit', dest="commit", @@ -241,7 +237,9 @@ default=False, help="Run only steps newer than the " "current database version.") + ZenScriptBase.buildOptions(self) + def orderedSteps(self): return self.allSteps Modified: trunk/Products/ZenModel/zendmd.py =================================================================== --- trunk/Products/ZenModel/zendmd.py 2007-04-10 03:04:10 UTC (rev 4604) +++ trunk/Products/ZenModel/zendmd.py 2007-04-10 03:06:18 UTC (rev 4605) @@ -12,7 +12,8 @@ from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import noSecurityManager -from Products.ZenUtils.ZCmdBase import ZCmdBase +#from Products.ZenUtils.ZCmdBase import ZCmdBase +from Products.ZenUtils.ZenScriptBase import ZenScriptBase if readline: # Note: the history code in this file was originally authored by @@ -28,11 +29,11 @@ if os.path.exists(historyPath): readline.read_history_file(historyPath) -class zendmd(ZCmdBase): +class zendmd(ZenScriptBase): pass if __name__ == '__main__': - zendmd = zendmd() + zendmd = zendmd(connect=True) dmd = zendmd.dmd app = dmd.getPhysicalRoot() zport = app.zport Added: trunk/Products/ZenUtils/ZenScriptBase.py |
From: <sv...@ze...> - 2007-04-10 03:04:10
|
Author: jstevens Date: 2007-04-09 23:04:10 -0400 (Mon, 09 Apr 2007) New Revision: 4604 Removed: trunk/bin/zenx Log: This has been replaced by ZenHub Deleted: trunk/bin/zenx |
From: <sv...@ze...> - 2007-04-10 02:37:01
|
Author: marc Date: 2007-04-09 22:37:00 -0400 (Mon, 09 Apr 2007) New Revision: 4603 Modified: trunk/Products/ZenModel/IpInterface.py Log: #1188 * calling name() rather than name Modified: trunk/Products/ZenModel/IpInterface.py =================================================================== --- trunk/Products/ZenModel/IpInterface.py 2007-04-10 02:26:37 UTC (rev 4602) +++ trunk/Products/ZenModel/IpInterface.py 2007-04-10 02:37:00 UTC (rev 4603) @@ -354,7 +354,7 @@ """Return the name of this interface. """ if self.interfaceName: return self.interfaceName - elif self.name: return self.name + elif self.name(): return self.name() else: return "None" security.declareProtected('View', 'getInterfaceMacaddress') |
From: <sv...@ze...> - 2007-04-10 02:26:36
|
Author: marc Date: 2007-04-09 22:26:37 -0400 (Mon, 09 Apr 2007) New Revision: 4602 Modified: trunk/Products/ZenModel/IpInterface.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt Log: #1188 * getInterfaceName now used, and now return "None" Modified: trunk/Products/ZenModel/IpInterface.py =================================================================== --- trunk/Products/ZenModel/IpInterface.py 2007-04-10 02:16:11 UTC (rev 4601) +++ trunk/Products/ZenModel/IpInterface.py 2007-04-10 02:26:37 UTC (rev 4602) @@ -353,9 +353,10 @@ def getInterfaceName(self): """Return the name of this interface. """ - return self.interfaceName + if self.interfaceName: return self.interfaceName + elif self.name: return self.name + else: return "None" - security.declareProtected('View', 'getInterfaceMacaddress') def getInterfaceMacaddress(self): """Return the mac address of this interface. Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 02:16:11 UTC (rev 4601) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 02:26:37 UTC (rev 4602) @@ -61,7 +61,7 @@ 'misc_/SiteScopeParser/redball_img')"> </td> <td class="tablevalues"> - <a class=tablevalues tal:content="intf/name" + <a class=tablevalues tal:content="intf/getInterfaceName" tal:attributes="href intf/getPrimaryUrlPath">eth0</a> </td> <td class="tablevalues"> |
From: <sv...@ze...> - 2007-04-10 02:16:15
|
Author: marc Date: 2007-04-09 22:16:11 -0400 (Mon, 09 Apr 2007) New Revision: 4601 Modified: trunk/Products/ZenModel/IpRouteEntry.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt Log: #1187 * Fixed interface link Modified: trunk/Products/ZenModel/IpRouteEntry.py =================================================================== --- trunk/Products/ZenModel/IpRouteEntry.py 2007-04-09 20:13:48 UTC (rev 4600) +++ trunk/Products/ZenModel/IpRouteEntry.py 2007-04-10 02:16:11 UTC (rev 4601) @@ -144,7 +144,7 @@ If no interface is found return 'No Interface'. """ if self.interface(): - return self.interface().name() + return self.interface().name return "No Interface" @@ -205,7 +205,7 @@ else: return self._target - + security.declareProtected('Change Device', 'setInterfaceIndex') def setInterfaceIndex(self, ifindex): for int in self.os().interfaces(): @@ -238,4 +238,10 @@ return "" + def getInterfaceLink(self): + """Return a link to the interface""" + if self.interface(): return self.interface().getPrimaryUrlPath() + else: return "" + + InitializeClass(IpRouteEntry) Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-09 20:13:48 UTC (rev 4600) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-10 02:16:11 UTC (rev 4601) @@ -464,14 +464,18 @@ <span tal:replace="structure route/getNextHopIpLink"/> (<span tal:replace="structure route/getNextHopDeviceLink"/>) </td> - <td class="tablevalues"><a tal:content="route/getInterfaceNameString" - tal:attributes="href route/interface/getPrimaryUrlPath"/> + <td class="tablevalues"> + <a tal:attributes="href route/getInterfaceLink; + class string:tablevalues" + tal:content="route/getInterfaceNameString">eth0</a> </td> <td class="tablevalues" tal:content="route/routeproto"/> <td class="tablevalues" tal:content="route/routetype"/> <td class="tablevalues" align="center"> - <img tal:condition="route/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> - <img tal:condition="route/isLockedFromUpdates" border="0" src="locked-update-icon.png"> + <img tal:condition="route/isLockedFromDeletion" border="0" + src="locked-delete-icon.png"> + <img tal:condition="route/isLockedFromUpdates" border="0" + src="locked-update-icon.png"> </td> </tr> </tal:block> |
From: <sv...@ze...> - 2007-04-09 20:13:49
|
Author: edahl Date: 2007-04-09 16:13:48 -0400 (Mon, 09 Apr 2007) New Revision: 4600 Modified: trunk/Products/ZenModel/PerformanceConf.py trunk/Products/ZenRRD/RenderServer.py Log: * move width outside of gopts which are compressed. first step in fixing the swoopy graphs Modified: trunk/Products/ZenModel/PerformanceConf.py =================================================================== --- trunk/Products/ZenModel/PerformanceConf.py 2007-04-09 14:56:24 UTC (rev 4599) +++ trunk/Products/ZenModel/PerformanceConf.py 2007-04-09 20:13:48 UTC (rev 4600) @@ -285,10 +285,20 @@ """set the full path of the target and send to view""" targetpath = performancePath(targetpath[1:]) gopts = view.graphOpts(context, targetpath, targettype) - gopts = url_quote(zlib.compress('|'.join(gopts))) - url = "%s/render?gopts=%s&drange=%d" % (self.renderurl,gopts,drange) + ngopts = [] + width = 0 + for o in gopts: + if o.startswith('--width'): + width = o.split('=')[1].strip() + continue + ngopts.append(o) + gopts = url_quote(zlib.compress('|'.join(ngopts))) + url = "%s/render?gopts=%s&drange=%d&width=%s" % ( + self.renderurl,gopts,drange, width) if self.renderurl.startswith("http"): - return "/zport/RenderServer/render?remoteUrl=%s&gopts=%s&drange=%d" % (url_quote(url),gopts,drange) + return "/zport/RenderServer/render" \ + "?remoteUrl=%s&gopts=%s&drange=%d&width=%s" % ( + url_quote(url),gopts,drange,width) else: return url Modified: trunk/Products/ZenRRD/RenderServer.py =================================================================== --- trunk/Products/ZenRRD/RenderServer.py 2007-04-09 14:56:24 UTC (rev 4599) +++ trunk/Products/ZenRRD/RenderServer.py 2007-04-09 20:13:48 UTC (rev 4600) @@ -68,12 +68,13 @@ security.declareProtected('View', 'render') - def render(self, gopts=None, drange=None, remoteUrl=None, + def render(self, gopts=None, drange=None, remoteUrl=None, width=None, ftype='PNG', REQUEST=None): """render a graph and return it""" gopts = zlib.decompress(gopts) gopts = gopts.split('|') gopts = [g for g in gopts if g] + gopts.append('--width=%s' % width) drange = int(drange) id = self.graphId(gopts, drange, ftype) graph = self.getGraph(id, ftype, REQUEST) |
From: <sv...@ze...> - 2007-04-09 14:56:23
|
Author: chris Date: 2007-04-09 10:56:24 -0400 (Mon, 09 Apr 2007) New Revision: 4599 Modified: tags/zenoss-1.1.2/inst/rpm/zenoss.spec Log: * synchronized with tagname by zenpkg Modified: tags/zenoss-1.1.2/inst/rpm/zenoss.spec =================================================================== --- tags/zenoss-1.1.2/inst/rpm/zenoss.spec 2007-04-09 14:54:15 UTC (rev 4598) +++ tags/zenoss-1.1.2/inst/rpm/zenoss.spec 2007-04-09 14:56:24 UTC (rev 4599) @@ -27,7 +27,7 @@ # set to 1 if the version of the software to be built is the trunk # if trunk is set to 0 the version will be extrapolated from the # rpm information contained in the %{version} and %{release} vars -%define trunk 1 +%define trunk 0 # the name of the ctl file for zenoss (in /etc/rc.d/rc#.d) %define S_zenoss S99zenoss @@ -41,8 +41,8 @@ # the RPM meta information Name: zenoss Summary: The Open Source Network Management System -Version: 1.1.0 -Release: 0 +Version: 1.1.2 +Release: 0 License: GPL Vendor: Zenoss, Inc. Packager: Christopher Blunck <ch...@ze...> |
From: <sv...@ze...> - 2007-04-09 14:54:13
|
Author: chris Date: 2007-04-09 10:54:15 -0400 (Mon, 09 Apr 2007) New Revision: 4598 Added: tags/zenoss-1.1.2/ Log: * auto-build of zenoss-1.1.2 by zenpkg Copied: tags/zenoss-1.1.2 (from rev 4597, branches/zenoss-1.1.x) |
From: <sv...@ze...> - 2007-04-09 14:53:54
|
Author: chris Date: 2007-04-09 10:53:56 -0400 (Mon, 09 Apr 2007) New Revision: 4597 Removed: tags/zenoss-1.1.2/ Log: sliding in order to backport the extras changes |
From: <sv...@ze...> - 2007-04-09 14:53:30
|
Author: chris Date: 2007-04-09 10:53:31 -0400 (Mon, 09 Apr 2007) New Revision: 4596 Added: branches/zenoss-1.1.x/inst/fs/ branches/zenoss-1.1.x/inst/fs/etc/ branches/zenoss-1.1.x/inst/fs/etc/cron.daily/ branches/zenoss-1.1.x/inst/fs/etc/cron.weekly/ branches/zenoss-1.1.x/inst/fs/etc/logrotate.d/ Removed: branches/zenoss-1.1.x/inst/cron/cron.daily/ branches/zenoss-1.1.x/inst/cron/cron.weekly/ branches/zenoss-1.1.x/inst/logrotate.d/ Log: moved cron and logrotate directories under fs so that they can be exported Copied: branches/zenoss-1.1.x/inst/fs/etc/cron.daily (from rev 4477, branches/zenoss-1.1.x/inst/cron/cron.daily) Copied: branches/zenoss-1.1.x/inst/fs/etc/cron.weekly (from rev 4477, branches/zenoss-1.1.x/inst/cron/cron.weekly) Copied: branches/zenoss-1.1.x/inst/fs/etc/logrotate.d (from rev 4477, branches/zenoss-1.1.x/inst/logrotate.d) |