Quantcast
Viewing all articles
Browse latest Browse all 13537

NCM Compliance Rules - IF/THEN/ELSE Logic and Global Config + Config Blocks

Would like to see NCM have IF/THEN/ELSE logic added to the compliance rules as well as the ability to test global configuration while testing config blocks.

 

Example use case: Needing to check all layer 3 interfaces for IP PIM and IGMPv3

 

IF

   must contain regex: (ip multicast-routing.*|router.*) // device must be an IOS router or layer 3 switch that's capable of running multicast routing (global config check)

THEN

   CONFIG BLOCK START: ^interface.*

   IF

      must contain regex: ip address ([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})

   THEN

      must contain string: ip pim spare-mode

      AND

      must contain string: ip igmp version 3

  CONFIG BLOCK END: ^interface.*|^\!


Viewing all articles
Browse latest Browse all 13537

Trending Articles