RME Compliance Check Per-interface pre-req

Answered Question
Jul 14th, 2009
User Badges:

I am trying to do something similar to:

http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=Network%20Management&topicID=.ee71a02&fromOutline=&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.1ddcdade


Where I want to have an interface's subcommand as a prequisite to apply other commands to the interface. Basically:


if interface -switchport mode trunk, then apply X


In the thread above, jclarke said RME had a limitation where it could not do this. Has it been resolved? If it has, I need some help with my template.

Correct Answer by Joe Clarke about 8 years 1 week ago

You are using a negative prerequisite, so you are seeing bug CSCsv25190. This bug is fixed in LMS 3.2.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Joe Clarke Tue, 07/14/2009 - 12:44
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Yes, this is doable in RME 4.1 and higher.

zztopping Tue, 07/14/2009 - 13:34
User Badges:

Can you tell me what is wrong with this logic? I know my interface Regex is good, as this works fine without the prerequisite check. This should return any port 1/0/1 - 1/0/24 that does NOT have switchport mode trunk, has the + commmands below. When I do a check, it just returns that I do not have any of the prerequisites...should return "compliant"


PreReq:

Parent: None

Prereq: None

Prereq?: Checked

Submode: interface [#.*/0/([1-9]|1[0-9]|2[0-4])#]

CLI:

- switchport mode trunk


Check:

Parent: PreReq

Prereq: PreReq

Prereq?: Not Checked

Submode: Blank

CLI:

+ switchport mode access

+ switchport nonegotiate

+ spanning-tree portfast

+ storm-control broadcast level 1.00

+ storm-control multicast level 1.00

Correct Answer
Joe Clarke Tue, 07/14/2009 - 15:11
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

You are using a negative prerequisite, so you are seeing bug CSCsv25190. This bug is fixed in LMS 3.2.

zztopping Wed, 02/10/2010 - 13:37
User Badges:

Running LMS 3.2 now with RME 4.3.1, still hitting this bug(at least a variation of it)



My (current) specific complaint is as follows:


Prerequisite:


Submode:

     interface [#.*#]

Checks:

     +switchport mode trunk

     -[#channel-group.*#]




In theory, this is to match all trunk ports that are not a member of a port channel. In testing, this matches ALL trunks(basically ignoring the negative statement).


In further testing, if i remove the positive statement ("+switchport mode trunk") and leave ONLY the negative check ("-channel-group") it DOES match all ports not a member of a portchannel.


So it seems this bug has been partially fixed, in that negative prereq checks DO work, just not in combination with a postivie check.


Is there a current bug logged? Or better yet, is there a workaround for this?

Joe Clarke Wed, 02/10/2010 - 18:04
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

This is CSCta80687.  The problem stems from the fact that your negative prereq uses regular expressions (this bug only happens in certain circumstances).  There is currently no fix or workaround.  It will be fixed in LMS 4.0 due out this summer.

Actions

This Discussion