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-06 18:38:07
|
Author: marc Date: 2007-04-06 14:38:07 -0400 (Fri, 06 Apr 2007) New Revision: 4545 Modified: trunk/Products/ZenModel/IpAddress.py Log: self.interface().name() should be self.interface().name Modified: trunk/Products/ZenModel/IpAddress.py =================================================================== --- trunk/Products/ZenModel/IpAddress.py 2007-04-06 18:14:25 UTC (rev 4544) +++ trunk/Products/ZenModel/IpAddress.py 2007-04-06 18:38:07 UTC (rev 4545) @@ -175,7 +175,7 @@ security.declareProtected('View', 'getInterfaceName') def getInterfaceName(self): if self.interface(): - return self.interface().name() + return self.interface().name return "No Interface" |
From: <sv...@ze...> - 2007-04-06 18:14:55
|
Author: jstevens Date: 2007-04-06 14:14:25 -0400 (Fri, 06 Apr 2007) New Revision: 4544 Modified: trunk/Products/ZenModel/RRDDataSource.py Log: datasource commands are no longer prefixed with zCommandPath if they start with / or $. (Used to be just /) This is so that commands can reference plugins in zenpacks as $ZENHOME/Products/MyZenPack/libexec or whatever. Modified: trunk/Products/ZenModel/RRDDataSource.py =================================================================== --- trunk/Products/ZenModel/RRDDataSource.py 2007-04-06 13:57:11 UTC (rev 4543) +++ trunk/Products/ZenModel/RRDDataSource.py 2007-04-06 18:14:25 UTC (rev 4544) @@ -262,7 +262,7 @@ if self.userAgent: go += 'agent "%s"\n' % self.userAgent res = go + res - elif not res.startswith('/'): + elif not res.startswith('/') and not res.startswith('$'): if not res.startswith(context.zCommandPath): res = os.path.join(context.zCommandPath, res) return res |
From: <sv...@ze...> - 2007-04-06 13:57:11
|
Author: ecn Date: 2007-04-06 09:57:11 -0400 (Fri, 06 Apr 2007) New Revision: 4543 Modified: trunk/Products/ZenModel/MaintenanceWindow.py Log: * provide backwards compatible class for OrganizerMaintenanceWindow Modified: trunk/Products/ZenModel/MaintenanceWindow.py =================================================================== --- trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-06 13:53:55 UTC (rev 4542) +++ trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-06 13:57:11 UTC (rev 4543) @@ -339,6 +339,7 @@ self.begin(now) DeviceMaintenanceWindow = MaintenanceWindow +OrganizerMaintenanceWindow = MaintenanceWindow if __name__=='__main__': |
From: <sv...@ze...> - 2007-04-06 13:53:54
|
Author: ecn Date: 2007-04-06 09:53:55 -0400 (Fri, 06 Apr 2007) New Revision: 4542 Modified: trunk/Products/ZenHub/XmlRpcService.py Log: * pass args unmodified Modified: trunk/Products/ZenHub/XmlRpcService.py =================================================================== --- trunk/Products/ZenHub/XmlRpcService.py 2007-04-06 13:41:54 UTC (rev 4541) +++ trunk/Products/ZenHub/XmlRpcService.py 2007-04-06 13:53:55 UTC (rev 4542) @@ -18,7 +18,7 @@ return self.zem.getDevicePingIssues() def xmlrpc_getWmiConnIssues(self, *args): - return self.zem.getWmiConnIssues(args) + return self.zem.getWmiConnIssues(*args) def xmlrpc_applyDataMap(self, devName, datamap, |
From: <sv...@ze...> - 2007-04-06 13:41:53
|
Author: ecn Date: 2007-04-06 09:41:54 -0400 (Fri, 06 Apr 2007) New Revision: 4541 Modified: trunk/Products/ZenModel/MaintenanceWindow.py Log: * provide backwards compatible class for DeviceMaintenanceWindow Modified: trunk/Products/ZenModel/MaintenanceWindow.py =================================================================== --- trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-06 13:26:51 UTC (rev 4540) +++ trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-06 13:41:54 UTC (rev 4541) @@ -338,7 +338,9 @@ else: self.begin(now) +DeviceMaintenanceWindow = MaintenanceWindow + if __name__=='__main__': m = MaintenanceWindow('tester') t = time.mktime( (2006, 1, 29, 10, 45, 12, 6, 29, 0) ) |
From: <sv...@ze...> - 2007-04-06 13:27:15
|
Author: ecn Date: 2007-04-06 09:26:51 -0400 (Fri, 06 Apr 2007) New Revision: 4540 Modified: branches/zenoss-1.1.x/Products/DataCollector/SshClient.py Log: fixed #1108 * turn username back to a string for encoding in ssh packetses Modified: branches/zenoss-1.1.x/Products/DataCollector/SshClient.py =================================================================== --- branches/zenoss-1.1.x/Products/DataCollector/SshClient.py 2007-04-06 13:26:07 UTC (rev 4539) +++ branches/zenoss-1.1.x/Products/DataCollector/SshClient.py 2007-04-06 13:26:51 UTC (rev 4540) @@ -47,6 +47,7 @@ class SshUserAuth(userauth.SSHUserAuthClient): lastPublicKey = False def __init__(self, user, instance, factory): + user = str(user) # damn unicode userauth.SSHUserAuthClient.__init__(self, user, instance) self.user = user self.factory = factory |
From: <sv...@ze...> - 2007-04-06 13:26:07
|
Author: ecn Date: 2007-04-06 09:26:07 -0400 (Fri, 06 Apr 2007) New Revision: 4539 Modified: trunk/Products/DataCollector/SshClient.py Log: fixed #1108 * turn username back to a string for encoding in ssh packetses Modified: trunk/Products/DataCollector/SshClient.py =================================================================== --- trunk/Products/DataCollector/SshClient.py 2007-04-05 23:55:11 UTC (rev 4538) +++ trunk/Products/DataCollector/SshClient.py 2007-04-06 13:26:07 UTC (rev 4539) @@ -47,6 +47,7 @@ class SshUserAuth(userauth.SSHUserAuthClient): lastPublicKey = False def __init__(self, user, instance, factory): + user = str(user) # damn unicode userauth.SSHUserAuthClient.__init__(self, user, instance) self.user = user self.factory = factory |
From: <sv...@ze...> - 2007-04-05 23:55:09
|
Author: edahl Date: 2007-04-05 19:55:11 -0400 (Thu, 05 Apr 2007) New Revision: 4538 Modified: trunk/Products/DataCollector/zenmodeler.py Log: * lower default parallel collection to 1 Modified: trunk/Products/DataCollector/zenmodeler.py =================================================================== --- trunk/Products/DataCollector/zenmodeler.py 2007-04-05 23:49:38 UTC (rev 4537) +++ trunk/Products/DataCollector/zenmodeler.py 2007-04-05 23:55:11 UTC (rev 4538) @@ -26,7 +26,7 @@ from Exceptions import * defaultPortScanTimeout = 5 -defaultParallel = 40 +defaultParallel = 1 defaultProtocol = "ssh" defaultPort = 22 defaultStartSleep = 10 * 60 |
From: <sv...@ze...> - 2007-04-05 23:49:51
|
Author: edahl Date: 2007-04-05 19:49:38 -0400 (Thu, 05 Apr 2007) New Revision: 4537 Modified: trunk/Products/ZenModel/OSProcess.py Log: * take out break point Modified: trunk/Products/ZenModel/OSProcess.py =================================================================== --- trunk/Products/ZenModel/OSProcess.py 2007-04-05 23:09:06 UTC (rev 4536) +++ trunk/Products/ZenModel/OSProcess.py 2007-04-05 23:49:38 UTC (rev 4537) @@ -22,7 +22,6 @@ if className == '/': className = '' orgPath = "/Processes%s" % className classPath = "%s/osProcessClasses/%s" % (orgPath, id) - import pdb; pdb.set_trace() try: osp.getDmdObj(classPath) except KeyError, NotFound: |
From: <sv...@ze...> - 2007-04-05 23:09:09
|
Author: ecn Date: 2007-04-05 19:09:06 -0400 (Thu, 05 Apr 2007) New Revision: 4536 Modified: trunk/Products/ZenModel/DataRoot.py Log: * remove debug print Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2007-04-05 22:42:47 UTC (rev 4535) +++ trunk/Products/ZenModel/DataRoot.py 2007-04-05 23:09:06 UTC (rev 4536) @@ -464,7 +464,6 @@ return self.callZenScreen(REQUEST) def notifyObjectChange(self, object = None): - print 'notifyObjectChange', self, object if object is not None: self.hubQueue.put(object.getPrimaryPath()) else: |
From: <sv...@ze...> - 2007-04-05 22:42:46
|
Author: ecn Date: 2007-04-05 18:42:47 -0400 (Thu, 05 Apr 2007) New Revision: 4535 Modified: trunk/Products/ZenRRD/RRDDaemon.py Log: * respond to updates to the performance monitor config Modified: trunk/Products/ZenRRD/RRDDaemon.py =================================================================== --- trunk/Products/ZenRRD/RRDDaemon.py 2007-04-05 22:42:16 UTC (rev 4534) +++ trunk/Products/ZenRRD/RRDDaemon.py 2007-04-05 22:42:47 UTC (rev 4535) @@ -139,6 +139,10 @@ return self.services['EventService'].callRemote('getDevicePingIssues') return defer.fail("Not connected to ZenHub") + def remote_setPropertyItems(self, items): + self.log.debug("Async update of collection properties") + self.setPropertyItems(items) + def setPropertyItems(self, items): 'extract configuration elements used by this server' table = dict(items) |
From: <sv...@ze...> - 2007-04-05 22:42:17
|
Author: ecn Date: 2007-04-05 18:42:16 -0400 (Thu, 05 Apr 2007) New Revision: 4534 Modified: trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/ZenModelRM.py trunk/Products/ZenRelations/ZenPropertyManager.py Log: * use new notifyObjectChange method to post things to the hubQueue Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-05 22:40:03 UTC (rev 4533) +++ trunk/Products/ZenModel/Device.py 2007-04-05 22:42:16 UTC (rev 4534) @@ -879,7 +879,7 @@ """Set the changed datetime for this device. value default is now. """ self._lastChange.setDate(value) - self.dmd.hubQueue.put(self.getPrimaryPath()) + self.notifyObjectChange() security.declareProtected('Change Device', 'setSnmpLastCollection') Modified: trunk/Products/ZenModel/ZenModelRM.py =================================================================== --- trunk/Products/ZenModel/ZenModelRM.py 2007-04-05 22:40:03 UTC (rev 4533) +++ trunk/Products/ZenModel/ZenModelRM.py 2007-04-05 22:42:16 UTC (rev 4534) @@ -70,6 +70,7 @@ if REQUEST.form.has_key("newId"): redirect = self.rename(REQUEST.form["newId"]) self.manage_changeProperties(**REQUEST.form) + self.notifyObjectChange(self) if REQUEST: REQUEST['message'] = "Saved at time:" return self.callZenScreen(REQUEST, redirect) Modified: trunk/Products/ZenRelations/ZenPropertyManager.py =================================================================== --- trunk/Products/ZenRelations/ZenPropertyManager.py 2007-04-05 22:40:03 UTC (rev 4533) +++ trunk/Products/ZenRelations/ZenPropertyManager.py 2007-04-05 22:42:16 UTC (rev 4534) @@ -197,6 +197,7 @@ if type_converters.has_key(ptype): propvalue=type_converters[ptype](propvalue) self._setProperty(propname, propvalue, type=ptype) + self.notifyObjectChange(self) if REQUEST: return self.callZenScreen(REQUEST) |
From: <sv...@ze...> - 2007-04-05 22:40:02
|
Author: ecn Date: 2007-04-05 18:40:03 -0400 (Thu, 05 Apr 2007) New Revision: 4533 Modified: trunk/Products/ZenModel/DataRoot.py trunk/Products/ZenModel/DmdBuilder.py Log: * create the hubQueue in a more conventional way Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2007-04-05 22:39:16 UTC (rev 4532) +++ trunk/Products/ZenModel/DataRoot.py 2007-04-05 22:40:03 UTC (rev 4533) @@ -204,7 +204,8 @@ def __init__(self, id, title=None): ZenModelRM.__init__(self, id, title) - + from zc.queue import PersistentQueue + self.hubQueue = PersistentQueue() def getResultFields(self): """Result fields for dashboard. @@ -462,4 +463,11 @@ if REQUEST is not None: return self.callZenScreen(REQUEST) + def notifyObjectChange(self, object = None): + print 'notifyObjectChange', self, object + if object is not None: + self.hubQueue.put(object.getPrimaryPath()) + else: + self.dmd.hubQueue.put(self.getPrimaryPath()) + InitializeClass(DataRoot) Modified: trunk/Products/ZenModel/DmdBuilder.py =================================================================== --- trunk/Products/ZenModel/DmdBuilder.py 2007-04-05 22:39:16 UTC (rev 4532) +++ trunk/Products/ZenModel/DmdBuilder.py 2007-04-05 22:40:03 UTC (rev 4533) @@ -163,6 +163,4 @@ history=True) manage_addUserSettingsManager(self.dmd) manage_addIpNetwork(self.dmd, "Networks") - from zc.queue import PersistentQueue - self.dmd.hubQueue = PersistentQueue() |
From: <sv...@ze...> - 2007-04-05 22:39:15
|
Author: ecn Date: 2007-04-05 18:39:16 -0400 (Thu, 05 Apr 2007) New Revision: 4532 Modified: trunk/Products/ZenHub/zenhub.py Log: * process all the objects posted since the last check Modified: trunk/Products/ZenHub/zenhub.py =================================================================== --- trunk/Products/ZenHub/zenhub.py 2007-04-05 22:38:54 UTC (rev 4531) +++ trunk/Products/ZenHub/zenhub.py 2007-04-05 22:39:16 UTC (rev 4532) @@ -137,11 +137,12 @@ reactor.callLater(1, self.processQueue) def doProcessQueue(self, q): - object = q.pull() - from Products.ZenUtils.Utils import getObjByPath - object = getObjByPath(self.dmd, object) - for s in self.services.values(): - s.update(object) + while self.dmd.hubQueue: + object = q.pull() + from Products.ZenUtils.Utils import getObjByPath + object = getObjByPath(self.dmd, object) + for s in self.services.values(): + s.update(object) def sendEvent(self, **kw): if not 'device' in kw: |
From: <sv...@ze...> - 2007-04-05 22:38:52
|
Author: ecn Date: 2007-04-05 18:38:54 -0400 (Thu, 05 Apr 2007) New Revision: 4531 Modified: trunk/Products/ZenHub/services/SnmpPerfConfig.py Log: * respond to changes in PerformanceConf Modified: trunk/Products/ZenHub/services/SnmpPerfConfig.py =================================================================== --- trunk/Products/ZenHub/services/SnmpPerfConfig.py 2007-04-05 22:38:09 UTC (rev 4530) +++ trunk/Products/ZenHub/services/SnmpPerfConfig.py 2007-04-05 22:38:54 UTC (rev 4531) @@ -18,3 +18,9 @@ cfg = object.getSnmpOidTargets() for listener in self.listeners: listener.callRemote('updateDeviceConfig', cfg) + + from Products.ZenModel.PerformanceConf import PerformanceConf + if isinstance(object, PerformanceConf): + for listener in self.listeners: + listener.callRemote('setPropertyItems', object.propertyItems()) + |
From: <sv...@ze...> - 2007-04-05 22:38:11
|
Author: ecn Date: 2007-04-05 18:38:09 -0400 (Thu, 05 Apr 2007) New Revision: 4530 Modified: trunk/Products/ZenHub/PBDaemon.py Log: * store the service in only one place, and remove it on disconnect * minor cleanups (commented code), unused imports, hide the throw of SystemExit Modified: trunk/Products/ZenHub/PBDaemon.py =================================================================== --- trunk/Products/ZenHub/PBDaemon.py 2007-04-05 22:07:13 UTC (rev 4529) +++ trunk/Products/ZenHub/PBDaemon.py 2007-04-05 22:38:09 UTC (rev 4530) @@ -13,7 +13,6 @@ import Globals from Products.ZenUtils.ZenDaemon import ZenDaemon -#from Products.ZenUtils.Driver import drive #from Products.ZenUtils.Step import Step import Products.ZenEvents.Event as Event from Products.ZenUtils.PBUtil import ReconnectingPBClientFactory @@ -25,57 +24,57 @@ from twisted.cred import credentials from twisted.spread import pb -App_Start = "/App/Start" -App_Stop = "/App/Stop" -Heartbeat = "/Heartbeat" +from Products.ZenEvents.ZenEventClasses import App_Start, App_Stop, Heartbeat +from socket import getfqdn + + +DEFAULT_HUB_HOST = 'localhost' +DEFAULT_HUB_PORT = PB_PORT +DEFAULT_HUB_USERNAME = 'zenoss' +DEFAULT_HUB_PASSWORD = 'zenoss' + startEvent = { 'eventClass': App_Start, 'summary': 'started', 'severity': Event.Clear, - 'device': '', - 'component': '', } + stopEvent = { 'eventClass':App_Stop, 'summary': 'stopped', 'severity': Event.Warning, - 'device': '', - 'component': '', } -#heartbeatEvent = { -# 'eventClass': Event.Heartbeat, -# 'device': '', -# 'component': '', -# 'timeout': 3 * HEARTBEAT_CYCLETIME, -# } DEFAULT_HUB_HOST = 'localhost' DEFAULT_HUB_PORT = PB_PORT DEFAULT_HUB_USERNAME = 'admin' DEFAULT_HUB_PASSWORD = 'zenoss' -DEFAULT_HUB_MONITOR = socket.getfqdn() +DEFAULT_HUB_MONITOR = getfqdn() - class PBDaemon(ZenDaemon, pb.Referenceable): name = 'pbdaemon' initialServices = ['EventService'] - + def __init__(self, noopts=0, keeproot=False): ZenDaemon.__init__(self, noopts, keeproot) - #pb.Referenceable.__init__(self) self.perspective = None self.services = {} self.eventQueue = [] - + self.startEvent = startEvent.copy() + self.stopEvent = stopEvent.copy() + for evt in self.startEvent, self.stopEvent: + evt.update(dict(component=self.name, device=getfqdn())) def connect(self): + d = defer.Deferred() + def gotPerspective(perspective): "Every time we reconnect this function is called" - self.log.warning("Reconnected to ZenHub") + self.log.warning("Connected to ZenHub") self.perspective = perspective d2 = self.getInitialServices() if d.called: @@ -85,7 +84,6 @@ self.log.debug('chaining getInitialServices with d2') d2.chainDeferred(d) - d = defer.Deferred() factory = ReconnectingPBClientFactory() self.log.debug("Connecting to %s", self.options.hubHost) reactor.connectTCP(self.options.hubHost, self.options.hubPort, factory) @@ -97,8 +95,11 @@ factory.startLogin(c) return d + def eventService(self): + return self.services['EventService'] - def getService(self, serviceName): + + def getService(self, serviceName, serviceListeningInterface=None): ''' Attempt to get a service from zenhub. Returns a deferred. When service is retrieved it is stashed in self.services with serviceName as the key. When getService is called it will first @@ -107,21 +108,29 @@ ''' if self.services.has_key(serviceName): return defer.succeed(self.services[serviceName]) + def removeService(ignored): + self.log.debug('removing service %s' % serviceName) + if serviceName in self.services: + del self.services[serviceName] def callback(result, serviceName): self.log.debug('callback after getting service %s' % serviceName) self.services[serviceName] = result + result.notifyOnDisconnect(removeService) return result def errback(error, serviceName): self.log.debug('errback after getting service %s' % serviceName) self.log.error('Could not retrieve service %s' % serviceName) + if serviceName in self.service: + del self.services[serviceName] return error - d = self.perspective.callRemote('getService', serviceName, - self.options.monitor) + d = self.perspective.callRemote('getService', + serviceName, + self.options.monitor, + serviceListeningInterface or self) d.addCallback(callback, serviceName) d.addErrback(errback, serviceName) return d - def getInitialServices(self): self.log.debug('setting up services %s' % ', '.join([n for n in self.initialServices])) @@ -129,18 +138,18 @@ [self.getService(name) for name in self.initialServices], fireOnOneErrback=True, consumeErrors=True) return d - - + + def connected(self): - self.log.debug('connected') - self.eventSvc = self.services['EventService'] - #self.eventSvc.callRemote('sendEvent', startEvent) - + pass def run(self): self.log.debug('run') d = self.connect() def callback(result): + self.log.debug('Calling connected.') + self.log.debug('connected') + self.sendEvent(self.startEvent) self.connected() return result def errback(error): @@ -151,16 +160,31 @@ reactor.run() self.log.info('%s shutting down' % self.name) + def sigTerm(self, *unused): + try: + ZenDaemon.sigTerm(self, *unused) + except SystemExit: + pass def stop(self): if reactor.running: - reactor.stop() + if 'EventService' in self.services: + self.sendEvent(self.stopEvent) + # give the reactor some time to send the shutdown event + # we could get more creative an add callbacks for event + # sends, which would mean we could wait longer, only as long + # as it took to send + reactor.callLater(1, reactor.stop) + else: + reactor.stop() - - def sendEvent(self, event=None): + def sendEvent(self, event, **kw): ''' Add event to queue of events to be sent. If we have an event service then process the queue. ''' + event = event.copy() + event['agent'] = self.name + event.update(kw) def errback(error, event): # If we get an error when sending an event we add it back to the # queue. This is great if the eventservice is just temporarily @@ -176,11 +200,12 @@ self.eventQueue.append(event) if event: self.eventQueue.append(event) - if self.eventSvc: + evtSvc = self.services.get('EventService', None) + if evtSvc: for i in range(len(self.eventQueue)): event = self.eventQueue[0] del self.eventQueue[0] - d = self.eventSvc.callRemote('sendEvent', event) + d = evtSvc.callRemote('sendEvent', event) d.addErrback(errback, event) @@ -190,11 +215,7 @@ def remote_shutdown(self, result): self.stop() - try: - self.sigTerm() - except SystemExit: - pass - reactor.stop() + self.sigTerm() def buildOptions(self): |
From: <sv...@ze...> - 2007-04-05 22:07:12
|
Author: marc Date: 2007-04-05 18:07:13 -0400 (Thu, 05 Apr 2007) New Revision: 4529 Modified: trunk/Products/ZenModel/AdministrativeRoleable.py trunk/Products/ZenModel/MaintenanceWindowable.py Log: #1157 * Added security Modified: trunk/Products/ZenModel/AdministrativeRoleable.py =================================================================== --- trunk/Products/ZenModel/AdministrativeRoleable.py 2007-04-05 22:04:41 UTC (rev 4528) +++ trunk/Products/ZenModel/AdministrativeRoleable.py 2007-04-05 22:07:13 UTC (rev 4529) @@ -3,9 +3,11 @@ Created by Marc Irlandez on 2007-04-05. """ +from AccessControl import ClassSecurityInfo - class AdministrativeRoleable: + + security = ClassSecurityInfo() security.declareProtected('Change Device', 'manage_addAdministrativeRole') def manage_addAdministrativeRole(self, newId=None, REQUEST=None): Modified: trunk/Products/ZenModel/MaintenanceWindowable.py =================================================================== --- trunk/Products/ZenModel/MaintenanceWindowable.py 2007-04-05 22:04:41 UTC (rev 4528) +++ trunk/Products/ZenModel/MaintenanceWindowable.py 2007-04-05 22:07:13 UTC (rev 4529) @@ -3,9 +3,12 @@ Created by Marc Irlandez on 2007-04-05. """ +from AccessControl import ClassSecurityInfo class MaintenanceWindowable: + security = ClassSecurityInfo() + security.declareProtected('Change Device', 'manage_addMaintenanceWindow') def manage_addMaintenanceWindow(self, newId=None, REQUEST=None): "Add a Maintenance Window to this device" |
From: <sv...@ze...> - 2007-04-05 22:04:41
|
Author: marc Date: 2007-04-05 18:04:41 -0400 (Thu, 05 Apr 2007) New Revision: 4528 Modified: trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/DeviceOrganizer.py Log: #1157 * Forgot to import the mixins Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-05 21:59:01 UTC (rev 4527) +++ trunk/Products/ZenModel/Device.py 2007-04-05 22:04:41 UTC (rev 4528) @@ -51,6 +51,8 @@ from UserCommand import UserCommand from Commandable import Commandable from Lockable import Lockable +from MaintenanceWindowable import MaintenanceWindowable +from AdministrativeRoleable import AdministrativeRoleable from OperatingSystem import OperatingSystem from DeviceHW import DeviceHW Modified: trunk/Products/ZenModel/DeviceOrganizer.py =================================================================== --- trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 21:59:01 UTC (rev 4527) +++ trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 22:04:41 UTC (rev 4528) @@ -20,6 +20,8 @@ from DeviceManagerBase import DeviceManagerBase from Commandable import Commandable from ZenMenuable import ZenMenuable +from MaintenanceWindowable import MaintenanceWindowable +from AdministrativeRoleable import AdministrativeRoleable from Products.ZenRelations.RelSchema import * |
From: <sv...@ze...> - 2007-04-05 21:59:01
|
Author: marc Date: 2007-04-05 17:59:01 -0400 (Thu, 05 Apr 2007) New Revision: 4527 Added: trunk/Products/ZenModel/AdministrativeRoleable.py trunk/Products/ZenModel/MaintenanceWindowable.py Modified: trunk/Products/ZenModel/AdministrativeRole.py trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/DeviceOrganizer.py trunk/Products/ZenModel/MaintenanceWindow.py trunk/Products/ZenModel/UserSettings.py Log: #1157 * Using a mixin for relations (still in test) Modified: trunk/Products/ZenModel/AdministrativeRole.py =================================================================== --- trunk/Products/ZenModel/AdministrativeRole.py 2007-04-05 21:07:19 UTC (rev 4526) +++ trunk/Products/ZenModel/AdministrativeRole.py 2007-04-05 21:59:01 UTC (rev 4527) @@ -14,6 +14,7 @@ _relations = ( ("userSetting", ToOne(ToMany, "Products.ZenModel.UserSettings", "adminRoles")), + ("managedObject", ToOne(ToManyCont, "Products.ZenModel.AdministrativeRoleable", "adminRoles")), ) level = 1 @@ -49,25 +50,5 @@ return self.managedObject().getEventSummary() - -class DeviceAdministrativeRole(AdministrativeRole): - - meta_type = "DeviceAdministrativeRole" - - _relations = AdministrativeRole._relations + ( - ("managedObject", ToOne(ToManyCont, "Products.ZenModel.Device", "adminRoles")), - ) - - -class DevOrgAdministrativeRole(AdministrativeRole): - - meta_type = "DevOrgAdministrativeRole" - - _relations = AdministrativeRole._relations + ( - ("managedObject", ToOne(ToManyCont, "Products.ZenModel.DeviceOrganizer", "adminRoles")), - ) - def managedObjectName(self): - return self.managedObject().getOrganizerName() - - + return self.managedObject().getOrganizerName() \ No newline at end of file Added: trunk/Products/ZenModel/AdministrativeRoleable.py Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-05 21:07:19 UTC (rev 4526) +++ trunk/Products/ZenModel/Device.py 2007-04-05 21:59:01 UTC (rev 4527) @@ -48,8 +48,6 @@ from Products.ZenRelations.RelSchema import * from Products.ZenUtils.IpUtil import isip from Products.ZenEvents.ZenEventClasses import Status_Snmp -from MaintenanceWindow import DeviceMaintenanceWindow -from AdministrativeRole import DeviceAdministrativeRole from UserCommand import UserCommand from Commandable import Commandable from Lockable import Lockable @@ -183,7 +181,7 @@ addDevice = DTMLFile('dtml/addDevice',globals()) -class Device(ManagedEntity, Commandable, Lockable): +class Device(ManagedEntity, Commandable, Lockable, MaintenanceWindowable, AdministrativeRoleable): """ Device is a key class within zenoss. It represents the combination of computer hardware running an operating system. @@ -809,79 +807,6 @@ return self.callZenScreen(REQUEST) - security.declareProtected('Change Device', 'manage_addMaintenanceWindow') - def manage_addMaintenanceWindow(self, newId=None, REQUEST=None): - "Add a Maintenance Window to this device" - mw = None - if newId: - mw = DeviceMaintenanceWindow(newId) - self.maintenanceWindows._setObject(newId, mw) - self.setLastChange() - if REQUEST: - if mw: - REQUEST['message'] = "Maintenace Window Added" - return self.callZenScreen(REQUEST) - - security.declareProtected('Change Device', 'manage_deleteMaintenanceWindow') - def manage_deleteMaintenanceWindow(self, maintenanceIds=(), REQUEST=None): - "Delete a Maintenance Window to this device" - import types - if type(maintenanceIds) in types.StringTypes: - maintenanceIds = [maintenanceIds] - for id in maintenanceIds: - self.maintenanceWindows._delObject(id) - self.setLastChange() - if REQUEST: - REQUEST['message'] = "Maintenace Window Deleted" - return self.callZenScreen(REQUEST) - - security.declareProtected('Change Device', 'manage_addAdministrativeRole') - def manage_addAdministrativeRole(self, newId=None, REQUEST=None): - "Add a Admin Role to this device" - if newId: - us = self.ZenUsers.getUserSettings(newId) - if us: - ar = DeviceAdministrativeRole(newId) - if us.defaultAdminRole: - ar.role = us.defaultAdminRole - ar.level = us.defaultAdminLevel - self.adminRoles._setObject(newId, ar) - ar = self.adminRoles._getOb(newId) - ar.userSetting.addRelation(us) - if REQUEST: - REQUEST['message'] = "Administrative Role Added" - return self.callZenScreen(REQUEST) - - - def manage_editAdministrativeRoles(self, ids, role, level, REQUEST=None): - """Edit list of admin roles. - """ - if type(ids) in types.StringTypes: - ids = [ids] - role = [role] - level = [level] - for i, id in enumerate(ids): - ar = self.adminRoles._getOb(id) - if ar.role != role[i]: ar.role = role[i] - if ar.level != level[i]: ar.level = level[i] - if REQUEST: - REQUEST['message'] = "Administrative Roles Updated" - return self.callZenScreen(REQUEST) - - - security.declareProtected('Change Device','manage_deleteAdministrativeRole') - def manage_deleteAdministrativeRole(self, delids=(), REQUEST=None): - "Delete a admin role to this device" - if type(delids) in types.StringTypes: - delids = [delids] - for id in delids: - self.adminRoles._delObject(id) - if REQUEST: - if delids: - REQUEST['message'] = "Administrative Roles Deleted" - return self.callZenScreen(REQUEST) - - def monitorDevice(self): """Is device production state >= zProdStateThreshold. """ Modified: trunk/Products/ZenModel/DeviceOrganizer.py =================================================================== --- trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 21:07:19 UTC (rev 4526) +++ trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 21:59:01 UTC (rev 4527) @@ -21,11 +21,9 @@ from Commandable import Commandable from ZenMenuable import ZenMenuable -from MaintenanceWindow import OrganizerMaintenanceWindow - from Products.ZenRelations.RelSchema import * -class DeviceOrganizer(Organizer, DeviceManagerBase, Commandable, ZenMenuable): +class DeviceOrganizer(Organizer, DeviceManagerBase, Commandable, ZenMenuable, MaintenanceWindowable, AdministrativeRoleable): """ DeviceOrganizer is the base class for device organizers. It has lots of methods for rolling up device statistics and information. @@ -190,83 +188,6 @@ return retval - security.declareProtected('Change Organizer', - 'manage_addMaintenanceWindow') - def manage_addMaintenanceWindow(self, newId=None, REQUEST=None): - "Add a Maintenance Window to this device" - if newId: - mw = OrganizerMaintenanceWindow(newId) - self.maintenanceWindows._setObject(newId, mw) - if REQUEST: - if newId: - REQUEST['message'] = "Maintenace Window Added" - return self.callZenScreen(REQUEST) - - - security.declareProtected('Change Device', 'manage_deleteMaintenanceWindow') - def manage_deleteMaintenanceWindow(self, maintenanceIds=(), REQUEST=None): - "Delete a Maintenance Window to this device" - import types - if type(maintenanceIds) in types.StringTypes: - maintenanceIds = [maintenanceIds] - for id in maintenanceIds: - self.maintenanceWindows._delObject(id) - if REQUEST: - if maintenanceIds: - REQUEST['message'] = "Maintenace Window Deleted" - return self.callZenScreen(REQUEST) - - - security.declareProtected('Change Device', 'manage_addAdministrativeRole') - def manage_addAdministrativeRole(self, newId=None, REQUEST=None): - "Add a Admin Role to this device" - from AdministrativeRole import DevOrgAdministrativeRole - us = None - if newId: - us = self.ZenUsers.getUserSettings(newId) - if us: - ar = DevOrgAdministrativeRole(newId) - if us.defaultAdminRole: - ar.role = us.defaultAdminRole - ar.level = us.defaultAdminLevel - self.adminRoles._setObject(newId, ar) - ar = self.adminRoles._getOb(newId) - ar.userSetting.addRelation(us) - if REQUEST: - if us: - REQUEST['message'] = "Administrative Role Added" - return self.callZenScreen(REQUEST) - - - def manage_editAdministrativeRoles(self, ids=(), role=(), level=(), REQUEST=None): - """Edit list of admin roles. - """ - if type(ids) in types.StringTypes: - ids = [ids] - role = [role] - level = [level] - for i, id in enumerate(ids): - ar = self.adminRoles._getOb(id) - if ar.role != role[i]: ar.role = role[i] - if ar.level != level[i]: ar.level = level[i] - if REQUEST: - REQUEST['message'] = "Administrative Roles Updated" - return self.callZenScreen(REQUEST) - - - security.declareProtected('Change Device','manage_deleteAdministrativeRole') - def manage_deleteAdministrativeRole(self, delids=(), REQUEST=None): - "Delete a admin role to this device" - if type(delids) in types.StringTypes: - delids = [delids] - for id in delids: - self.adminRoles._delObject(id) - if REQUEST: - if delids: - REQUEST['message'] = "Administrative Roles Deleted" - return self.callZenScreen(REQUEST) - - def getUserCommandTargets(self): ''' Called by Commandable.doCommand() to ascertain objects on which a UserCommand should be executed. Modified: trunk/Products/ZenModel/MaintenanceWindow.py =================================================================== --- trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-05 21:07:19 UTC (rev 4526) +++ trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-05 21:59:01 UTC (rev 4527) @@ -106,9 +106,13 @@ ) }, ) + + backCrumb = 'deviceManagement' + #backCrumb = 'deviceOrganizerManage' + _relations = ( + ("productionState", ToOne(ToManyCont, "Products.ZenModel.MaintenanceWindowable", "maintenanceWindows")), + ) - - security = ClassSecurityInfo() @@ -334,19 +338,7 @@ else: self.begin(now) -class DeviceMaintenanceWindow(MaintenanceWindow): - backCrumb = 'deviceManagement' - _relations = ( - ("productionState", ToOne(ToManyCont, "Products.ZenModel.Device", "maintenanceWindows")), - ) -class OrganizerMaintenanceWindow(MaintenanceWindow): - backCrumb = 'deviceOrganizerManage' - _relations = ( - ("productionState", ToOne(ToManyCont, "Products.ZenModel.DeviceOrganizer", "maintenanceWindows")), - ) - - if __name__=='__main__': m = MaintenanceWindow('tester') t = time.mktime( (2006, 1, 29, 10, 45, 12, 6, 29, 0) ) Added: trunk/Products/ZenModel/MaintenanceWindowable.py Modified: trunk/Products/ZenModel/UserSettings.py =================================================================== --- trunk/Products/ZenModel/UserSettings.py 2007-04-05 21:07:19 UTC (rev 4526) +++ trunk/Products/ZenModel/UserSettings.py 2007-04-05 21:59:01 UTC (rev 4527) @@ -23,8 +23,6 @@ from Products.ZenRelations.RelSchema import * from ZenModelRM import ZenModelRM -from AdministrativeRole import DeviceAdministrativeRole, \ - DevOrgAdministrativeRole import Products.ZenUtils.Utils as Utils import smtplib @@ -514,10 +512,7 @@ REQUEST['message'] = "Role exists on %s %s" % (type, name) return self.callZenScreen(REQUEST) else: return - if name.startswith('/'): - ar = DevOrgAdministrativeRole(self.id) - else: - ar = DeviceAdministrativeRole(self.id) + ar = AdministrativeRole(self.id) if self.defaultAdminRole: ar.role = self.defaultAdminRole ar.level = self.defaultAdminLevel |
From: <sv...@ze...> - 2007-04-05 21:07:46
|
Author: marc Date: 2007-04-05 17:07:19 -0400 (Thu, 05 Apr 2007) New Revision: 4526 Modified: trunk/Products/ZenEvents/ActionRule.py trunk/Products/ZenEvents/ActionRuleWindow.py trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenModel/AdministrativeRole.py trunk/Products/ZenModel/CPU.py trunk/Products/ZenModel/DataRoot.py trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/DeviceGroup.py trunk/Products/ZenModel/DeviceHW.py trunk/Products/ZenModel/DeviceOrganizer.py trunk/Products/ZenModel/ExpansionCard.py trunk/Products/ZenModel/FileSystem.py trunk/Products/ZenModel/HardDisk.py trunk/Products/ZenModel/IpAddress.py trunk/Products/ZenModel/IpInterface.py trunk/Products/ZenModel/IpNetwork.py trunk/Products/ZenModel/IpRouteEntry.py trunk/Products/ZenModel/IpService.py trunk/Products/ZenModel/Location.py trunk/Products/ZenModel/MEProduct.py trunk/Products/ZenModel/MaintenanceWindow.py trunk/Products/ZenModel/ManagedEntity.py trunk/Products/ZenModel/Manufacturer.py trunk/Products/ZenModel/MibModule.py trunk/Products/ZenModel/MibNode.py trunk/Products/ZenModel/MibNotification.py trunk/Products/ZenModel/MibOrganizer.py trunk/Products/ZenModel/NagiosCmd.py trunk/Products/ZenModel/NagiosTemplate.py trunk/Products/ZenModel/OSProcess.py trunk/Products/ZenModel/OSProcessClass.py trunk/Products/ZenModel/OSProcessOrganizer.py trunk/Products/ZenModel/OperatingSystem.py trunk/Products/ZenModel/PerformanceConf.py trunk/Products/ZenModel/ProductClass.py trunk/Products/ZenModel/RRDDataPoint.py trunk/Products/ZenModel/RRDDataSource.py trunk/Products/ZenModel/RRDGraph.py trunk/Products/ZenModel/RRDTemplate.py trunk/Products/ZenModel/RRDThreshold.py trunk/Products/ZenModel/Service.py trunk/Products/ZenModel/ServiceClass.py trunk/Products/ZenModel/ServiceOrganizer.py trunk/Products/ZenModel/Software.py trunk/Products/ZenModel/StatusMonitorConf.py trunk/Products/ZenModel/System.py trunk/Products/ZenModel/UBRRouter.py trunk/Products/ZenModel/UserCommand.py trunk/Products/ZenModel/UserSettings.py trunk/Products/ZenModel/WinService.py trunk/Products/ZenModel/ZenMenu.py trunk/Products/ZenModel/ZenMenuItem.py trunk/Products/ZenModel/ZenModelRM.py trunk/Products/ZenModel/ZenPack.py trunk/Products/ZenModel/ZenPackable.py trunk/Products/ZenModel/migrate/datapoints.py trunk/Products/ZenRRD/RRDToolItem.py trunk/Products/ZenRelations/RelationshipBase.py trunk/Products/ZenRelations/RelationshipManager.py trunk/Products/ZenRelations/checkrel.py trunk/Products/ZenRelations/tests/TestSchema.py Log: #1157 * Changed relative class paths in relations to absolute class paths * Removed baseModule attributes Modified: trunk/Products/ZenEvents/ActionRule.py =================================================================== --- trunk/Products/ZenEvents/ActionRule.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenEvents/ActionRule.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -66,7 +66,6 @@ actionTypes = ("page", "email") targetAddr = "" - zenRelationsBaseModule = "Products.ZenEvents" _properties = ZenModelRM._properties + ( {'id':'where', 'type':'text', 'mode':'w'}, {'id':'format', 'type':'text', 'mode':'w'}, @@ -80,9 +79,8 @@ {'id':'targetAddr', 'type':'string', 'mode':'w'}, ) - zenRelationsBaseModule = "Products.ZenEvents" _relations = ( - ("windows", ToManyCont(ToOne,"ActionRuleWindow","actionRule")), + ("windows", ToManyCont(ToOne,"Products.ZenEvents.ActionRuleWindow","actionRule")), ) factory_type_information = ( Modified: trunk/Products/ZenEvents/ActionRuleWindow.py =================================================================== --- trunk/Products/ZenEvents/ActionRuleWindow.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenEvents/ActionRuleWindow.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -48,9 +48,8 @@ }, ) - zenRelationsBaseModule = "Products.ZenEvents" _relations = ( - ("actionRule", ToOne(ToManyCont,"ActionRule","windows")), + ("actionRule", ToOne(ToManyCont,"Products.ZenEvents.ActionRule","windows")), ) def target(self): Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -188,9 +188,8 @@ {'id':'eventAgingSeverity', 'type':'int', 'mode':'w'}, ) - zenRelationsBaseModule = "Products.ZenEvents" _relations = ( - ("commands", ToManyCont(ToOne, "EventCommand", "eventManager")), + ("commands", ToManyCont(ToOne, "Products.ZenEvents.EventCommand", "eventManager")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/AdministrativeRole.py =================================================================== --- trunk/Products/ZenModel/AdministrativeRole.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/AdministrativeRole.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -13,7 +13,7 @@ meta_type = "AdministrativeRole" _relations = ( - ("userSetting", ToOne(ToMany, "UserSettings", "adminRoles")), + ("userSetting", ToOne(ToMany, "Products.ZenModel.UserSettings", "adminRoles")), ) level = 1 @@ -55,7 +55,7 @@ meta_type = "DeviceAdministrativeRole" _relations = AdministrativeRole._relations + ( - ("managedObject", ToOne(ToManyCont, "Device", "adminRoles")), + ("managedObject", ToOne(ToManyCont, "Products.ZenModel.Device", "adminRoles")), ) @@ -64,7 +64,7 @@ meta_type = "DevOrgAdministrativeRole" _relations = AdministrativeRole._relations + ( - ("managedObject", ToOne(ToManyCont, "DeviceOrganizer", "adminRoles")), + ("managedObject", ToOne(ToManyCont, "Products.ZenModel.DeviceOrganizer", "adminRoles")), ) def managedObjectName(self): Modified: trunk/Products/ZenModel/CPU.py =================================================================== --- trunk/Products/ZenModel/CPU.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/CPU.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -42,7 +42,7 @@ ) _relations = HWComponent._relations + ( - ("hw", ToOne(ToManyCont, "DeviceHW", "cpus")), + ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "cpus")), ) Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/DataRoot.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -97,10 +97,10 @@ ) _relations = ( - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), - ('packs', ToManyCont(ToOne, 'ZenPack', 'root')), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), + ('packs', ToManyCont(ToOne, 'Products.ZenModel.ZenPack', 'root')), ('zenMenus', ToManyCont( - ToOne, 'ZenMenu', 'menuable')), + ToOne, 'Products.ZenModel.ZenMenu', 'menuable')), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/Device.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -227,17 +227,17 @@ ) _relations = ManagedEntity._relations + ( - ("deviceClass", ToOne(ToManyCont, "DeviceClass", "devices")), - #("termserver", ToOne(ToMany, "TerminalServer", "devices")), - ("monitors", ToMany(ToMany, "StatusMonitorConf", "devices")), - ("perfServer", ToOne(ToMany, "PerformanceConf", "devices")), - ("location", ToOne(ToMany, "Location", "devices")), - ("systems", ToMany(ToMany, "System", "devices")), - ("groups", ToMany(ToMany, "DeviceGroup", "devices")), - ("maintenanceWindows",ToManyCont(ToOne, "MaintenanceWindow", "productionState")), - ("adminRoles", ToManyCont(ToOne,"AdministrativeRole","managedObject")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), - #("dhcpubrclients", ToMany(ToMany, "UBRRouter", "dhcpservers")), + ("deviceClass", ToOne(ToManyCont, "Products.ZenModel.DeviceClass", "devices")), + #("termserver", ToOne(ToMany, "Products.ZenModel.TerminalServer", "devices")), + ("monitors", ToMany(ToMany, "Products.ZenModel.StatusMonitorConf", "devices")), + ("perfServer", ToOne(ToMany, "Products.ZenModel.PerformanceConf", "devices")), + ("location", ToOne(ToMany, "Products.ZenModel.Location", "devices")), + ("systems", ToMany(ToMany, "Products.ZenModel.System", "devices")), + ("groups", ToMany(ToMany, "Products.ZenModel.DeviceGroup", "devices")), + ("maintenanceWindows",ToManyCont(ToOne, "Products.ZenModel.MaintenanceWindow", "productionState")), + ("adminRoles", ToManyCont(ToOne,"Products.ZenModel.AdministrativeRole","managedObject")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), + #("dhcpubrclients", ToMany(ToMany, "Products.ZenModel.UBRRouter", "dhcpservers")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -81,8 +81,8 @@ default_catalog = 'deviceSearch' _relations = DeviceOrganizer._relations + ( - ("devices", ToManyCont(ToOne,"Device","deviceClass")), - ("rrdTemplates", ToManyCont(ToOne,"RRDTemplate","deviceClass")), + ("devices", ToManyCont(ToOne,"Products.ZenModel.Device","deviceClass")), + ("rrdTemplates", ToManyCont(ToOne,"Products.ZenModel.RRDTemplate","deviceClass")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/DeviceGroup.py =================================================================== --- trunk/Products/ZenModel/DeviceGroup.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/DeviceGroup.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -43,7 +43,7 @@ portal_type = meta_type = event_key = 'DeviceGroup' _relations = DeviceOrganizer._relations + ( - ("devices", ToMany(ToMany,"Device","groups")), + ("devices", ToMany(ToMany,"Products.ZenModel.Device","groups")), ) InitializeClass(DeviceGroup) Modified: trunk/Products/ZenModel/DeviceHW.py =================================================================== --- trunk/Products/ZenModel/DeviceHW.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/DeviceHW.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -32,9 +32,9 @@ ) _relations = Hardware._relations + ( - ("cpus", ToManyCont(ToOne, "CPU", "hw")), - ("cards", ToManyCont(ToOne, "ExpansionCard", "hw")), - ("harddisks", ToManyCont(ToOne, "HardDisk", "hw")), + ("cpus", ToManyCont(ToOne, "Products.ZenModel.CPU", "hw")), + ("cards", ToManyCont(ToOne, "Products.ZenModel.ExpansionCard", "hw")), + ("harddisks", ToManyCont(ToOne, "Products.ZenModel.HardDisk", "hw")), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/DeviceOrganizer.py =================================================================== --- trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -75,11 +75,11 @@ _relations = Organizer._relations + ( ("maintenanceWindows", - ToManyCont(ToOne, "MaintenanceWindow", "productionState")), - ("adminRoles", ToManyCont(ToOne,"AdministrativeRole","managedObject")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ToManyCont(ToOne, "Products.ZenModel.MaintenanceWindow", "productionState")), + ("adminRoles", ToManyCont(ToOne,"Products.ZenModel.AdministrativeRole","managedObject")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ('zenMenus', ToManyCont( - ToOne, 'ZenMenu', 'menuable')), + ToOne, 'Products.ZenModel.ZenMenu', 'menuable')), ) def getSubDevices(self, devfilter=None, devrel="devices"): Modified: trunk/Products/ZenModel/ExpansionCard.py =================================================================== --- trunk/Products/ZenModel/ExpansionCard.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ExpansionCard.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -35,7 +35,7 @@ ) _relations = HWComponent._relations + ( - ("hw", ToOne(ToManyCont, "DeviceHW", "cards")), + ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "cards")), ) Modified: trunk/Products/ZenModel/FileSystem.py =================================================================== --- trunk/Products/ZenModel/FileSystem.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/FileSystem.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -60,7 +60,7 @@ {'id':'maxNameLen', 'type':'int', 'mode':''}, ) _relations = OSComponent._relations + ( - ("os", ToOne(ToManyCont, "OperatingSystem", "filesystems")), + ("os", ToOne(ToManyCont, "Products.ZenModel.OperatingSystem", "filesystems")), ) Modified: trunk/Products/ZenModel/HardDisk.py =================================================================== --- trunk/Products/ZenModel/HardDisk.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/HardDisk.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -49,7 +49,7 @@ ) _relations = HWComponent._relations + ( - ("hw", ToOne(ToManyCont, "DeviceHW", "harddisks")), + ("hw", ToOne(ToManyCont, "Products.ZenModel.DeviceHW", "harddisks")), ) Modified: trunk/Products/ZenModel/IpAddress.py =================================================================== --- trunk/Products/ZenModel/IpAddress.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/IpAddress.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -68,9 +68,9 @@ {'id':'ptrName', 'type':'string', 'mode':'w'}, ) _relations = ManagedEntity._relations + ( - ("network", ToOne(ToManyCont,"IpNetwork","ipaddresses")), - ("interface", ToOne(ToMany,"IpInterface","ipaddresses")), - ("clientroutes", ToMany(ToOne,"IpRouteEntry","nexthop")), + ("network", ToOne(ToManyCont,"Products.ZenModel.IpNetwork","ipaddresses")), + ("interface", ToOne(ToMany,"Products.ZenModel.IpInterface","ipaddresses")), + ("clientroutes", ToMany(ToOne,"Products.ZenModel.IpRouteEntry","nexthop")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/IpInterface.py =================================================================== --- trunk/Products/ZenModel/IpInterface.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/IpInterface.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -88,9 +88,9 @@ ) _relations = OSComponent._relations + ( - ("os", ToOne(ToManyCont,"OperatingSystem","interfaces")), - ("ipaddresses", ToMany(ToOne,"IpAddress","interface")), - ("iproutes", ToMany(ToOne,"IpRouteEntry","interface")), + ("os", ToOne(ToManyCont,"Products.ZenModel.OperatingSystem","interfaces")), + ("ipaddresses", ToMany(ToOne,"Products.ZenModel.IpAddress","interface")), + ("iproutes", ToMany(ToOne,"Products.ZenModel.IpRouteEntry","interface")), ) zNoPropertiesCopy = ('ips','macaddress') Modified: trunk/Products/ZenModel/IpNetwork.py =================================================================== --- trunk/Products/ZenModel/IpNetwork.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/IpNetwork.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -77,9 +77,9 @@ ) _relations = DeviceOrganizer._relations + ( - ("ipaddresses", ToManyCont(ToOne, "IpAddress", "network")), - ("clientroutes", ToMany(ToOne,"IpRouteEntry","target")), - ("location", ToOne(ToMany, "Location", "networks")), + ("ipaddresses", ToManyCont(ToOne, "Products.ZenModel.IpAddress", "network")), + ("clientroutes", ToMany(ToOne,"Products.ZenModel.IpRouteEntry","target")), + ("location", ToOne(ToMany, "Products.ZenModel.Location", "networks")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/IpRouteEntry.py =================================================================== --- trunk/Products/ZenModel/IpRouteEntry.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/IpRouteEntry.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -82,10 +82,10 @@ {'id':'metric5', 'type':'int', 'mode':''}, ) _relations = OSComponent._relations + ( - ("os", ToOne(ToManyCont,"OperatingSystem","routes")), - ("interface", ToOne(ToMany,"IpInterface","iproutes")), - ("nexthop", ToOne(ToMany,"IpAddress","clientroutes")), - ("target", ToOne(ToMany,"IpNetwork","clientroutes")), + ("os", ToOne(ToManyCont,"Products.ZenModel.OperatingSystem","routes")), + ("interface", ToOne(ToMany,"Products.ZenModel.IpInterface","iproutes")), + ("nexthop", ToOne(ToMany,"Products.ZenModel.IpAddress","clientroutes")), + ("target", ToOne(ToMany,"Products.ZenModel.IpNetwork","clientroutes")), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/IpService.py =================================================================== --- trunk/Products/ZenModel/IpService.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/IpService.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -65,7 +65,7 @@ {'id':'discoveryAgent', 'type':'string', 'mode':''}, ) _relations = Service._relations + ( - ("os", ToOne(ToManyCont,"OperatingSystem","ipservices")), + ("os", ToOne(ToManyCont,"Products.ZenModel.OperatingSystem","ipservices")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/Location.py =================================================================== --- trunk/Products/ZenModel/Location.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/Location.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -47,8 +47,8 @@ portal_type = meta_type = event_key = 'Location' _relations = DeviceOrganizer._relations + ( - ("devices", ToMany(ToOne,"Device","location")), - ("networks", ToMany(ToOne,"IpNetwork","location")), + ("devices", ToMany(ToOne,"Products.ZenModel.Device","location")), + ("networks", ToMany(ToOne,"Products.ZenModel.IpNetwork","location")), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/MEProduct.py =================================================================== --- trunk/Products/ZenModel/MEProduct.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MEProduct.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -18,7 +18,7 @@ """ _relations = ManagedEntity._relations + ( - ("productClass", ToOne(ToMany, "ProductClass", "instances")), + ("productClass", ToOne(ToMany, "Products.ZenModel.ProductClass", "instances")), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/MaintenanceWindow.py =================================================================== --- trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MaintenanceWindow.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -337,13 +337,13 @@ class DeviceMaintenanceWindow(MaintenanceWindow): backCrumb = 'deviceManagement' _relations = ( - ("productionState", ToOne(ToManyCont, "Device", "maintenanceWindows")), + ("productionState", ToOne(ToManyCont, "Products.ZenModel.Device", "maintenanceWindows")), ) class OrganizerMaintenanceWindow(MaintenanceWindow): backCrumb = 'deviceOrganizerManage' _relations = ( - ("productionState", ToOne(ToManyCont, "DeviceOrganizer", "maintenanceWindows")), + ("productionState", ToOne(ToManyCont, "Products.ZenModel.DeviceOrganizer", "maintenanceWindows")), ) Modified: trunk/Products/ZenModel/ManagedEntity.py =================================================================== --- trunk/Products/ZenModel/ManagedEntity.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ManagedEntity.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -41,8 +41,8 @@ ) _relations = ( - ("dependencies", ToMany(ToMany, "ManagedEntity", "dependents")), - ("dependents", ToMany(ToMany, "ManagedEntity", "dependencies")), + ("dependencies", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependents")), + ("dependents", ToMany(ToMany, "Products.ZenModel.ManagedEntity", "dependencies")), ) def device(self): Modified: trunk/Products/ZenModel/Manufacturer.py =================================================================== --- trunk/Products/ZenModel/Manufacturer.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/Manufacturer.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -59,7 +59,7 @@ ) _relations = ZenPackable._relations + ( - ("products", ToManyCont(ToOne,"ProductClass","manufacturer")), + ("products", ToManyCont(ToOne,"Products.ZenModel.ProductClass","manufacturer")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/MibModule.py =================================================================== --- trunk/Products/ZenModel/MibModule.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MibModule.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -26,9 +26,9 @@ ) _relations = ZenPackable._relations + ( - ("miborganizer", ToOne(ToManyCont, "MibOrganizer", "mibs")), - ("nodes", ToManyCont(ToOne, "MibNode", "module")), - ("notifications", ToManyCont(ToOne, "MibNotification", "module")), + ("miborganizer", ToOne(ToManyCont, "Products.ZenModel.MibOrganizer", "mibs")), + ("nodes", ToManyCont(ToOne, "Products.ZenModel.MibNode", "module")), + ("notifications", ToManyCont(ToOne, "Products.ZenModel.MibNotification", "module")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/MibNode.py =================================================================== --- trunk/Products/ZenModel/MibNode.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MibNode.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -22,7 +22,7 @@ ) _relations = ( - ("module", ToOne(ToManyCont, "MibModule", "nodes")), + ("module", ToOne(ToManyCont, "Products.ZenModel.MibModule", "nodes")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/MibNotification.py =================================================================== --- trunk/Products/ZenModel/MibNotification.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MibNotification.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -22,7 +22,7 @@ ) _relations = ( - ("module", ToOne(ToManyCont, "MibModule", "notifications")), + ("module", ToOne(ToManyCont, "Products.ZenModel.MibModule", "notifications")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/MibOrganizer.py =================================================================== --- trunk/Products/ZenModel/MibOrganizer.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/MibOrganizer.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -41,7 +41,7 @@ security = ClassSecurityInfo() _relations = Organizer._relations + ( - ("mibs", ToManyCont(ToOne,"MibModule","miborganizer")), + ("mibs", ToManyCont(ToOne,"Products.ZenModel.MibModule","miborganizer")), ) Modified: trunk/Products/ZenModel/NagiosCmd.py =================================================================== --- trunk/Products/ZenModel/NagiosCmd.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/NagiosCmd.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -43,7 +43,7 @@ ) _relations = ( - ("nagiosTemplate", ToOne(ToManyCont, "NagiosTemplate", "nagiosCmds")), + ("nagiosTemplate", ToOne(ToManyCont, "Products.ZenModel.NagiosTemplate", "nagiosCmds")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/NagiosTemplate.py =================================================================== --- trunk/Products/ZenModel/NagiosTemplate.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/NagiosTemplate.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -51,8 +51,8 @@ ) _relations = ( - ("deviceClass", ToOne(ToManyCont, "DeviceClass", "nagiosTemplates")), - ("nagiosCmds", ToManyCont(ToOne, "NagiosCmd", "nagiosTemplate")), + ("deviceClass", ToOne(ToManyCont, "Products.ZenModel.DeviceClass", "nagiosTemplates")), + ("nagiosCmds", ToManyCont(ToOne, "Products.ZenModel.NagiosCmd", "nagiosTemplate")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/OSProcess.py =================================================================== --- trunk/Products/ZenModel/OSProcess.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/OSProcess.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -49,9 +49,9 @@ ) _relations = OSComponent._relations + ZenPackable._relations + ( - ("os", ToOne(ToManyCont, "OperatingSystem", "processes")), - ("osProcessClass", ToOne(ToMany, "OSProcessClass", "instances")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ("os", ToOne(ToManyCont, "Products.ZenModel.OperatingSystem", "processes")), + ("osProcessClass", ToOne(ToMany, "Products.ZenModel.OSProcessClass", "instances")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) factory_type_information = ( Modified: trunk/Products/ZenModel/OSProcessClass.py =================================================================== --- trunk/Products/ZenModel/OSProcessClass.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/OSProcessClass.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -49,10 +49,10 @@ ) _relations = ( - ("instances", ToMany(ToOne, "OSProcess", "osProcessClass")), + ("instances", ToMany(ToOne, "Products.ZenModel.OSProcess", "osProcessClass")), ("osProcessOrganizer", - ToOne(ToManyCont,"OSProcessOrganizer","osProcessClasses")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ToOne(ToManyCont,"Products.ZenModel.OSProcessOrganizer","osProcessClasses")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) Modified: trunk/Products/ZenModel/OSProcessOrganizer.py =================================================================== --- trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -43,8 +43,8 @@ _relations = Organizer._relations + ( ("osProcessClasses", ToManyCont( - ToOne,"OSProcessClass","osProcessOrganizer")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ToOne,"Products.ZenModel.OSProcessClass","osProcessOrganizer")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) factory_type_information = ( Modified: trunk/Products/ZenModel/OperatingSystem.py =================================================================== --- trunk/Products/ZenModel/OperatingSystem.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/OperatingSystem.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -42,13 +42,13 @@ ) _relations = Software._relations + ( - ("interfaces", ToManyCont(ToOne, "IpInterface", "os")), - ("routes", ToManyCont(ToOne, "IpRouteEntry", "os")), - ("ipservices", ToManyCont(ToOne, "IpService", "os")), - ("winservices", ToManyCont(ToOne, "WinService", "os")), - ("processes", ToManyCont(ToOne, "OSProcess", "os")), - ("filesystems", ToManyCont(ToOne, "FileSystem", "os")), - ("software", ToManyCont(ToOne, "Software", "os")), + ("interfaces", ToManyCont(ToOne, "Products.ZenModel.IpInterface", "os")), + ("routes", ToManyCont(ToOne, "Products.ZenModel.IpRouteEntry", "os")), + ("ipservices", ToManyCont(ToOne, "Products.ZenModel.IpService", "os")), + ("winservices", ToManyCont(ToOne, "Products.ZenModel.WinService", "os")), + ("processes", ToManyCont(ToOne, "Products.ZenModel.OSProcess", "os")), + ("filesystems", ToManyCont(ToOne, "Products.ZenModel.FileSystem", "os")), + ("software", ToManyCont(ToOne, "Products.ZenModel.Software", "os")), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/PerformanceConf.py =================================================================== --- trunk/Products/ZenModel/PerformanceConf.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/PerformanceConf.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -93,7 +93,7 @@ {'id':'defaultRRDCreateCommand','type':'lines','mode':'w'}, ) _relations = Monitor._relations + ( - ("devices", ToMany(ToOne,"Device","perfServer")), + ("devices", ToMany(ToOne,"Products.ZenModel.Device","perfServer")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/ProductClass.py =================================================================== --- trunk/Products/ZenModel/ProductClass.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ProductClass.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -41,8 +41,8 @@ ) _relations = ( - ("instances", ToMany(ToOne, "MEProduct", "productClass")), - ("manufacturer", ToOne(ToManyCont,"Manufacturer","products")), + ("instances", ToMany(ToOne, "Products.ZenModel.MEProduct", "productClass")), + ("manufacturer", ToOne(ToManyCont,"Products.ZenModel.Manufacturer","products")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/RRDDataPoint.py =================================================================== --- trunk/Products/ZenModel/RRDDataPoint.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/RRDDataPoint.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -83,7 +83,7 @@ _relations = ZenPackable._relations + ( - ("datasource", ToOne(ToManyCont,"RRDDataSource","datapoints")), + ("datasource", ToOne(ToManyCont,"Products.ZenModel.RRDDataSource","datapoints")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/RRDDataSource.py =================================================================== --- trunk/Products/ZenModel/RRDDataSource.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/RRDDataSource.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -127,8 +127,8 @@ ) _relations = ZenPackable._relations + ( - ("rrdTemplate", ToOne(ToManyCont,"RRDTemplate","datasources")), - ("datapoints", ToManyCont(ToOne,"RRDDataPoint","datasource")), + ("rrdTemplate", ToOne(ToManyCont,"Products.ZenModel.RRDTemplate","datasources")), + ("datapoints", ToManyCont(ToOne,"Products.ZenModel.RRDDataPoint","datasource")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/RRDGraph.py =================================================================== --- trunk/Products/ZenModel/RRDGraph.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/RRDGraph.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -76,7 +76,7 @@ ) _relations = ( - ("rrdTemplate", ToOne(ToManyCont,"RRDTemplate", "graphs")), + ("rrdTemplate", ToOne(ToManyCont,"Products.ZenModel.RRDTemplate", "graphs")), ) colors = ( Modified: trunk/Products/ZenModel/RRDTemplate.py =================================================================== --- trunk/Products/ZenModel/RRDTemplate.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/RRDTemplate.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -60,10 +60,10 @@ ) _relations = ZenPackable._relations + ( - ("deviceClass", ToOne(ToManyCont,"DeviceClass", "rrdTemplates")), - ("datasources", ToManyCont(ToOne,"RRDDataSource", "rrdTemplate")), - ("graphs", ToManyCont(ToOne,"RRDGraph", "rrdTemplate")), - ("thresholds", ToManyCont(ToOne,"RRDThreshold", "rrdTemplate")), + ("deviceClass", ToOne(ToManyCont,"Products.ZenModel.DeviceClass", "rrdTemplates")), + ("datasources", ToManyCont(ToOne,"Products.ZenModel.RRDDataSource", "rrdTemplate")), + ("graphs", ToManyCont(ToOne,"Products.ZenModel.RRDGraph", "rrdTemplate")), + ("thresholds", ToManyCont(ToOne,"Products.ZenModel.RRDThreshold", "rrdTemplate")), ) Modified: trunk/Products/ZenModel/RRDThreshold.py =================================================================== --- trunk/Products/ZenModel/RRDThreshold.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/RRDThreshold.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -67,7 +67,7 @@ ) _relations = ZenPackable._relations + ( - ("rrdTemplate", ToOne(ToManyCont,"RRDTemplate", "thresholds")), + ("rrdTemplate", ToOne(ToManyCont,"Products.ZenModel.RRDTemplate", "thresholds")), ) Modified: trunk/Products/ZenModel/Service.py =================================================================== --- trunk/Products/ZenModel/Service.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/Service.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -28,8 +28,8 @@ portal_type = meta_type = 'Service' _relations = OSComponent._relations + ZenPackable._relations + ( - ("serviceclass", ToOne(ToMany,"ServiceClass","instances")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ("serviceclass", ToOne(ToMany,"Products.ZenModel.ServiceClass","instances")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/ServiceClass.py =================================================================== --- trunk/Products/ZenModel/ServiceClass.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ServiceClass.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -57,10 +57,10 @@ ) _relations = ZenPackable._relations + ( - ("instances", ToMany(ToOne, "Service", "serviceclass")), + ("instances", ToMany(ToOne, "Products.ZenModel.Service", "serviceclass")), ("serviceorganizer", - ToOne(ToManyCont,"ServiceOrganizer","serviceclasses")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ToOne(ToManyCont,"Products.ZenModel.ServiceOrganizer","serviceclasses")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) Modified: trunk/Products/ZenModel/ServiceOrganizer.py =================================================================== --- trunk/Products/ZenModel/ServiceOrganizer.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ServiceOrganizer.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -43,8 +43,8 @@ ) _relations = Organizer._relations + ( - ("serviceclasses", ToManyCont(ToOne,"ServiceClass","serviceorganizer")), - ('userCommands', ToManyCont(ToOne, 'UserCommand', 'commandable')), + ("serviceclasses", ToManyCont(ToOne,"Products.ZenModel.ServiceClass","serviceorganizer")), + ('userCommands', ToManyCont(ToOne, 'Products.ZenModel.UserCommand', 'commandable')), ) factory_type_information = ( Modified: trunk/Products/ZenModel/Software.py =================================================================== --- trunk/Products/ZenModel/Software.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/Software.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -48,7 +48,7 @@ ) _relations = MEProduct._relations + ( - ("os", ToOne(ToManyCont, "OperatingSystem", "software")), + ("os", ToOne(ToManyCont, "Products.ZenModel.OperatingSystem", "software")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/StatusMonitorConf.py =================================================================== --- trunk/Products/ZenModel/StatusMonitorConf.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/StatusMonitorConf.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -73,7 +73,7 @@ {'id':'maxFailures','type':'int','mode':'w'}, ) _relations = ( - ("devices", ToMany(ToMany,"Device","monitors")), + ("devices", ToMany(ToMany,"Products.ZenModel.Device","monitors")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/System.py =================================================================== --- trunk/Products/ZenModel/System.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/System.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -59,7 +59,7 @@ {'id':'description', 'type':'text', 'mode':'w'}, ) _relations = DeviceOrganizer._relations + ( - ("devices", ToMany(ToMany, "Device", "systems")), + ("devices", ToMany(ToMany, "Products.ZenModel.Device", "systems")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/UBRRouter.py =================================================================== --- trunk/Products/ZenModel/UBRRouter.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/UBRRouter.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -41,7 +41,7 @@ portal_type = meta_type = 'UBRRouter' _relations = Device._relations + ( - ("dhcpservers", ToMany(ToMany, "Device", "dhcpubrclients")), + ("dhcpservers", ToMany(ToMany, "Products.ZenModel.Device", "dhcpubrclients")), ) Modified: trunk/Products/ZenModel/UserCommand.py =================================================================== --- trunk/Products/ZenModel/UserCommand.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/UserCommand.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -35,7 +35,7 @@ ) _relations = ( - ("commandable", ToOne(ToManyCont, 'Commandable', 'userCommands')), + ("commandable", ToOne(ToManyCont, 'Products.ZenModel.Commandable', 'userCommands')), ) Modified: trunk/Products/ZenModel/UserSettings.py =================================================================== --- trunk/Products/ZenModel/UserSettings.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/UserSettings.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -324,7 +324,7 @@ _relations = ( - ("adminRoles", ToMany(ToOne, "AdministrativeRole", "userSetting")), + ("adminRoles", ToMany(ToOne, "Products.ZenModel.AdministrativeRole", "userSetting")), ) # Screen action bindings (and tab definitions) Modified: trunk/Products/ZenModel/WinService.py =================================================================== --- trunk/Products/ZenModel/WinService.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/WinService.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -48,7 +48,7 @@ ) _relations = Service._relations + ( - ("os", ToOne(ToManyCont, "OperatingSystem", "winservices")), + ("os", ToOne(ToManyCont, "Products.ZenModel.OperatingSystem", "winservices")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/ZenMenu.py =================================================================== --- trunk/Products/ZenModel/ZenMenu.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ZenMenu.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -29,9 +29,9 @@ _relations = ZenPackable._relations + ( ("zenMenuItems", ToManyCont( - ToOne, 'ZenMenuItem', 'zenMenus')), + ToOne, 'Products.ZenModel.ZenMenuItem', 'zenMenus')), ("menuable", ToOne( - ToManyCont, 'ZenMenuable', 'zenMenus')), + ToManyCont, 'Products.ZenModel.ZenMenuable', 'zenMenus')), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/ZenMenuItem.py =================================================================== --- trunk/Products/ZenModel/ZenMenuItem.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ZenMenuItem.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -37,7 +37,7 @@ ) _relations = ( - ("zenMenus", ToOne(ToManyCont, 'ZenMenu', 'zenMenuItems')), + ("zenMenus", ToOne(ToManyCont, 'Products.ZenModel.ZenMenu', 'zenMenuItems')), ) security = ClassSecurityInfo() Modified: trunk/Products/ZenModel/ZenModelRM.py =================================================================== --- trunk/Products/ZenModel/ZenModelRM.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ZenModelRM.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -36,8 +36,6 @@ Catalog Indexing, and Historical change tracking. """ - zenRelationsBaseModule = "Products.ZenModel" - meta_type = 'ZenModelRM' default_catalog = '' Modified: trunk/Products/ZenModel/ZenPack.py =================================================================== --- trunk/Products/ZenModel/ZenPack.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ZenPack.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -48,8 +48,8 @@ ) _relations = ( - ('root', ToOne(ToManyCont, 'DataRoot', 'packs')), - ("packables", ToMany(ToOne, "ZenPackable", "pack")), + ('root', ToOne(ToManyCont, 'Products.ZenModel.DataRoot', 'packs')), + ("packables", ToMany(ToOne, "Products.ZenModel.ZenPackable", "pack")), ) factory_type_information = ( Modified: trunk/Products/ZenModel/ZenPackable.py =================================================================== --- trunk/Products/ZenModel/ZenPackable.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/ZenPackable.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -14,6 +14,6 @@ meta_type = "ZenPackable" _relations = ( - ("pack", ToOne(ToMany, "ZenPack", "packables")), + ("pack", ToOne(ToMany, "Products.ZenModel.ZenPack", "packables")), ) Modified: trunk/Products/ZenModel/migrate/datapoints.py =================================================================== --- trunk/Products/ZenModel/migrate/datapoints.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenModel/migrate/datapoints.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -23,7 +23,7 @@ from Products.ZenModel.DeviceClass import DeviceClass from Products.ZenModel.NagiosTemplate import NagiosTemplate DeviceClass._relations = DeviceClass._relations + ( - ("nagiosTemplates", ToManyCont(ToOne,"NagiosTemplate","deviceClass")), + ("nagiosTemplates", ToManyCont(ToOne,"Products.ZenModel.NagiosTemplate","deviceClass")), ) MOVED_PROPERTIES = 'createCmd rrdtype isrow rpn rrdmax color linetype limit format'.split() Modified: trunk/Products/ZenRRD/RRDToolItem.py =================================================================== --- trunk/Products/ZenRRD/RRDToolItem.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenRRD/RRDToolItem.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -15,8 +15,6 @@ security = ClassSecurityInfo() - - zenRelationsBaseModule = "Products.ZenRRD" def getName(self): """Return the name of this item (take off the type from the id). Modified: trunk/Products/ZenRelations/RelationshipBase.py =================================================================== --- trunk/Products/ZenRelations/RelationshipBase.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenRelations/RelationshipBase.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -108,11 +108,7 @@ classdef = getattr(aq_base(self), "_v_remoteClass", None) if not classdef: schema = self.__primary_parent__.lookupSchema(self.id) - baseModule = getattr(self, "zenRelationsBaseModule", "") - try: - classdef = importClass(schema.remoteClass, baseModule) - except ZenImportError: - classdef = importClass(schema.remoteClass) + classdef = importClass(schema.remoteClass) self._v_remoteClass = classdef return classdef Modified: trunk/Products/ZenRelations/RelationshipManager.py =================================================================== --- trunk/Products/ZenRelations/RelationshipManager.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenRelations/RelationshipManager.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -63,14 +63,6 @@ class. Its a string because in most cases the classes will be in different modules which would cause a recursive import of the two modules. - - zenRelationsBaseModule - can be defined on a class or in its aq_chain to - Append a classes module to remoteClassStr. If the class - is defined in a file named the same as the class the lookup - will automatically append the final class name to the path. - ie Products.ZenModel.Device will lookup the class - Products.ZenModel.Device.Device defined in the file - Device.py. _relations = ( ("toonename", ToOne(ToMany, remoteClassStr, remoteName)), Modified: trunk/Products/ZenRelations/checkrel.py =================================================================== --- trunk/Products/ZenRelations/checkrel.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenRelations/checkrel.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -16,7 +16,7 @@ """ for relname, rel in cls._relations: try: - remoteClass = importClass(rel.remoteClass, baseModule) + remoteClass = importClass(rel.remoteClass, None) except AttributeError, e: logging.critical("RemoteClass '%s' from '%s.%s' not found", rel.remoteClass, cls.__name__, relname) @@ -33,7 +33,7 @@ rel.remoteName, cls.__name__, relname) logging.critical(e) try: - localClass = importClass(rschema.remoteClass, baseModule) + localClass = importClass(rschema.remoteClass, None) except AttributeError, e: logging.critical(e) if not issubclass(cls, localClass): Modified: trunk/Products/ZenRelations/tests/TestSchema.py =================================================================== --- trunk/Products/ZenRelations/tests/TestSchema.py 2007-04-05 20:41:55 UTC (rev 4525) +++ trunk/Products/ZenRelations/tests/TestSchema.py 2007-04-05 21:07:19 UTC (rev 4526) @@ -10,8 +10,8 @@ from Products.ZenRelations.Exceptions import * class TestBaseClass(RM): - zenRelationsBaseModule = "Products.ZenRelations.tests" - + pass + class DataRoot(TestBaseClass): def manage_afterAdd(self, item, container): @@ -62,10 +62,9 @@ ) class Admin(TestBaseClass): - zenRelationsBaseModule = "Products" _relations = ( ("server", ToOne(ToOne, - "ZenRelations.tests.TestSchema.Server", "admin")), + "Products.ZenRelations.tests.TestSchema.Server", "admin")), ) class Organizer(TestBaseClass): |
From: <sv...@ze...> - 2007-04-05 20:41:57
|
Author: ecn Date: 2007-04-05 16:41:55 -0400 (Thu, 05 Apr 2007) New Revision: 4525 Modified: trunk/Products/ZenRRD/RRDDaemon.py trunk/Products/ZenRRD/zencommand.py trunk/Products/ZenRRD/zenperfsnmp.py trunk/Products/ZenRRD/zenperfxmlrpc.py trunk/Products/ZenRRD/zenprocess.py Log: * merge PBDaemon and RRDDaemon Modified: trunk/Products/ZenRRD/RRDDaemon.py =================================================================== --- trunk/Products/ZenRRD/RRDDaemon.py 2007-04-05 19:53:34 UTC (rev 4524) +++ trunk/Products/ZenRRD/RRDDaemon.py 2007-04-05 20:41:55 UTC (rev 4525) @@ -18,18 +18,13 @@ import Globals from Products.ZenEvents import Event -from Products.ZenEvents.ZenEventClasses import Perf_Snmp, App_Start, App_Stop -from Products.ZenEvents.ZenEventClasses import Heartbeat +from Products.ZenEvents.ZenEventClasses import Perf_Snmp, Heartbeat from Products.ZenUtils.Driver import drive -from Products.ZenHub.zenhub import PB_PORT -from Products.ZenUtils.PBUtil import ReconnectingPBClientFactory -from twisted.cred import credentials from twisted.internet import reactor, defer from twisted.python import failure -from twisted.spread import pb -from Products.ZenUtils.ZenDaemon import ZenDaemon as Base +from Products.ZenHub.PBDaemon import PBDaemon as Base BAD_SEVERITY=Event.Warning @@ -120,69 +115,30 @@ def __iter__(self): return iter(self.thresholds.values()) -class RRDDaemon(Base, pb.Referenceable): +class RRDDaemon(Base): 'Holds the code common to performance gathering daemons.' - startevt = {'eventClass':App_Start, - 'summary': 'started', - 'severity': Event.Clear} - stopevt = {'eventClass':App_Stop, - 'summary': 'stopped', - 'severity': BAD_SEVERITY} heartbeatevt = {'eventClass':Heartbeat} - agent = None properties = ('configCycleInterval',) heartBeatTimeout = 60 configCycleInterval = 20 # minutes rrd = None shutdown = False - hubService = 'PerformanceConfig' def __init__(self, name): self.events = [] Base.__init__(self) - self.agent = name - for ev in self.startevt, self.stopevt, self.heartbeatevt: - ev['component'] = name - ev['device'] = socket.getfqdn() + self.name = name + evt = self.heartbeatevt.copy() + self.heartbeatevt.update(dict(component=name, + device=socket.getfqdn())) - def connect(self): - d = defer.Deferred() - def gotPerspective(perspective): - "Every time we reconnect this function is called" - def go(driver): - "Fetch the services we want" - self.log.debug("Getting event service") - yield perspective.callRemote('getService', 'EventService') - self.zem = driver.next() - if not self.zem: - raise failure.Failure("Cannot get EventManager Service") + def getDevicePingIssues(self): + if 'EventService' in self.services: + return self.services['EventService'].callRemote('getDevicePingIssues') + return defer.fail("Not connected to ZenHub") - self.log.debug("Getting Perf service") - yield perspective.callRemote('getService', self.hubService, - self.options.monitor, - self) - self.model = driver.next() - if not self.model: - raise failure.Failure("Cannot get %s Service" % - (self.hubService,)) - self.log.warning("Reconnected to ZenHub") - d2 = drive(go) - if not d.called: - d2.chainDeferred(d) - - factory = ReconnectingPBClientFactory() - self.log.debug("Connecting to %s", self.options.host) - reactor.connectTCP(self.options.host, self.options.port, factory) - username = self.options.username - password = self.options.password - self.log.debug("Logging in as %s", username) - c = credentials.UsernamePassword(username, password) - factory.gotPerspective = gotPerspective - factory.startLogin(c) - return d - def setPropertyItems(self, items): 'extract configuration elements used by this server' table = dict(items) @@ -198,76 +154,20 @@ "Send the right event class for threshhold events" self.sendEvent({}, **kw) - - def sendEvent(self, event, now=False, **kw): - 'convenience function for pushing an event to the Zope server' - ev = COMMON_EVENT_INFO.copy() - ev['agent'] = self.agent - ev.update(event) - ev.update(kw) - self.events.append(ev) - if now: - self.sendEvents() - else: - reactor.callLater(1, self.sendEvents) - - - def sendEvents(self): - 'convenience function for flushing events to the Zope server' - if self.events: - d = self.zem.callRemote('sendEvents', self.events) - d.addBoth(self.eventsSent, self.events) - self.events = [] - - def eventsSent(self, result, events): - if isinstance(result, failure.Failure): - self.error(result) - self.events.extend(events) - else: - self.events = self.events[len(events):] - if self.shutdown: - self._shutdown() - - def sigTerm(self, *unused): - 'controlled shutdown of main loop on interrupt' - try: - Base.sigTerm(self, *unused) - except SystemExit: - self._shutdown() - - def _shutdown(self): - self.shutdown = True - if not self.events: - reactor.callLater(0, reactor.stop) - else: - self.log.debug('waiting for events to flush') - reactor.callLater(5, reactor.stop) - def heartbeat(self, *unused): 'if cycling, send a heartbeat, else, shutdown' if not self.options.cycle: - self._shutdown() + self.stop() return self.sendEvent(self.heartbeatevt, timeout=self.heartBeatTimeout*3) - self.sendEvents() + def buildOptions(self): Base.buildOptions(self) - self.parser.add_option('--host', - dest="host",default="localhost", - help="hostname of zeo server") - self.parser.add_option('--port', - dest="port",type="int", default=PB_PORT, - help="port of zeo server") - self.parser.add_option("-u", "--username", - dest="username", help="username for hub server", - default='admin') - self.parser.add_option("--password", dest="password", default="zenoss") - self.parser.add_option('-d', '--device', dest='device', - help="Specify a specific device to monitor", - default='') - self.parser.add_option('--monitor', dest='monitor', default=socket.getfqdn(), - help="Specify a specific name of the monitor configuration") + self.parser.add_option('-d', '--device', + dest='device', + default='', + help="Specify a specific device to monitor") def logError(self, msg, error): if isinstance(error, failure.Failure): @@ -279,9 +179,15 @@ 'Log an error, including any traceback data for a failure Exception' self.logError('Error', error) if not self.options.cycle: - self._shutdown() + self.stop() def errorStop(self, why): self.error(why) - self._shutdown() + self.stop() + def model(self): + class Fake: + def callremote(self, *args, **kwargs): + return defer.fail("No connection to ZenHub") + return self.services.get(self.initialServices[-1], Fake()) + Modified: trunk/Products/ZenRRD/zencommand.py =================================================================== --- trunk/Products/ZenRRD/zencommand.py 2007-04-05 19:53:34 UTC (rev 4524) +++ trunk/Products/ZenRRD/zencommand.py 2007-04-05 20:41:55 UTC (rev 4525) @@ -359,22 +359,16 @@ class zencommand(RRDDaemon): - hubService = 'CommandConfig' + initialServices = RRDDaemon.initialServices + ['CommandConfig'] def __init__(self): RRDDaemon.__init__(self, 'zencommand') self.schedule = [] self.timeout = None self.deviceIssues = Set() - self.flushEvents() self.pool = SshPool() - def flushEvents(self): - self.sendEvents() - reactor.callLater(1, self.flushEvents) - - def updateConfig(self, config): current = dict([((c.device,c.command), c) for c in self.schedule]) update = [] @@ -407,7 +401,7 @@ if cmd.running() or cmd.lastStart == 0: break else: - self._shutdown() + self.stop() return try: if self.timeout and not self.timeout.called: @@ -524,13 +518,13 @@ def fetchConfig(self): def doFetchConfig(driver): try: - yield self.model.callRemote('propertyItems') + yield self.model().callRemote('propertyItems') self.setPropertyItems(driver.next()) - yield self.model.callRemote('getDefaultRRDCreateCommand') + yield self.model().callRemote('getDefaultRRDCreateCommand') createCommand = driver.next() - yield self.model.callRemote('getDataSourceCommands', + yield self.model().callRemote('getDataSourceCommands', self.options.device) self.updateConfig(driver.next()) @@ -552,7 +546,6 @@ yield self.fetchConfig() driver.next() log.debug('Finished config fetch') - print driver.next() except Exception, ex: log.exception(ex) driveLater(self.configCycleInterval * 60, self.start) @@ -567,17 +560,12 @@ default=10, type='int', help="number of devices to collect at one time") - def main(self, ignored): - self.sendEvent(self.startevt) - d = drive(self.start) - d.addCallbacks(self.processSchedule, self.errorStop) + def connected(self): + d = drive(self.start).addCallbacks(self.processSchedule, self.errorStop) if self.options.cycle: d.addCallback(self.heartbeatCycle) if __name__ == '__main__': z = zencommand() - d = z.connect() - d.addCallbacks(z.main, z.errorStop) - reactor.run() - # self.sendEvent(self.stopevt, now=True) + z.run() Modified: trunk/Products/ZenRRD/zenperfsnmp.py =================================================================== --- trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-05 19:53:34 UTC (rev 4524) +++ trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-05 20:41:55 UTC (rev 4525) @@ -23,6 +23,7 @@ import cPickle from twisted.internet import reactor, defer + try: from pynetsnmp.twistedsnmp import AgentProxy except ImportError: @@ -221,7 +222,7 @@ # these names need to match the property values in StatusMonitorConf maxRrdFileAge = 30 * (24*60*60) # seconds - hubService = 'SnmpPerfConfig' + initialServices = SnmpDaemon.initialServices + ['SnmpPerfConfig'] def __init__(self): SnmpDaemon.__init__(self, 'zenperfsnmp') @@ -262,34 +263,33 @@ not self.options.cycle: reactor.callLater(0, reactor.stop) - def startUpdateConfig(self, driver): 'Periodically ask the Zope server for basic configuration data.' log.info("fetching property items") - yield self.model.callRemote('propertyItems') + yield self.model().callRemote('propertyItems') self.setPropertyItems(driver.next()) driveLater(self.configCycleInterval * 60, self.startUpdateConfig) log.info("checking for outdated configs") current = [(k, v.lastChange) for k, v in self.proxies.items()] - yield self.model.callRemote('getDeviceUpdates', current) + yield self.model().callRemote('getDeviceUpdates', current) devices = driver.next() if self.options.device: devices = [self.options.device] log.info("fetching configs for %r", devices) - yield self.model.callRemote('getDevices', devices) + yield self.model().callRemote('getDevices', devices) self.updateDeviceList(devices, driver.next()) log.info("fetching snmp status") - yield self.model.callRemote('getSnmpStatus', self.options.device) + yield self.model().callRemote('getSnmpStatus', self.options.device) self.updateSnmpStatus(driver.next()) log.info("fetching default RRDCreateCommand") - yield self.model.callRemote('getDefaultRRDCreateCommand') + yield self.model().callRemote('getDefaultRRDCreateCommand') createCommand = driver.next() self.rrd = RRDUtil(createCommand, self.snmpCycleInterval) @@ -395,8 +395,10 @@ def scanCycle(self, *unused): reactor.callLater(self.snmpCycleInterval, self.scanCycle) self.log.debug("getting device ping issues") - d = self.zem.callRemote('getDevicePingIssues') - d.addBoth(self.setUnresponsiveDevices) + evtSvc = self.services.get('EventService', None) + if evtSvc: + d = evtSvc.callRemote('getDevicePingIssues') + d.addBoth(self.setUnresponsiveDevices) def setUnresponsiveDevices(self, arg): @@ -557,17 +559,12 @@ threshold.check(device, oidData.name, oid, value, self.sendThresholdEvent) - def main(self, ignored): + def connected(self): "Run forever, fetching and storing" - self.sendEvent(self.startevt) - drive(zpf.startUpdateConfig).addCallbacks(self.scanCycle, - self.errorStop) + d = drive(zpf.startUpdateConfig) + d.addCallbacks(self.scanCycle, self.errorStop) if __name__ == '__main__': zpf = zenperfsnmp() - d = zpf.connect() - d.addCallbacks(zpf.main, zpf.errorStop) - reactor.run(installSignalHandlers=False) - # fixme - # zpf.sendEvent(zpf.stopevt, now=True) + zpf.run() Modified: trunk/Products/ZenRRD/zenperfxmlrpc.py =================================================================== --- trunk/Products/ZenRRD/zenperfxmlrpc.py 2007-04-05 19:53:34 UTC (rev 4524) +++ trunk/Products/ZenRRD/zenperfxmlrpc.py 2007-04-05 20:41:55 UTC (rev 4525) @@ -122,7 +122,6 @@ xmlRpcStatusEvent = {'eventClass': Status_XmlRpc, 'component': 'xmlrpc', 'eventGroup': 'XmlRpcTest'} - hubService = 'XmlRPCConfig' def __init__(self, xmlRpcState): # if the number of Event.Error severity events on this device is @@ -167,7 +166,9 @@ class zenperfxmlrpc(RRDDaemon): "Periodically query all devices for XMLRPC values to archive in RRD files" - + + initialServices = RRDDaemon.initialServices + ['XmlRPCConfig'] + # these names need to match the property values in StatusMonitorConf maxRrdFileAge = 30 * (24*60*60) # seconds status = Status() @@ -222,17 +223,17 @@ driveLater(self.configCycleInterval * 60, self.startUpdateConfig) - yield self.model.callRemote('getXmlRpcDevices', self.options.device) + yield self.model().callRemote('getXmlRpcDevices', self.options.device) try: self.updateDeviceList(driver.next()) except Exception, ex: self.log.exception(ex) raise - yield self.model.callRemote('propertyItems') + yield self.model().callRemote('propertyItems') self.setPropertyItems(driver.next()) - yield self.model.callRemote('getDefaultRRDCreateCommand') + yield self.model().callRemote('getDefaultRRDCreateCommand') createCommand = driver.next() self.rrd = RRDUtil(createCommand, self.xmlrpcCycleInterval) @@ -313,7 +314,7 @@ def scanCycle(self, *unused): self.log.debug("getting device ping issues") - d = self.zem.callRemote('getDevicePingIssues') + d = self.getDevicePingIssues() d.addBoth(self.setUnresponsiveDevices) reactor.callLater(self.xmlrpcCycleInterval, self.scanCycle) @@ -500,16 +501,12 @@ v, self.sendThresholdEvent) - def main(self, ignored): + def connected(self): "Run forever, fetching and storing" + d = drive(zpf.startUpdateConfig) + d.addCallbacks(self.scanCycle, self.errorStop) - self.sendEvent(self.startevt) - drive(zpf.startUpdateConfig).addCallbacks(self.scanCycle, - self.errorStop) - if __name__ == '__main__': zpf = zenperfxmlrpc() - zpf.connect().addCallbacks(zpf.main, zpf.errorStop) - reactor.run(installSignalHandlers=False) - #self.sendEvent(self.stopevt, now=True) + zpf.run() Modified: trunk/Products/ZenRRD/zenprocess.py =================================================================== --- trunk/Products/ZenRRD/zenprocess.py 2007-04-05 19:53:34 UTC (rev 4524) +++ trunk/Products/ZenRRD/zenprocess.py 2007-04-05 20:41:55 UTC (rev 4525) @@ -234,7 +234,7 @@ class zenprocess(SnmpDaemon): statusEvent = { 'eventClass' : Status_OSProcess, 'eventGroup' : 'Process' } - hubService = 'ProcessConfig' + initialServices = SnmpDaemon.initialServices + ['ProcessConfig'] def __init__(self): SnmpDaemon.__init__(self, 'zenprocess') @@ -250,15 +250,15 @@ def fetchConfig(self): 'Get configuration values from the Zope server' def doFetchConfig(driver): - yield self.model.callRemote('getDefaultRRDCreateCommand') + yield self.model().callRemote('getDefaultRRDCreateCommand') createCommand = driver.next() - yield self.model.callRemote('propertyItems') + yield self.model().callRemote('propertyItems') self.setPropertyItems(driver.next()) self.rrd = RRDUtil(createCommand, self.snmpCycleInterval) - yield self.model.callRemote('getOSProcessConf', self.options.device) + yield self.model().callRemote('getOSProcessConf', self.options.device) driver.next() return drive(doFetchConfig) @@ -285,10 +285,10 @@ for r in removed: del self._devices[r] - yield self.model.callRemote('getSnmpStatus', self.options.device) + yield self.model().callRemote('getSnmpStatus', self.options.device) self.updateSnmpStatus(driver.next()) - yield self.model.callRemote('getProcessStatus', self.options.device) + yield self.model().callRemote('getProcessStatus', self.options.device) self.updateProcessStatus(driver.next()) driveLater(self.configCycleInterval * 60, self.start) @@ -450,7 +450,7 @@ def doPeriodic(driver): - yield self.zem.callRemote('getDevicePingIssues') + yield self.getDevicePingIssues() self.downDevices = Set([d[0] for d in driver.next()]) self.scanning = NJobs(PARALLEL_JOBS, @@ -518,14 +518,10 @@ SnmpDaemon.heartbeat(self) - def main(self, unused): - self.sendEvent(self.startevt) + def connected(self): drive(self.start).addCallbacks(self.periodic, self.errorStop) if __name__ == '__main__': z = zenprocess() - d = z.connect() - d.addCallbacks(z.main, z.errorStop) - reactor.run(installSignalHandlers=False) - # self.sendEvent(self.stopevt, now=True) + z.run() |
From: <sv...@ze...> - 2007-04-05 19:53:57
|
Author: jstevens Date: 2007-04-05 15:53:34 -0400 (Thu, 05 Apr 2007) New Revision: 4524 Modified: trunk/Products/ZenHub/PBDaemon.py trunk/Products/ZenHub/services/RRDService.py trunk/Products/ZenHub/services/WebConfig.py trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/PerformanceConf.py trunk/Products/ZenModel/RRDView.py Log: Working on moving zenhub to pbdaemon. * Removing pagecheck code from rrdview, device and performanceconf. * Bug fixes, etc in PBDaemon, RRDService and WebConfig. Modified: trunk/Products/ZenHub/PBDaemon.py =================================================================== --- trunk/Products/ZenHub/PBDaemon.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenHub/PBDaemon.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -14,12 +14,13 @@ import Globals from Products.ZenUtils.ZenDaemon import ZenDaemon #from Products.ZenUtils.Driver import drive -from Products.ZenUtils.Step import Step +#from Products.ZenUtils.Step import Step import Products.ZenEvents.Event as Event from Products.ZenUtils.PBUtil import ReconnectingPBClientFactory - from Products.ZenHub.zenhub import PB_PORT +import socket + from twisted.internet import reactor, defer from twisted.cred import credentials from twisted.spread import pb @@ -54,6 +55,7 @@ DEFAULT_HUB_PORT = PB_PORT DEFAULT_HUB_USERNAME = 'admin' DEFAULT_HUB_PASSWORD = 'zenoss' +DEFAULT_HUB_MONITOR = socket.getfqdn() class PBDaemon(ZenDaemon, pb.Referenceable): @@ -76,7 +78,11 @@ self.log.warning("Reconnected to ZenHub") self.perspective = perspective d2 = self.getInitialServices() - if not d.called: + if d.called: + self.log.debug('adding stop as getInitialServices errback') + d2.addErrback(lambda e: self.stop()) + else: + self.log.debug('chaining getInitialServices with d2') d2.chainDeferred(d) d = defer.Deferred() @@ -109,7 +115,8 @@ self.log.debug('errback after getting service %s' % serviceName) self.log.error('Could not retrieve service %s' % serviceName) return error - d = self.perspective.callRemote('getService', serviceName) + d = self.perspective.callRemote('getService', serviceName, + self.options.monitor) d.addCallback(callback, serviceName) d.addErrback(errback, serviceName) return d @@ -119,14 +126,15 @@ self.log.debug('setting up services %s' % ', '.join([n for n in self.initialServices])) d = defer.DeferredList( - [self.getService(name) for name in self.initialServices]) + [self.getService(name) for name in self.initialServices], + fireOnOneErrback=True, consumeErrors=True) return d def connected(self): self.log.debug('connected') self.eventSvc = self.services['EventService'] - self.eventSvc.callRemote('sendEvent', startEvent) + #self.eventSvc.callRemote('sendEvent', startEvent) def run(self): @@ -136,9 +144,10 @@ self.connected() return result def errback(error): - self.log.error('Unable to connect to zenhub.') + self.log.error('Unable to connect to zenhub: \n%s' % error) self.stop() - d.addCallbacks(callback, errback) + d.addCallback(callback) + d.addErrback(errback) reactor.run() self.log.info('%s shutting down' % self.name) @@ -189,7 +198,6 @@ def buildOptions(self): - ZenDaemon.buildOptions(self) self.parser.add_option('--hub-host', dest='hubHost', default=DEFAULT_HUB_HOST, @@ -210,4 +218,12 @@ default=DEFAULT_HUB_PASSWORD, help='Password for zenhub login.' ' Default is %s.' % DEFAULT_HUB_PASSWORD) + self.parser.add_option('--monitor', + dest='monitor', + default=DEFAULT_HUB_MONITOR, + help='Name of monitor instance to use for' + ' configuration. Default is %s.' + % DEFAULT_HUB_MONITOR) + ZenDaemon.buildOptions(self) + Modified: trunk/Products/ZenHub/services/RRDService.py =================================================================== --- trunk/Products/ZenHub/services/RRDService.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenHub/services/RRDService.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -10,13 +10,22 @@ ''' from HubService import HubService +from Products.ZenRRD.RRDUtil import RRDUtil class RRDService(HubService): - def __init__(self, dmd, instance = None): + def __init__(self, dmd, instance): HubService.__init__(self, dmd, instance) + self.rrd = {} - def remote_writeRRD(self, *args, **kw): - pass + def remote_writeRRD(self, path, value, rrdType, rrdCmd, cycleTime=None, + minv='U', maxv='U'): + if self.rrd.has_key(path): + rrd = self.rrd[path] + else: + rrd = RRDUtil(rrdCmd, cycleTime) + self.rrd[path] = rrd + value = rrd.save(path, value, rrdType, rrdCmd, cycleTime, minv, maxv) + return value Modified: trunk/Products/ZenHub/services/WebConfig.py =================================================================== --- trunk/Products/ZenHub/services/WebConfig.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenHub/services/WebConfig.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -14,13 +14,15 @@ class WebConfig(HubService): - def monitor(self): - return self.dmd.Monitors.Performance._getOb(self.instance) + def __init__(self, dmd, instance): + HubService.__init__(self, dmd, instance) + self.monitor = self.dmd.Monitors.Performance._getOb(self.instance) def remote_getPageChecks(self): pageChecks = [] - for dev in self.monitor().devices(): + for dev in self.monitor.devices(): + dev = dev.primaryAq() pageChecks += self.getDevicePageChecks(dev) return pageChecks @@ -30,7 +32,7 @@ def remote_getDefaultRRDCreateCommand(self): - return self.monitor().getDefaultRRDCreateCommand() + return self.monitor.getDefaultRRDCreateCommand() def getDevicePageChecks(self, dev): @@ -38,17 +40,19 @@ if not dev.monitorDevice(): return result for templ in dev.getRRDTemplates(): - threshs = self.getThresholds(templ) + threshs = dev.getThresholds(templ) dataSources = templ.getRRDDataSources('PAGECHECK') for ds in dataSources: if not ds.enabled: continue - points = [(dp.id, - '/'.join((dev.rrdPath, dp.name())), - dp.rrdtype, - dp.createCmd, - (dp.rrdmin, dp.rrdmax), - threshs.get(dp.name(), [])) - for dp in ds.getRRDDataPoints] + points = [{'id': dp.id, + 'path': '/'.join((dev.rrdPath(), dp.name())), + 'rrdType': dp.rrdtype, + 'rrdCmd': dp.createCmd, + 'minv': dp.rrdmin, + 'maxv': dp.rrdmax, + 'thesholds': threshs.get(dp.name(), []), + } + for dp in ds.getRRDDataPoints()] key = ds.eventKey or ds.id result.append({ 'device': dev.id, @@ -56,6 +60,8 @@ 'timeout': dev.zCommandCommandTimeout, 'datasource': ds.id or '', 'datapoints': points or (), + 'defaultRrdCmd': + self.monitor.getDefaultRRDCreateCommand(), 'cycletime': ds.cycletime or '', 'component': ds.component or '', 'eventClass': ds.eventClass or '', @@ -64,7 +70,7 @@ 'userAgent': ds.userAgent or '', 'recording': ds.recording or '', 'initialUrl': ds.initialURL or '', - 'command': ds.getCommand(self) or '', + 'command': ds.getCommand(dev) or '', 'commandHash': ds.commandHash or '', }) return result Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenModel/Device.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -472,16 +472,7 @@ self.zKeyPath,self.zMaxOIDPerRequest, cmds) - - def getPageChecks(self): - pageChecks = super(Device, self).getDataSourceCommands(pageChecks=True) - for pc in pageChecks: - pc['device'] = self.id - pc['manageIp'] = self.manageIp - pc['timeout'] = self.zCommandCommandTimeout - return pageChecks - def getXmlRpcTargets(self): """Return information for xmlrpc collection on this device in the form (devname, xmlRpcStatus, Modified: trunk/Products/ZenModel/PerformanceConf.py =================================================================== --- trunk/Products/ZenModel/PerformanceConf.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenModel/PerformanceConf.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -249,25 +249,6 @@ except: log.exception("device %s", dev.id) return result - - - # getPageChecks is very similar to getDataSourceCommands above. The two are - # not incorporated because getPageChecks will likely soon be moving into - # a separate monitor for zenweb configuration. (WebConf.py?) - # I am trying to keep the web stuff segregated as much as possible to ease - # the refactoring later. - def getPageChecks(self, devname=None): - ''' Return info for zenweb testing on all devices. - ''' - result = [] - for dev in self.devices(): - if devname and dev.id != devname: continue - dev = dev.primaryAq() - if dev.monitorDevice(): - result += dev.getPageChecks() - for testConfig in result: - testConfig['createRRDCommand'] = self.getDefaultRRDCreateCommand() - return result def getXmlRpcDevices(self, devname=None): Modified: trunk/Products/ZenModel/RRDView.py =================================================================== --- trunk/Products/ZenModel/RRDView.py 2007-04-05 19:52:50 UTC (rev 4523) +++ trunk/Products/ZenModel/RRDView.py 2007-04-05 19:53:34 UTC (rev 4524) @@ -283,23 +283,14 @@ return oids - def getDataSourceCommands(self, pageChecks=False): + def getDataSourceCommands(self): """Return list of command definitions. - If not pageChecks then ignore datasources of type PAGECHECK - and return results in the form - [(name,compname,eventClass,eventKey,severity,command),...] - - If pageChecks then only consider datasources of type PAGECHECK - and return results that is a list of dictionaries. """ result = [] for templ in self.getRRDTemplates(): threshs = self.getThresholds(templ) basepath = self.rrdPath() - if pageChecks: - dataSources = templ.getRRDDataSources('PAGECHECK') - else: - dataSources = templ.getRRDDataSources('COMMAND') + dataSources = templ.getRRDDataSources('COMMAND') for ds in dataSources: if not ds.enabled: continue points = [] @@ -312,26 +303,9 @@ (dp.rrdmin, dp.rrdmax), threshs.get(dp.name(),[]))) key = ds.eventKey or ds.id - if pageChecks: - result.append({ - 'datasource': ds.id or '', - 'datapoints': points or (), - #'datapoints': (), - 'cycletime': ds.cycletime or '', - 'component': ds.component or '', - 'eventClass': ds.eventClass or '', - 'eventKey': key or '', - 'severity': ds.severity or '', - 'userAgent': ds.userAgent or '', - 'recording': ds.recording or '', - 'initialUrl': ds.initialURL or '', - 'command': ds.getCommand(self) or '', - 'commandHash': ds.commandHash or '', - }) - else: - result.append( (ds.usessh, ds.cycletime, ds.component, - ds.eventClass, key, ds.severity, - ds.getCommand(self), points) ) + result.append( (ds.usessh, ds.cycletime, ds.component, + ds.eventClass, key, ds.severity, + ds.getCommand(self), points) ) return result |
From: <sv...@ze...> - 2007-04-05 19:52:57
|
Author: marc Date: 2007-04-05 15:52:50 -0400 (Thu, 05 Apr 2007) New Revision: 4523 Modified: trunk/Products/ZenModel/RRDDataSource.py trunk/Products/ZenModel/RRDTemplate.py Log: #630 * Fixed manage_delete* methods to support DeviceClass contexts Modified: trunk/Products/ZenModel/RRDDataSource.py =================================================================== --- trunk/Products/ZenModel/RRDDataSource.py 2007-04-05 19:52:04 UTC (rev 4522) +++ trunk/Products/ZenModel/RRDDataSource.py 2007-04-05 19:52:50 UTC (rev 4523) @@ -220,9 +220,14 @@ for id in ids: dp = getattr(self.datapoints,id,False) if dp: - #perfConf = self.device().getPerformanceServer() - #perfConf.deleteRRDFiles(device=self.device().id, datapoint=dp.name()) - + if getattr(self, 'device', False): + perfConf = self.device().getPerformanceServer() + perfConf.deleteRRDFiles(device=self.device().id, datapoint=dp.name()) + else: + for d in self.deviceClass.obj.getSubDevicesGen(): + perfConf = d.getPerformanceServer() + perfConf.deleteRRDFiles(device=d, datapoint=dp.name()) + clean(self.graphs, dp.name()) clean(self.thresholds, dp.name()) self.datapoints._delObject(dp.id) Modified: trunk/Products/ZenModel/RRDTemplate.py =================================================================== --- trunk/Products/ZenModel/RRDTemplate.py 2007-04-05 19:52:04 UTC (rev 4522) +++ trunk/Products/ZenModel/RRDTemplate.py 2007-04-05 19:52:50 UTC (rev 4523) @@ -219,9 +219,14 @@ if not ids: return self.callZenScreen(REQUEST) for id in ids: if getattr(self.datasources,id,False): - #perfConf = self.device().getPerformanceServer() - #perfConf.deleteRRDFiles(device=self.device().id, datasource=id) - + if getattr(self, 'device', False): + perfConf = self.device().getPerformanceServer() + perfConf.deleteRRDFiles(device=self.device().id, datasource=id) + else: + for d in self.deviceClass.obj.getSubDevicesGen(): + perfConf = d.getPerformanceServer() + perfConf.deleteRRDFiles(device=d, datasource=id) + self.datasources._delObject(id) clean(self.graphs, id) clean(self.thresholds, id) |
From: <sv...@ze...> - 2007-04-05 19:52:32
|
Author: jstevens Date: 2007-04-05 15:52:04 -0400 (Thu, 05 Apr 2007) New Revision: 4522 Modified: trunk/Products/ZenUtils/CmdBase.py Log: Rejiggered parseOptions so that subclasses can add their own options before cmdbase adds its. Modified: trunk/Products/ZenUtils/CmdBase.py =================================================================== --- trunk/Products/ZenUtils/CmdBase.py 2007-04-05 15:18:20 UTC (rev 4521) +++ trunk/Products/ZenUtils/CmdBase.py 2007-04-05 19:52:04 UTC (rev 4522) @@ -29,6 +29,8 @@ self.usage = "%prog [options]" self.noopts = noopts self.args = [] + self.parser = None + self.buildParser() self.buildOptions() self.parseOptions() if self.options.configfile: @@ -57,11 +59,14 @@ logging.basicConfig() + def buildParser(self): + if not self.parser: + self.parser = OptionParser(usage=self.usage, + version="%prog " + __version__) + def buildOptions(self): """basic options setup sub classes can add more options here""" - - self.parser = OptionParser(usage=self.usage, - version="%prog " + __version__) + self.buildParser() self.parser.add_option('-v', '--logseverity', dest='logseverity', default=20, |
From: <sv...@ze...> - 2007-04-05 15:18:29
|
Author: ian Date: 2007-04-05 11:18:20 -0400 (Thu, 05 Apr 2007) New Revision: 4521 Modified: trunk/Products/ZenModel/data/menus.xml Log: * Dumped menu xml for zenbuild Modified: trunk/Products/ZenModel/data/menus.xml =================================================================== --- trunk/Products/ZenModel/data/menus.xml 2007-04-05 14:23:34 UTC (rev 4520) +++ trunk/Products/ZenModel/data/menus.xml 2007-04-05 15:18:20 UTC (rev 4521) @@ -1,100 +1,438 @@ <?xml version="1.0"?> <objects> <object id='/zport/dmd' module='Products.ZenModel.DataRoot' class='DataRoot'> - <tomanycont id='zenMenus'> -<object id='Edit' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<object id='Device_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> <tomanycont id='zenMenuItems'> -<object id='manageob' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='lockDevices' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Manage +Lock devices... </property> <property type="text" id="action" mode="w" > -dataRootManage +dialog_lockDevices </property> <property type="boolean" id="isglobal" mode="w" > -False +True </property> <property type="lines" id="permissions" mode="w" > -('View',) +('Change Device',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -</tomanycont> +<object id='moveclass' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Move to Class... +</property> +<property type="text" id="action" mode="w" > +dialog_moveDevices +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -<object id='View' module='Products.ZenModel.ZenMenu' class='ZenMenu'> -<tomanycont id='zenMenuItems'> -<object id='viewHistory' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='removeDevices' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Changes +Delete devices... </property> <property type="text" id="action" mode="w" > -viewHistory +dialog_removeDevices </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > -('View',) +('Change Device',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -</tomanycont> +<object id='setGroups' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Set Groups... +</property> +<property type="text" id="action" mode="w" > +dialog_setGroups +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> +<object id='setLocation' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Set Location... +</property> +<property type="text" id="action" mode="w" > +dialog_setLocation +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='setSystems' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Set Systems... +</property> +<property type="text" id="action" mode="w" > +dialog_setSystems +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> </tomanycont> </object> - -<object id='/zport/dmd/Devices' module='Products.ZenModel.DeviceClass' class='DeviceClass'> - -<tomanycont id='zenMenus'> <object id='Edit' module='Products.ZenModel.ZenMenu' class='ZenMenu'> <tomanycont id='zenMenuItems'> -<object id='editCustSchema' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Custom Schema +Add to ZenPack... </property> <property type="text" id="action" mode="w" > -editCustSchema +dialog_addToZenPack </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['ZenPackable'] +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='deleteObject' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete +</property> +<property type="text" id="action" mode="w" > +dialog_delete +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('Change Device',) </property> +<property type="lines" id="allowed_classes" mode="w" > +['Device', 'WinServiceFileSystem', 'HardDisk', 'IpInterface', 'IpService', 'OSProcess', 'IpRouteEntry'] +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -<object id='manageob' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='deviceCustomEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > +Custom +</property> +<property type="text" id="action" mode="w" > +deviceCustomEdit +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['Device'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='deviceManagement' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > Manage </property> <property type="text" id="action" mode="w" > +deviceManagement +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['Device'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='deviceOrganizerManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > deviceOrganizerManage </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['DeviceOrganizer', 'DeviceGroup', 'Location', 'DeviceClass', 'System'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='editDevice' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +editDevice +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['Device'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='editManufacturer' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +editManufacturer +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['Manufacturer'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='editPerformanceConf' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +editPerformanceConf +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['PerformanceConf'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='editProductClass' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +editProductClass +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['ProductClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='editStatusMonitorConf' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +editStatusMonitorConf +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['StatusMonitorConf'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='eventClassInstEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +eventClassInstEdit +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['EventClassInst'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='eventClassInstSequence' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Sequence +</property> +<property type="text" id="action" mode="w" > +eventClassInstSequence +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> +<property type="lines" id="allowed_classes" mode="w" > +['EventClassInst'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> </object> -<object id='perfConfig' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='ipServiceClassEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -perfConf +Edit </property> <property type="text" id="action" mode="w" > -perfConfig +ipServiceClassEdit </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['IpServiceClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='ipServiceClassManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +ipServiceClassManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['IpServiceClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='ipServiceManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +ipServiceManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['IpService'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='lockObject' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Lock +</property> +<property type="text" id="action" mode="w" > +dialog_lock +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('Change Device',) </property> <property type="lines" id="allowed_classes" mode="w" > -('DeviceClass',) +['Device', 'WinServiceFileSystem', 'HardDisk', 'IpInterface', 'IpService', 'OSProcess', 'IpRouteEntry'] </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -<object id='perfConfigDevice' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='objRRDTemplate' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -perfConf +PerfConf </property> <property type="text" id="action" mode="w" > objRRDTemplate @@ -106,11 +444,194 @@ ('Change Device',) </property> <property type="lines" id="allowed_classes" mode="w" > -('Device',) +['Device', 'FileSystem', 'HardDisk', 'IpInterface', 'OSProcess'] </property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> </object> -<object id='zproperties' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='osProcessClassEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +osProcessClassEdit +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['OSProcessClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='osProcessClassManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +osProcessClassManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['OSProcessClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='osProcessManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +osProcessManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['OSProcess'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='osProcessOrganizerManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +osProcessOrganizerManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['OSProcessOrganizer'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='perfConfig' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Perf Config +</property> +<property type="text" id="action" mode="w" > +perfConfig +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['DeviceClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='serviceClassEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Edit +</property> +<property type="text" id="action" mode="w" > +serviceClassEdit +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['ServiceClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='serviceClassManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +serviceClassManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['ServiceClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='serviceOrganizerManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +serviceOrganizerManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['ServiceOrganizer'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='winServiceManage' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Manage +</property> +<property type="text" id="action" mode="w" > +winServiceManage +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['WinService'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='zPropertyEdit' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > zProperties </property> <property type="text" id="action" mode="w" > @@ -120,94 +641,829 @@ True </property> <property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="lines" id="allowed_classes" mode="w" > +['Device', 'DeviceClass', 'IpNetwork', 'IpServiceClass', 'Manufacturer', 'OSProcessClass', 'OSProcessOrganizer', 'ProductClass', 'ServiceClass', 'ServiceOrganizer', 'EventClassInst', 'EventClass'] +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +</tomanycont> +</object> +<object id='EventMapping_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addInstance' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Mapping... +</property> +<property type="text" id="action" mode="w" > +dialog_createInstance +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='moveInstances' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Move Mappings... +</property> +<property type="text" id="action" mode="w" > +dialog_moveInstances +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeInstances' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Mappings... +</property> +<property type="text" id="action" mode="w" > +dialog_removeInstances +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='Event_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='acknowledgeEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Acknowledge Events +</property> +<property type="text" id="action" mode="w" > +javascript:submitFormToMethod("control", "manage_ackEvents") +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='createEventMap' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Map Events to Class... +</property> +<property type="text" id="action" mode="w" > +dialog_createEventMap +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='exportAllEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Download as CSV +</property> +<property type="text" id="action" mode="w" > +javascript:goExport() +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> +</object> +<object id='historifyEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Move Events to History... +</property> +<property type="text" id="action" mode="w" > +dialog_moveEventsToHistory +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='FileSystem' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addFileSystem' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add File System... +</property> +<property type="text" id="action" mode="w" > +dialog_addFileSystem +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('Change Device',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> </tomanycont> </object> -<object id='View' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<object id='HistoryEvent_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> <tomanycont id='zenMenuItems'> -<object id='classes' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='createEventMap' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Classes +Map Events to Class... </property> <property type="text" id="action" mode="w" > -deviceOrganizerStatus +dialog_createEventMap </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='exportAllEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Download as CSV +</property> +<property type="text" id="action" mode="w" > +javascript:goExport() +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> -<property type="lines" id="allowed_classes" mode="w" > -('DeviceClass',) +<property type="boolean" id="isdialog" mode="w" > +False </property> </object> -<object id='devicelist' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='undeleteHistoryEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Devices +Undelete Events... </property> <property type="text" id="action" mode="w" > -deviceList +dialog_undeleteHistoryEvents </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='IpInterface' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addIpInterface' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add IpInterface... +</property> +<property type="text" id="action" mode="w" > +dialog_addIpInterface +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='IpRouteEntry' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addIpRouteEntry' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Route... +</property> +<property type="text" id="action" mode="w" > +dialog_addIpRouteEntry +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='IpService' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addIpService' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add IpService... +</property> +<property type="text" id="action" mode="w" > +dialog_addIpService +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='Manufacturer_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addManufacturer' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Manufacturer... +</property> +<property type="text" id="action" mode="w" > +dialog_addManufacturer +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> -<property type="lines" id="allowed_classes" mode="w" > -('DeviceClass',) +<property type="boolean" id="isdialog" mode="w" > +True </property> </object> -<object id='events' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='removeManufacturers' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Events +Delete Manufacturers... </property> <property type="text" id="action" mode="w" > -viewEvents +dialog_removeManufacturers </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='Mib_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addMibModule' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Mib... +</property> +<property type="text" id="action" mode="w" > +dialog_addMibModule +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -<object id='historyEvents' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='moveMibModules' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -History +Move Mibs... </property> <property type="text" id="action" mode="w" > -viewHistoryEvents +dialog_moveMibModules </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeMibModules' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Mibs... +</property> +<property type="text" id="action" mode="w" > +dialog_removeMibModules +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='OSProcess' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addOSProcess' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add OSProcess... +</property> +<property type="text" id="action" mode="w" > +dialog_addOSProcess +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='OSProcess_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addOSProcess' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Process... +</property> +<property type="text" id="action" mode="w" > +dialog_addOSProcess +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> </object> -<object id='status' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='moveOSProcesses' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > -Status +Move Processes... </property> <property type="text" id="action" mode="w" > -deviceStatus +dialog_moveOSProcesses </property> <property type="boolean" id="isglobal" mode="w" > True </property> <property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeOSProcesses' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Processes... +</property> +<property type="text" id="action" mode="w" > +dialog_removeOSProcesses +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='Organizer_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addOrganizer' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add New Organizer... +</property> +<property type="text" id="action" mode="w" > +dialog_addOrganizer +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > ('View',) </property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='moveOrganizer' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Move Organizers... +</property> +<property type="text" id="action" mode="w" > +dialog_moveOrganizer +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeOrganizers' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Organizers... +</property> +<property type="text" id="action" mode="w" > +dialog_removeOrganizer +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='PerformanceMonitor_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addPMonitor' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Monitor... +</property> +<property type="text" id="action" mode="w" > +dialog_addMonitor +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removePMonitors' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Monitors... +</property> +<property type="text" id="action" mode="w" > +dialog_removeMonitors +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='Service_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addServiceClass' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Service... +</property> +<property type="text" id="action" mode="w" > +dialog_addServiceClass +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='addToZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add to ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addToZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('View',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='moveServiceClasses' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Move Services... +</property> +<property type="text" id="action" mode="w" > +dialog_moveServiceClasses +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeServiceClasses' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Services... +</property> +<property type="text" id="action" mode="w" > +dialog_removeServiceClasses +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='StatusMonitor_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addSMonitor' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add Monitor... +</property> +<property type="text" id="action" mode="w" > +dialog_addMonitor +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeSMonitors' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete Monitors... +</property> +<property type="text" id="action" mode="w" > +dialog_removeMonitors +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='WinService' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addWinService' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Add WinService... +</property> +<property type="text" id="action" mode="w" > +dialog_addWinService +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Change Device',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +<object id='ZenPack_list' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='addZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Create a new ZenPack... +</property> +<property type="text" id="action" mode="w" > +dialog_addZenPack +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +<object id='removeZenPack' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Delete ZenPack +</property> +<property type="text" id="action" mode="w" > +dialog_removeZenPacks +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('Manage DMD',) +</property> +<property type="boolean" id="isdialog" mode="w" > +True +</property> +</object> +</tomanycont> +</object> +</tomanycont> + +<object id='Networks' module='Products.ZenModel.IpNetwork' class='IpNetwork'> +<tomanycont id='zenMenus'> +<object id='Actions' module='Products.ZenModel.ZenMenu' class='ZenMenu'> +<tomanycont id='zenMenuItems'> +<object id='discover' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<property type="text" id="description" mode="w" > +Discover Devices +</property> +<property type="text" id="action" mode="w" > +discoverDevices +</property> +<property type="boolean" id="isglobal" mode="w" > +True +</property> +<property type="lines" id="permissions" mode="w" > +('View',) +</property> <property type="lines" id="allowed_classes" mode="w" > -('Device',) +['IpNetwork'] </property> +<property type="boolean" id="isdialog" mode="w" > +False +</property> </object> </tomanycont> </object> </tomanycont> </object> + +</object> </objects> |