The Assimilation Project  based on Assimilation version 1.1.7.1474836767
cma.monitoring.OCFMonitoringRule Class Reference
Inheritance diagram for cma.monitoring.OCFMonitoringRule:
Collaboration diagram for cma.monitoring.OCFMonitoringRule:

Public Member Functions

def __init__ (self, provider, rsctype, triplespec)
 
def constructaction (self, context)
 
- Public Member Functions inherited from cma.monitoring.MonitoringRule
def __init__ (self, monitorclass, tuplespec, objclass='service')
 
def tripletuplecheck (self, triplespec)
 
def specmatch (self, context)
 
def constructaction (self, context)
 

Data Fields

 provider
 
 rsctype
 
- Data Fields inherited from cma.monitoring.MonitoringRule
 monitorclass
 
 objclass
 
 nvpairs
 

Additional Inherited Members

- Static Public Member Functions inherited from cma.monitoring.MonitoringRule
def monobjclass (mtype='service')
 
def ConstructFromString (s, objclass='service')
 
def compute_available_agents (context)
 
def findbestmatch (context, preferlowoverpart=True, objclass='service')
 
def findallmatches (context, objclass='service')
 
def ConstructFromFileName (filename)
 
def load_tree (rootdirname, pattern=r".*\.mrule$", followlinks=False)
 
- Static Public Attributes inherited from cma.monitoring.MonitoringRule
int NOMATCH = 0
 
int NEVERMATCH = 1
 
int PARTMATCH = 2
 
int LOWPRIOMATCH = 3
 
int MEDPRIOMATCH = 4
 
int HIGHPRIOMATCH = 5
 
dictionary monitor_objects = {'service': {}, 'host': {}}
 

Detailed Description

Class for implementing monitoring rules for OCF style init script monitoring
OCF ==  Open Cluster Framework

Definition at line 713 of file monitoring.py.

Constructor & Destructor Documentation

def cma.monitoring.OCFMonitoringRule.__init__ (   self,
  provider,
  rsctype,
  triplespec 
)
Parameters
----------
provider: str
    The OCF provider name for this resource
    This is the directory name this resource is found in
rsctype: str
    The OCF resource type for this resource (service)
    This is the same as the script name for the resource

triplespec: list
    Similar to but wider than the MonitoringRule tuplespec
    (name,  expression, regex,  regexflags(optional))

    'name' is the name of an OCF RA parameter or None or '-'
    'expression' is an expression for computing the value for that name
    'regex' is a regular expression that the value of 'expression' has to match
    'regexflags' is the optional re flages for 'regex'

    If there is no name to go with the tuple, then the name is given as None or '-'
    If there is no regular expression to go with the name, then the expression
and remaining tuple elements are missing.  This can happen if there
is no mechanical way to determine this value from discovery information.
    If there is a name and expression but no regex, the regex is assumed to be '.'

Definition at line 718 of file monitoring.py.

Member Function Documentation

def cma.monitoring.OCFMonitoringRule.constructaction (   self,
  context 
)
Construct arguments to give MonitorAction constructor
    We can either return a complete match (HIGHPRIOMATCH)
    or an incomplete match (PARTMATCH) if we can't find
    all the parameter values in the nodes we're given
    We can also return NOMATCH if some things don't match
    at all.

Definition at line 751 of file monitoring.py.

References cma.monitoring.MonitoringRule.nvpairs, cma.monitoring.MonitorAction.provider, cma.monitoring.OCFMonitoringRule.provider, and cma.monitoring.OCFMonitoringRule.rsctype.

Field Documentation

cma.monitoring.OCFMonitoringRule.provider

Definition at line 744 of file monitoring.py.

Referenced by cma.monitoring.OCFMonitoringRule.constructaction().

cma.monitoring.OCFMonitoringRule.rsctype

The documentation for this class was generated from the following file: