DX NetOps

 View Only
Expand all | Collapse all

how to define NCM multi line block policy for adjecent blocks

  • 1.  how to define NCM multi line block policy for adjecent blocks

    Posted Aug 04, 2015 10:49 AM

    Hi Community

     

    I'm trying to build a block policy for the following configuration

     

    !

    line 0/1/0

    config line x

    config line y

    config line z

    line 0/1/1 0/1/7

    config line x2

    config line y2

    config line z2

    line 0/1/8 0/1/15

    config line x

    config line y

    config line z

    line vty 0 5

    config blablabla

     

    A block starts at line x/y/z until the next line x/y/z... So the above example has 3 block I want to consider.

     

    my initial idea was to define start and end tag like this:

    start:   line [0-9]/.*    (regexp)

    end:    line

     

     

    After a lot of testing I believe that this will result in only two blocks

     

    line 0/1/0

    config line x

    config line y

    config line z

    line 0/1/1 0/1/7

    config line x2

    config line y2

    config line z2

    line 0/1/8 0/1/15

    config line x

    config line y

    config line z

    line vty 0 5

    config blablabla

     

    The red lines are a block and the blue lines are a block. The block in the middle is not verified against the policy.

    Is this possible? I've tried ^!\s as well as a closing tag, no luck either

     

    any sugestions?

    much thanks

    Hans



  • 2.  Re: how to define NCM multi line block policy for adjecent blocks

    Broadcom Employee
    Posted Jun 26, 2017 01:13 PM

    Thanks for using the CA Community!  It looks like your question has been answered so we are closing this thread out.  If you have additional questions, please feel free to contact us again.