noc.cm.validators.interface.descriptionnotmatchre

Module Contents

class noc.cm.validators.interface.descriptionnotmatchre.InterfaceDescriptionNotMatchRegexpValidator

Bases: noc.cm.validators.clipsinterface.CLIPSInterfaceValidator

TITLE = Interface description *MUST NOT MATCH* regex
DESCRIPTION = Interface description MUST NOT MATCH regular expression
TAGS = ['description']
CONFIG_FORM
RULES = (defrule {{RULENAME}} (interface (name "{{name}}") (admin_status 1) (description ?d)) (test (match-re "{{regex}}" ?d)) => (assert (error (type "Interface | Invalid Description") (obj "{{name}}") (msg "{{regex}}") ) ) )