Module SUEState
[hide private]
[frames] | no frames]

Source Code for Module SUEState

 1  ''' 
 2  Defines the possible settings for SUE. 
 3   
 4  @author: Peter Parente 
 5  @author: Pete Brunet 
 6  @organization: IBM Corporation 
 7  @copyright: Copyright (c) 2005, 2007 IBM Corporation 
 8   
 9  @author: Ramona Bunk 
10  @organization: IT Science Center Ruegen gGmbH, Germany 
11  @copyright: Copyright (c) 2007, 2008 ITSC Ruegen 
12   
13  @license: The BSD License 
14  All rights reserved. This program and the accompanying materials are made  
15  available under the terms of the BSD license which accompanies 
16  this distribution, and is available at 
17  U{http://www.opensource.org/licenses/bsd-license.php} 
18  ''' 
19  from AccessEngine import AEState 
20  from Tools.i18n import _ 
21   
22 -class SUEState(AEState.AEState):
23 ''' 24 Stateful information for all L{AETier}s. These should be considered system wide 25 global settings. 26 27 Trap (bool): When set to False, L{AccessEngine.AccessEngineAPI.AEApiError} 28 will be raised but not presented to the user. If True, errors will be raised 29 and presented. Defaults to True. 30 31 Stopping (bool): When set to False, only forceful stop commands will be sent 32 the the output device. Useful for debugging. Defaults to True. 33 '''
34 - def init(self):
35 self.newBool('Trap', True, _('Announce script exceptions?'), 36 _('When set, important Script exceptions will be announced on ' 37 'output devices.')) 38 self.newBool('Stopping', True, _('Allow automatic stops?'), 39 _('When unset, only forceful stops will be sent to output ' 40 'devices.'))
41
42 - def getGroups(self):
43 ''' 44 Gets the configurable settings with metadata describing them. 45 46 @return: Root group of all configurable settings 47 @rtype: L{AEState.Group} 48 ''' 49 g = self.newGroup() 50 g.extend(['Trap', 'Stopping']) 51 return g
52