class IMailTxDataSourceInfo(IRRDDataSourceInfo): cycleTime = schema.Int(title=_t(u'Cycle Time (seconds)')) timeout = schema.Int(title=_t(u"Timeout (seconds)")) toAddress = schema.TextLine(title=_t(u"To Address")) fromAddress = schema.TextLine(title=_t(u"From Address")) messageBody = schema.TextLine(title=_t(u'Message Body'), xtype="twocolumntextarea") # SMTP fields smtpHost = schema.TextLine(title=_t(u'SMTP Host'), group=_t(u'SMTP')) smtpPort = schema.Int(title=_t(u'SMTP Port'), group=_t(u'SMTP')) smtpUsername = schema.TextLine(title=_t(u'SMTP Username'), group=_t(u'SMTP')) smtpPassword = schema.Password(title=_t(u'SMTP Password'), group=_t(u'SMTP')) smtpAuth = schema.Choice(title=_t(u'Transport Security'), vocabulary="transportSecurity", group=_t(u'SMTP')) # POP fields popHost = schema.TextLine(title=_t(u'POP Host'), group=_t(u'POP')) popPort = schema.Int(title=_t(u'POP Port'), group=_t(u'POP')) popUsername = schema.TextLine(title=_t(u'POP Username'), group=_t(u'POP')) popPassword = schema.Password(title=_t(u'POP Password'), group=_t(u'POP')) popAuth = schema.Choice(title=_t(u'Transport Security'), vocabulary="transportSecurity", group=_t(u'POP')) popAllowInsecureLogin = schema.Bool(title=_t(u'Allow Insecure Logins?'), group=_t(u'POP'))
class IHttpMonitorDataSourceInfo(IRRDDataSourceInfo): timeout = schema.Int(title=_t(u'Timeout (seconds)')) cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) hostname = schema.TextLine(title=_t(u'Host Name'), group=_t('HTTP Monitor')) port = schema.Int(title=_t(u'Port'), group=_t('HTTP Monitor')) ipAddress = schema.TextLine(title=_t(u'IP Address or Proxy Address'), group=_t('HTTP Monitor')) url = schema.TextLine(title=_t(u'URL'), group=_t('HTTP Monitor')) useSsl = schema.Bool(title=_t(u'Use SSL?'), group=_t('HTTP Monitor')) regex = schema.TextLine(title=_t(u'Regular Expression'), group=_t('HTTP Monitor')) caseSensitive = schema.Bool(title=_t(u'Case Sensitive'), group=_t('HTTP Monitor')) basicAuthUser = schema.TextLine(title=_t(u'Basic Auth User'), group=_t('HTTP Monitor')) invert = schema.Bool(title=_t(u'Invert Expression'), group=_t('HTTP Monitor')) basicAuthPass = schema.Password(title=_t(u'Basic Auth Password'), group=_t('HTTP Monitor')) onRedirect = schema.Choice(title=_t(u'Redirect Behavior'), vocabulary='httpMonitorRedirectVocabulary', group=_t('HTTP Monitor')) proxyAuthUser = schema.TextLine(title=_t(u'Proxy User'), group=_t('Proxy Credentials')) proxyAuthPassword = schema.Password(title=_t(u'Proxy Password'), group=_t('Proxy Credentials'))
class IRPCMonitorDataSourceInfo(IRRDDataSourceInfo): cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) rpcServer = schema.TextLine(title=_t(u'RPC Server')) rpcCommand = schema.TextLine(title=_t(u'RPC Command')) port = schema.Int(title=_t(u'Port')) protocol = schema.Choice(title=_t(u'Protocol'), vocabulary="rpcMonitorProtocolVocabulary")
class INotificationSubscriptionInfo(IInfo): """ Notification information regarding signals that occur as a result of an alert tripping a trigger. """ newId = schema.TextLine(title=_t(u'newId'), xtype='idfield', description=_t(u'The name of this notification')) enabled = schema.Bool(title=_t(u'Enabled')) delay_seconds = schema.Int(title=_t(u'Delay (seconds)')) repeat_seconds = schema.Int(title=_t(u'Repeat (seconds)')) action = schema.Choice(title=_t(u'Action'), vocabulary=SimpleVocabulary.fromValues( getNotificationActionVocabulary())) # this is a list of the user/group/roles that have subscribed to this # notification. recipients = schema.List(title=_t(u'Subscribers')) globalRead = schema.Bool(title=_t(u'Global View')) globalWrite = schema.Bool(title=_t(u'Global Write')) globalManage = schema.Bool(title=_t(u'Global Manage Subscriptions')) userRead = schema.Bool(title=_t(u'Current User View')) userWrite = schema.Bool(title=_t(u'Current User Write')) userManage = schema.Bool(title=_t(u'Current User Manage Subscriptions'))
class IServiceDataSourceInfo(IInfo): """ Provide the UI information for the WinRS Service datasource. """ newId = schema.TextLine(title=_t(u'Name'), xtype="idfield", description=_t(u'The name of this datasource')) type = schema.TextLine(title=_t(u'Type'), readonly=True) enabled = schema.Bool(title=_t(u'Enabled')) severity = schema.TextLine(title=_t(u'Severity'), xtype='severity') reindex = schema.Bool(title=_t( 'Update services immediately. This could take several minutes to complete.' )) cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)')) alertifnot = schema.Choice( group=_t('Service Status'), title=_t('Alert if service is NOT in this state'), vocabulary=SimpleVocabulary.fromValues([STATE_RUNNING, STATE_STOPPED]), ) startmode = schema.Text(group=_t('Service Options'), xtype='startmodegroup') in_exclusions = schema.TextLine( group=_t('Service Options'), title=_t( 'Inclusions(+)/Exclusions(-) separated by commas. Regex accepted') )
class IDigMonitorDataSourceInfo(IRRDDataSourceInfo): timeout = schema.Int(title=_t(u'Timeout (seconds)')) cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) dnsServer = schema.TextLine(title=_t(u'DNS Server')) recordName = schema.TextLine(title=_t(u'Record Name')) port = schema.Int(title=_t(u'Port')) recordType = schema.Choice(title=_t(u'Record Type'), vocabulary="dnsMonitorRecordTypeVocabulary")
class ISyslogActionContentInfo(IInfo): host = schema.Text( title=_t(u'Syslog Host'), description=_t( u'Server hosting the syslog service that can receive syslog messages).' ), ) port = schema.Int(title=_t(u'Syslog Port (usually 514)'), description=_t(u'TCP/IP port to access syslog.'), default=514) protocol = schema.Choice(title=_t(u'Protocol'), description=_t(u'Syslog protocol.'), vocabulary=SimpleVocabulary.fromValues( ['TCP', 'UDP']), default=_t(u'UDP')) facility = schema.Choice( title=_t(u'Syslog Facility'), description=_t(u'Outgoing syslog facility name to use.'), vocabulary=SimpleVocabulary.fromItems([ ('KERN', 0), ('USER', 1), ('MAIL', 2), ('DAEMON', 3), ('AUTH', 4), ('SYSLOG', 5), ('LPR', 6), ('NEWS', 7), ('UUCP', 8), ('CRON', 9), ('AUTHPRIV', 10), ('FTP', 11), ('LOCAL0', 16), ('LOCAL1', 17), ('LOCAL2', 18), ('LOCAL3', 19), ('LOCAL4', 20), ('LOCAL5', 21), ('LOCAL6', 22), ('LOCAL7', 23), ]), )
class IFtpMonitorDataSourceInfo(IRRDDataSourceInfo): timeout = schema.Int(title=_t(u'Timeout (seconds)')) cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)')) hostname = schema.TextLine(title=_t(u'Host Name')) port = schema.Int(title=_t(u'Port')) sendString = schema.TextLine(title=_t(u'Send String')) expectString = schema.TextLine(title=_t(u'Expect String')) quitString = schema.TextLine(title=_t(u'Quit String')) refuse = schema.Choice(title=_t(u'Refuse'), vocabulary="ftpMonitorStatesVocabulary") mismatch = schema.Choice(title=_t(u'Mismatch'), vocabulary="ftpMonitorStatesVocabulary") maxBytes = schema.TextLine(title=_t(u'Max Bytes')) delay = schema.TextLine(title=_t(u'Delay')) certificate = schema.Int(title=_t( u'Certificate (minimum days for which a certificate is valid)')) useSSL = schema.Bool(title=_t(u'Use SSL')) warning = schema.Int(title=_t(u'Warning Response Time (seconds)')) critical = schema.Int(title=_t(u'Critical Response Time (seconds)'))
class INotificationWindowInfo(IInfo): """ Interface for a notification subscription window. """ newId = schema.TextLine(title=_t(u'Name')) enabled = schema.Bool(title=_t(u'Enabled')) start = schema.TextLine(title=_t(u'Start'), xtype="datefield") repeat = schema.Choice(title=_t(u'Repeat'), vocabulary='schedulerepeatvocabulary') duration = schema.TextLine(title=_t(u'Duration'), xtype="duration")
class ISNMPv3ActionContentInfo(ISnmpTrapActionContentInfo): # hide unused fields version = schema.Text(title=_t(u''), xtype="hidden") community = schema.Text(title=_t(u''), xtype="hidden") securityEngineId = schema.TextLine(title=_t(u'Security Engine ID'), default=u'0x0102030405') contextEngineId = schema.TextLine(title=_t(u'Context Engine ID'), ) contextName = schema.TextLine(title=_t(u'Context Name')) authProto = schema.Choice(title=_t(u"Authentication Protocol"), vocabulary=SimpleVocabulary.fromValues( ['None', 'MD5', 'SHA']), default=_t(u'None')) securityName = schema.TextLine(title=_t(u'Security Name')) securityPassphrase = schema.Password(title=_t(u'Security Passphrase')) privProto = schema.Choice(title=_t(u"Privacy Protocol"), vocabulary=SimpleVocabulary.fromValues( ['None', 'DES', 'AES']), default=_t(u'None')) privacyPassphrase = schema.Password(title=_t(u'Privacy Passphrase'))
class IDataPointGraphPointInfo(IColorGraphPointInfo): """ Adapts DataPoint GraphPoint. """ lineType = schema.Choice(title=_t('Line Type'), vocabulary='complexGraphLineType', order=5) lineWidth = schema.TextLine(title=_t('Line Width'), order=6) stacked = schema.Bool(title=_t('Stacked'), order=7) format = schema.TextLine(title=_t('Format'), order=8) dpName = schema.TextLine(title=_t('DataPoint'), readonly=True, order=3) rpn = schema.Text(title=_t('RPN'), order=10) limit = schema.Int(title=_t('Limit'), order=11) cFunc = schema.TextLine(title=_t('Consolidation'), order=12)
class IConfigurableSnmpTrapActionContentInfo(ISnmpTrapActionContentInfo): community = schema.Text(title=_t(u'SNMP Community'), description=_t(u'SNMP authentication string.'), default=_t(u'public')) version = schema.Choice(title=_t(u'SNMP Version'), description=_t(u'SNMP trap protocol version.'), vocabulary=SimpleVocabulary.fromValues( ['v1', 'v2c']), default=_t(u'v1')) port = schema.Int( title=_t(u'SNMP Port (usually 162)'), description=_t(u'Port number used by the SNMP trap receiver process.'), default=162)
class IJMXDataSourceInfo(IRRDDataSourceInfo): # Connection Info jmxPort = schema.TextLine( title=_t(u'Management Port'), group=_t(u'JMX Connection and Metadata Infomation')) jmxProtocol = schema.Choice( title=_t(u'Protocol'), group=_t(u'JMX Connection and Metadata Infomation'), vocabulary='jmxProtocolVocabulary') jmxRawService = schema.TextLine( title=_t(u'Raw Service URL (advanced users only)'), group=_t(u'JMX Connection and Metadata Infomation')) rmiContext = schema.TextLine( title=_t(u'RMI Context (URL context when using RMI Protocol)'), group=_t(u'JMX Connection and Metadata Infomation')) objectName = schema.TextLine( title=_t(u'Object Name'), group=_t(u'JMX Connection and Metadata Infomation')) # Authentication username = schema.TextLine( title=_t(u'Username'), group=_t(u'JMX Remote Authentication Information')) authenticate = schema.TextLine( title=_t(u'Auth Enabled'), group=_t(u'JMX Remote Authentication Information')) password = schema.Password( title=_t(u'Password'), group=_t(u'JMX Remote Authentication Information')) # Operation attributeName = schema.TextLine( title=_t(u'Attribute Name'), group=_t(u'JMX Attribute and Operation Configuration')) attributePath = schema.TextLine( title=_t(u'Attribute Path'), group=_t(u'JMX Attribute and Operation Configuration')) operationParamValues = schema.TextLine( title=_t(u'Parameter Values'), group=_t(u'JMX Attribute and Operation Configuration')) operationName = schema.TextLine( title=_t(u'Operation Name'), group=_t(u'JMX Attribute and Operation Configuration')) operationParamTypes = schema.TextLine( title=_t(u'Parameter Types'), group=_t(u'JMX Attribute and Operation Configuration'))
class IServiceDataSourceInfo(IRRDDataSourceInfo): """ Provide the UI information for the WinRS Service datasource. """ cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)')) servicename = schema.TextLine(group=_t('Service Status'), title=_t('Service Name')) defaultgraph = schema.Bool(group=_t('Service Status'), title=_t('Monitor by Default')) alertifnot = schema.Choice( group=_t('Service Status'), title=_t('Alert if service is NOT in this state'), vocabulary=SimpleVocabulary.fromValues([STATE_RUNNING, STATE_STOPPED]), )
class IIpServiceInfo(IComponentInfo): """ Info adapter for IpService components """ description = schema.Text(title=u"Description", group="Overview") serviceClass = schema.Entity(title=u"Service Class", group="Overview") port = schema.Int(title=u"Port", group="Overview") protocol = schema.TextLine(title=u"Protocol", group="Details") ipaddresses = schema.List(title=u"IP Addresses", group="Details") manageIp = schema.Choice(title=u"Management IP Address", vocabulary="serviceIpAddresses", group="Overview") discoveryAgent = schema.TextLine(title=u"Discovery Agent", group="Details") failSeverity = schema.Int(title=u"Fail Severity", xtype="severity", group="Details", alwaysEditable=True) sendString = schema.Text(title=u"Send String", group="Details") expectRegex = schema.TextLine(title=u"Expect Regex", group="Details")
class ISnmpTrapActionContentInfo(IActionContentInfo): action_destination = schema.TextLine( title=_t(u'SNMP Trap Destination'), description=_t( u'The template for the subject for the SNMP trap destination.'), default=_t(u'traphost')) community = schema.Text(title=_t(u'SNMP Community'), description=_t(u'SNMP authentication string.'), default=_t(u'public')) version = schema.Choice(title=_t(u'SNMP Version'), description=_t(u'SNMP trap protocol version.'), vocabulary=SimpleVocabulary.fromValues( ['v1', 'v2c']), default=_t(u'v2c')) port = schema.Int( title=_t(u'SNMP Port (usually 162)'), description=_t(u'Port number used by the SNMP trap receiver process.'), default=162)
class IFancyEmailActionContentInfo(IInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues(getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[Z] ${evt/device} ${evt/summary}')) # body_format includes the following event fields which MUST exist and be non-null: # Standard fields # evt/device , evt/ipAddress , evt/count , evt/summary , evt/component , evt/eventClass , # evt/firstTime , evt/lastTime , evt/message # Customised fields created in a root-level event transform - see root_transform.txt # evt/utcTime , evt/sevColour , evt/sevBackgroundColour, evt/SevString , evt/Category , evt/Site , evt/explanation , evt/resolution # The evt/sevColour , evt/sevBackgroundColour, evt/SevString fields are used by the notification to output text values for # severity (Critical, Error, etc) and to colour-code this string. # # Any image files are found in this directory. The "image0" in the <br><img src="cid:image0"><br> line # MUST match the "image0" in msgImage.add_header('Content-ID', '<image0>') in the executeBatch function. # and the same for "image2" in the clear_body_format # Note that in the following html you need to avoid linefeeds, especially in the table, # otherwise you will find lots of blank lines in the email body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' <div > <span style="font-family: arial"><img src="cid:image0"> <b><u> <span style="text-transform: uppercase; background-color: ${evt/sevBackgroundColour}; color: ${evt/sevColour}; font-size: 200%"> ${evt/SevString} Severity Incident at ${evt/Site}    Category: ${evt/Category}</span></u> </b> <font style=" color: #173048; font-weight:bold; font-size:18px; " > Device: </font> <span style="text-transform: uppercase"> ${evt/device}</span>    <font style=" color: #173048; font-weight:bold; font-size:18px; " > IP Address: </font> <span style="text-transform: uppercase"> ${evt/ipAddress} </span>    <font style=" color: #173048; font-weight:bold; font-size:18px; " > Time: </font> <span style="text-transform: uppercase"> ${evt/utcTime} (UTC) </span> <font style=" color: #173048; font-weight:bold; font-size:20px; " > Summary: </font> <span style="text-transform: uppercase"> ${evt/summary} </span> <table border="1" width="75%" style=" border:1px solid #173048; border-collapse: collapse; border-spacing: 0; padding: 5px; font-family:arial,helvetica,sans-serif;"> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Device</td> <td><b><font size="3">${evt/device}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >IPAddress</td> <td><b><font size="3" >${evt/ipAddress}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Site</td> <td><b><font size="3" >${evt/Site}</font></b></td> </tr> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Region</td> <td><b><font size="3" >${evt/Region}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Component</td> <td><b><font size="3" >${evt/component}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Category</td> <td><b><font size="3" >${evt/Category}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Count</td> <td><b><font size="3" > ${evt/count} </font> </b> </td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Explanation</td> <td><b><font size="3" >${evt/explanation}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Resolution</td> <td><b><font size="3" >${evt/resolution}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >First Time</td> <td><b><font size="3" >${evt/firstTime}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Last Time</td> <td><b><font size="3" >${evt/lastTime}</font></b></td> </tr> </table> Message: <b> <font size="3" color="Blue">${evt/message}</font> </b> <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/eventsUrl}">Device Events</a> <br><img src="cid:image1"><br> </span> </div> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[Z] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' <span style="font-family: arial"><img src="cid:image0"> <b><u> <span style="text-transform: uppercase; background-color: #71E671; color: black; font-size: 200%"> Cleared ${evt/SevString} Severity Incident at ${evt/Site}    Category: ${evt/Category}</span></u> </b> Device: <b> <font size="4" color="Blue"><span style="text-transform: uppercase"> ${evt/device}</span></font> </b>   IP Address:<b> <font size="4" color="Blue"> ${evt/ipAddress} </font> </b>   Time: <b> <font size="4" color="Blue">${evt/utcTime} (UTC)</font> </b>   Original Severity: <b> <font size="4" color=${evt/sevBackgroundColour}>${evt/SevString} </font> </b> Summary: <b> <font size="3" color="Blue">${evt/summary}</font> </b> <table border="1" style="width:100%; font-family:arial;"><tr><td>Device</td><td><b><font size="3" color="Blue">${evt/device}</font></b></td></tr><tr><td>IPAddress</td><td><b><font size="3" color="Blue">${evt/ipAddress}</font></b></td></tr><tr><td>Site</td><td><b><font size="3" color="Blue">${evt/Site}</font></b></td></tr><tr><td>Region</td><td><b><font size="3" color="Blue">${evt/Region}</font></b></td></tr><tr><td>Component</td><td><b><font size="3" color="Blue">${evt/component}</font></b></td></tr><tr><td>Category</td><td><b><font size="3" color="Blue">${evt/Category}</font></b></td></tr><tr><td>Count</td><td><b><font size="3" color="Blue">${evt/count}</font></b></td></tr><tr><td>Explanation</td><td><b><font size="3" color="Blue">${evt/explanation}</font></b></td></tr><tr><td>Resolution</td><td><b><font size="3" color="Blue">${evt/resolution}</font></b></td></tr><tr><td>First Time</td><td><b><font size="3" color="Blue">${evt/firstTime}</font></b></td></tr><tr><td>Last Time</td><td><b><font size="3" color="Blue">${evt/lastTime}</font></b></td></tr></table> Message: <b> <font size="3" color="Blue">${evt/message}</font> </b> <a href="${urls/reopenUrl}">Reopen</a> <br><img src="cid:image2"><br> </span> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), ) host = schema.Text( title=_t(u'SMTP Host'), description=_t(u'Simple Mail Transport Protocol (aka E-mail server).'), ) port = schema.Int( title=_t(u'SMTP Port (usually 25)'), description=_t( u'TCP/IP port to access Simple Mail Transport Protocol (aka E-mail server).' ), ) useTls = schema.Bool( title=_t(u'Use TLS?'), description=_t(u'Use Transport Layer Security for E-mail?')) user = schema.Text( title=_t(u'SMTP Username (blank for none)'), description=_t(u'Use this only if authentication is required.'), ) password = schema.Password( title=_t(u'SMTP Password (blank for none)'), description=_t(u'Use this only if authentication is required.'), )
class IEmailActionContentInfo(IActionContentInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues(getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[zenoss] ${evt/device} ${evt/summary}')) body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Time: ${evt/lastTime} Message: ${evt/message} <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/ackUrl}">Acknowledge</a> <a href="${urls/closeUrl}">Close</a> <a href="${urls/eventsUrl}">Device Events</a> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[zenoss] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' Event: '${evt/summary}' Cleared by: '${evt/clearid}' At: ${evt/stateChange} Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Message: ${evt/message} <a href="${urls/reopenUrl}">Reopen</a> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), ) host = schema.Text( title=_t(u'SMTP Host'), description=_t(u'Simple Mail Transport Protocol (aka E-mail server).'), ) port = schema.Int( title=_t(u'SMTP Port (usually 25)'), description=_t( u'TCP/IP port to access Simple Mail Transport Protocol (aka E-mail server).' ), ) useTls = schema.Bool( title=_t(u'Use TLS?'), description=_t(u'Use Transport Layer Security for E-mail?')) user = schema.Text( title=_t(u'SMTP Username (blank for none)'), description=_t(u'Use this only if authentication is required.'), ) password = schema.Password( title=_t(u'SMTP Password (blank for none)'), description=_t(u'Use this only if authentication is required.'), )
class IAWSEmailHostActionContentInfo(IInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues( actions.getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[zenoss] ${evt/device} ${evt/summary}')) body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Time: ${evt/lastTime} Message: ${evt/message} <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/ackUrl}">Acknowledge</a> <a href="${urls/closeUrl}">Close</a> <a href="${urls/eventsUrl}">Device Events</a> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[zenoss] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' Event: '${evt/summary}' Cleared by: '${evt/clearid}' At: ${evt/stateChange} Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Message: ${evt/message} <a href="${urls/reopenUrl}">Reopen</a> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), default=u'*****@*****.**') aws_account_name = schema.Text( title=_t(u'AWS Account Name'), description=_t(u'Name of the AWS account you\'ll be using.'), ) aws_region = schema.Choice( title=_t(u'AWS Region'), vocabulary=SimpleVocabulary.fromValues(getSESRegions()), description=_t(u'List of available AWS Regions.'), default=getSESRegions()[0]) aws_access_key = schema.Text( title=_t(u'AWS Access Key'), description=_t(u'Access Key for the AWS account.'), ) aws_secret_key = schema.Password( title=_t(u'AWS Secret Key'), description=_t(u'Secret Key for the AWS account.'), )