Пример #1
0
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                
LinkUpDown = declareMessage(
"""
This message is created upon network interface state change
@version: 2.6.0.0
@format: Interface [interface], changed state to [state]
@param interface
@param state: Valid values: 'down' (initial state), 'up', 'administratively down', 'unknown'
""",
MessageBase.STATE_ACTIVE,

    MessageBase.NOTIFICATION, 
    "NET", "LINK", "UPDOWN",
    "Interface %s, changed state to %s")


ConnectivityTestChange = declareMessage(
"""
This message is created upon network connectivity check result change
@version: 2.6.0.0
@format: Interface [interface] [protocol] connectivity check operational state changed to [state]. Reason: [reason]
@param interface
@param protocol: Valid values: 'IPv4', 'IPv6'
Пример #2
0
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                

AppUserRestart = declareMessage(
"""
This message is created when user is initiating an application restart
@version: 2.6.0.0
@format: User initiated application restart. Reason: [reason], application started at [date]
@param reason: Application restart reason. Valid values: 'user command', 'technician', 'unknown', 'software upgrade', 'software downgrade'
@param date: Application last start time
""",
MessageBase.STATE_ACTIVE,

    MessageBase.NOTIFICATION, 
    "SYS", "SYSMGR", "USER_APP_RESTART", 
    "User initiated application restart. Reason: %s, application started at %s")

OsUserRestart = declareMessage(
"""
This message is created when user is initiating an OS restart
@version: 2.6.0.0
@format: User initiated OS restart. Reason: [reason], OS started at [date]
@param reason: Os restart reason. Valid values: 'user command', 'technician', 'unknown', 'software upgrade', 'software downgrade'
@param date: OS last start time
""",
Пример #3
0
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: amiry
# 

from message_base import declareMessage, MessageBase
                
QueueGettingFull = declareMessage(
"""
This message is created when content reporting export queue is gettign full
@version: 3.0.0.0
@format: [export-name] reports queue state is [state]
@param export-name: name of the export
@param state: can be "getting-full" or "normal"
""",
MessageBase.STATE_ACTIVE,

    MessageBase.WARNING, 
    "CONTENT", "EXPORT", "QUEUE_GETTING_FULL",
    "%s reports queue state is %s")

QueueFull = declareMessage(
"""
This message is created when content reporting export queue is full
@version: 3.0.0.0
@format: [export-name] reports queue is full. [num-transations-lost] transactions lost
@param export-name: name of the export
@param num-transactions-lost: number of disacarded transactions
""",
Пример #4
0
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                
DeliveryStateChange = declareMessage(
"""
This message is created upon delivery state change
@version: 2.6.0.0
@format: Content delivery state changed to [state]. Reason: [reason]
@param state: Valid values: 'enabled' (default), 'disabled'
@param reason: Valid values: 'not enough content disks in up state', 'no available delivery interface'
""",
MessageBase.STATE_ACTIVE,

    MessageBase.CRITICAL, 
    "CONTENT", "DELIVERY", "CHANGE", 
    "Content delivery state changed to %s. Reason: %s")


DeliveryInterfaceIpv4Request = declareMessage(
"""
This message is created upon change in the actual delivery interface
@version: 2.6.0.0
@format: Interface [analytic-interface] IPv4 content requests are delivered by [i/f-list]
@param analytic-interface
@param i/f-list: note: currently i/f list is one or none (if all are down).
Пример #5
0
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

# A message to be create by "a.api.user_log.msg.example.SimpleExample()"
# Of Severity "notification", category "CATEGORY", group "GROUP", code "CODE"
# and text: "text to be sent to the log"
SimpleExample = declareMessage(
    """
This message is created whenever ...
@version: 
@format: Text to be sent to the log
""", MessageBase.STATE_DECLARED, MessageBase.WARNING, "CATEGORY", "GROUP",
    "CODE", "Text to be sent to the log")

# A message to be create by "a.api.user_log.msg.example.ParametersExample(inputString, inputNumber)"
# Of Severity "notification", category "CATEGORY", group "GROUP", code "CODE"
# and a customized text that embed a string and a number
ParametersExample = declareMessage(
    """
This message is created whenever...
@version: 
@format: A string [str] and a number [num] are sent to the log
@param str: the string... Valid values: 'abc', ...
@param num: a number
""", MessageBase.STATE_DECLARED, MessageBase.NOTIFICATION, "CATEGORY", "GROUP",
Пример #6
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

AppUserRestart = declareMessage(
    """
This message is created when user is initiating an application restart
@version: 2.6.0.0
@format: User initiated application restart. Reason: [reason], application started at [date]
@param reason: Application restart reason. Valid values: 'user command', 'technician', 'unknown', 'software upgrade', 'software downgrade'
@param date: Application last start time
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "SYS", "SYSMGR",
    "USER_APP_RESTART",
    "User initiated application restart. Reason: %s, application started at %s"
)

OsUserRestart = declareMessage(
    """
This message is created when user is initiating an OS restart
@version: 2.6.0.0
@format: User initiated OS restart. Reason: [reason], OS started at [date]
@param reason: Os restart reason. Valid values: 'user command', 'technician', 'unknown', 'software upgrade', 'software downgrade'
@param date: OS last start time
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "SYS", "SYSMGR",
    "USER_OS_RESTART",
Пример #7
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

TableClear = declareMessage(
    """
This message is created upon delivery assurance table clear
@version: 
@format: TBD
""", MessageBase.STATE_DECLARED, MessageBase.INFORMATIONAL, "CONTENT",
    "DELIVERY-ASSURANCE", "TBD-TABLE-CLEARED-TBD", "TBD")
Пример #8
0
#
# Copyright Qwilt, 2013
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: shmulika
# 

from message_base import declareMessage, MessageBase
                
PowerOperationalStatusChanged = declareMessage(
"""
This message is created whenever the operational status of the power supplies changed
@version: 3.0.0.0
@format: Power operational-status changed to [new-status]
@param new-status: Valid values: 'up', 'degraded', 'unknown'
""", 
MessageBase.STATE_ACTIVE,

    MessageBase.ERROR, 
    "PLATFORM", "POWER", "OPERATIONAL-STATUS-CHANGED",
    "Power operational-status changed to %s")


PowerSupplyOperationalStatusChanged = declareMessage(
"""
This message is created whenever the operational status of the a power supply has changed
@version: 3.0.0.0
@format: Power supply [power-supply-entity] at location `[location]` operational-status changed to [new-status]
@param power-supply-entity: String
@param location: String
@param new-status: Valid values: 'up', 'down', 'unknown'
Пример #9
0
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                
# A message to be create by "a.api.user_log.msg.example.SimpleExample()"
# Of Severity "notification", category "CATEGORY", group "GROUP", code "CODE"
# and text: "text to be sent to the log"
SimpleExample = declareMessage(
"""
This message is created whenever ...
@version: 
@format: Text to be sent to the log
""", 
MessageBase.STATE_DECLARED,

    MessageBase.WARNING, 
    "CATEGORY", "GROUP", "CODE",
    "Text to be sent to the log")

# A message to be create by "a.api.user_log.msg.example.ParametersExample(inputString, inputNumber)"
# Of Severity "notification", category "CATEGORY", group "GROUP", code "CODE"
# and a customized text that embed a string and a number
ParametersExample = declareMessage(
"""
This message is created whenever...
@version: 
@format: A string [str] and a number [num] are sent to the log
@param str: the string... Valid values: 'abc', ...
Пример #10
0
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                

OsUpgrade = declareMessage(
"""
This message is created upon os upgrade
@version: 2.6.0.0
@format: Upgrading OS from version [current-version] to version [next-version]
@param current-version
@param next-version
""",
MessageBase.STATE_ACTIVE,

    MessageBase.NOTIFICATION, 
    "SYS", "INSTALL", "OS_UPGRADE", 
    "Upgrading OS from version %s to version %s")

OsDowngrade = declareMessage(
"""
This message is created upon os downgrade
@version: 2.6.0.0
@format: Downgrading OS from version [current-version] down to version [next-version]
@param current-version
@param next-version
""",
Пример #11
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

Configured = declareMessage(
    """
This message is created whenever a configuration is successfully submitted
@version: 
@format: Configured from [IP-address] by [user-name]
@param IP-address
@param user-name
""", MessageBase.STATE_DECLARED, MessageBase.NOTIFICATION, "SYS", "CFG",
    "CONFIG_I", "Configured from %s by %s")

SshLogin = declareMessage(
    """
This message is created upon a successful user Login to CLI
@version: 
@format: Login success user [user-name] from [IP-address]
@param user-name
@param IP-address
""", MessageBase.STATE_DECLARED, MessageBase.NOTIFICATION, "SECURITY", "SSHD",
    "LOGIN_SUCCESS", "Login success user %s from %s")

SshLoginFailure = declareMessage(
Пример #12
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

ContentDiskState = declareMessage(
    """
This message is created whenever a content disk state is changed
@version: 2.6.0.0
@format: Content disk [disk-name], changed state to [state]. Reason: [reason]
@param disk-name
@param state: Valid values: 'up' (initial state), 'down', 'disabled' (future)
@param reason: Valid values: 'disk was initialized', 'absent', 'disk error', 'foreign'
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "CONTENT", "DISK",
    "CHANGE", "Content disk %s, changed state to %s. Reason: %s")

ContentDiskInit = declareMessage(
    """
This message is created whenever a content disk was initialized
@version: 2.6.0.0
@format: Content disk [disk-name] was initialized
@param disk-name
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "CONTENT", "DISK",
    "INIT", "Content disk %s was initialized")

ContentDiskCount = declareMessage(
Пример #13
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                
TableClear = declareMessage(
"""
This message is created upon delivery assurance table clear
@version: 
@format: TBD
""",
MessageBase.STATE_DECLARED,

    MessageBase.INFORMATIONAL, 
    "CONTENT", "DELIVERY-ASSURANCE", "TBD-TABLE-CLEARED-TBD",
    "TBD")

Пример #14
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

LinkUpDown = declareMessage(
    """
This message is created upon network interface state change
@version: 2.6.0.0
@format: Interface [interface], changed state to [state]
@param interface
@param state: Valid values: 'down' (initial state), 'up', 'administratively down', 'unknown'
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "NET", "LINK",
    "UPDOWN", "Interface %s, changed state to %s")

ConnectivityTestChange = declareMessage(
    """
This message is created upon network connectivity check result change
@version: 2.6.0.0
@format: Interface [interface] [protocol] connectivity check operational state changed to [state]. Reason: [reason]
@param interface
@param protocol: Valid values: 'IPv4', 'IPv6'
@param state: Valid values: 'down' (initial state), 'up', 'not applicable', 'unknown'
@param reason: TBD
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "NET",
    "CONNECTIVITY-CHECK", "CHANGE",
Пример #15
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
#

from message_base import declareMessage, MessageBase

OsUpgrade = declareMessage(
    """
This message is created upon os upgrade
@version: 2.6.0.0
@format: Upgrading OS from version [current-version] to version [next-version]
@param current-version
@param next-version
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "SYS", "INSTALL",
    "OS_UPGRADE", "Upgrading OS from version %s to version %s")

OsDowngrade = declareMessage(
    """
This message is created upon os downgrade
@version: 2.6.0.0
@format: Downgrading OS from version [current-version] down to version [next-version]
@param current-version
@param next-version
""", MessageBase.STATE_ACTIVE, MessageBase.NOTIFICATION, "SYS", "INSTALL",
    "OS_DOWNGRADE", "Downgrading OS from version %s down to version %s")

AppUpgrade = declareMessage(
Пример #16
0
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: nirs
# 

from message_base import declareMessage, MessageBase
                
ContentDiskState = declareMessage(
"""
This message is created whenever a content disk state is changed
@version: 2.6.0.0
@format: Content disk [disk-name], changed state to [state]. Reason: [reason]
@param disk-name
@param state: Valid values: 'up' (initial state), 'down', 'disabled' (future)
@param reason: Valid values: 'disk was initialized', 'absent', 'disk error', 'foreign'
""", 
MessageBase.STATE_ACTIVE,

    MessageBase.NOTIFICATION, 
    "CONTENT", "DISK", "CHANGE",
    "Content disk %s, changed state to %s. Reason: %s")


ContentDiskInit = declareMessage(
"""
This message is created whenever a content disk was initialized
@version: 2.6.0.0
@format: Content disk [disk-name] was initialized
@param disk-name
""", 
Пример #17
0
#
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: amiry
#

from message_base import declareMessage, MessageBase

QueueGettingFull = declareMessage(
    """
This message is created when content reporting export queue is gettign full
@version: 3.0.0.0
@format: [export-name] reports queue state is [state]
@param export-name: name of the export
@param state: can be "getting-full" or "normal"
""", MessageBase.STATE_ACTIVE, MessageBase.WARNING, "CONTENT", "EXPORT",
    "QUEUE_GETTING_FULL", "%s reports queue state is %s")

QueueFull = declareMessage(
    """
This message is created when content reporting export queue is full
@version: 3.0.0.0
@format: [export-name] reports queue is full. [num-transations-lost] transactions lost
@param export-name: name of the export
@param num-transactions-lost: number of disacarded transactions
""", MessageBase.STATE_ACTIVE, MessageBase.ERROR, "CONTENT", "EXPORT",
    "QUEUE_FULL", "%s reports queue is full. %d transactions lost")