cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1340
Views
0
Helpful
3
Replies

Compliance template failure using Prerequisite Command Set

Disc01079
Level 1
Level 1

Hi,

Is het my failure in reasoning or is CIscoWorks LMS 3.2 here at fault?
After reading the whitepaper "CiscoWorks Resource Manager Essentials Compliance Management"
I tried to use the "Prerequisite Command Set" in order to check the compliance of the trunk
interface configuration. I created therefore the following template where I check for the
existance of the statement "switchport mode trunk":

Name: Global     SubMode: No      isPrerequisite: No
Ordered : No     Prerequisite-Commandset : none     Parent: none

Name: InterfaceTrunk     SubMode: Yes      isPrerequisite: No
Ordered : No     Prerequisite-Commandset : none     Parent: Global
  interface   [#.*Ethernet.*#]
# check trunk ports

Name: IntTrunkPrereq     SubMode: No      isPrerequisite: Yes
Ordered : No     Prerequisite-Commandset : none     Parent: InterfaceTrunk

#
+switchport mode trunk

Name: IntTrunk     SubMode: No      isPrerequisite: No
Ordered : No     Prerequisite-Commandset : IntTrunkPrereq     Parent: InterfaceTrunk
  +  [#description   .*#]
  +   load-interval   50


The Job results are that for every interface I receive the addition suggestion:

+interface FastEthernet0/1
    +   load-interval 50


regardless whether the configuration contains "switchport mode trunk" or "switchport mode access".
I tried some other variants with the same result. So does anyone know what's wrong in my reasoning here?

I'm using CWLMS 3.2 with RME 4.3.0

Kind regards,

Dick Hogeweg

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

This is wrong.  You need to combine the submode and prereq commandlets into one:

Name : TrunkPorts

Submode : interface [#.Ethernet.*#]

IsPrereq : Yes

Body:

+ switchport mode trunk

Name : IntTrunk

Parent : TrunkPorts

Prereq : TrunkPorts

Body:

+ [#description .*#]

+ load-interval 50

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

This is wrong.  You need to combine the submode and prereq commandlets into one:

Name : TrunkPorts

Submode : interface [#.Ethernet.*#]

IsPrereq : Yes

Body:

+ switchport mode trunk

Name : IntTrunk

Parent : TrunkPorts

Prereq : TrunkPorts

Body:

+ [#description .*#]

+ load-interval 50

Hi Joe,

This is indeed the solution. What threw me off balance was the fact that when you construct the template I got an error "A commandlet cannot be its own prerequisit". This happens when you first create your prereq, save it, click on your prereq link at the Command set column, click on add and create and save the comandlet with prereq as prerequisit. But I can work around this error and then everything works fine. Thanks for your help,

Dirk

Hi,

Another thing thing to be aware off is that you can't group prerequisites command sets into a parent command set (ie Interfaces). This makes the prerequisites command sets effectless. Cheers,

Dirk

Review Cisco Networking for a $25 gift card