noc.cm.engine

Module Contents

noc.cm.engine.logger
class noc.cm.engine.Engine(object)

Bases: object

ILOCK
AC_POLICY_VIOLATION
get_template(self, fact)
get_rule_number(self)
assert_fact(self, fact)
learn(self, gen)

Learn sequence of facts

iter_errors(self)

Generator yielding known errors

iter_roles(self)

Generator yielding role fact

run(self)

Run engine round :returns: Number of matched rules

add_rule(self, expr)
check(self)
_check(self)

Perform object configuration check

_get_rule_settings(self, ps, scope)

Process PolicySettings object and returns a list of (validator class, config)

_get_rules(self, model, id, scope, obj=None)
get_rules(self)
get_fact_uuid(self, fact)
get_fact_attrs(self, fact)
sync_facts(self)

Retrieve known facts and synchronize with database

compile_query(self, **kwargs)
find(self, **kwargs)

Search facts for match. Returns a list of matching facts

find_one(self, **kwargs)

Search for first matching fact. Returns fact or None

sync_alarms(self)

Raise/close related alarms

setup_env(self, env)

Install additional CLIPS functions