2 Replies Latest reply on Oct 16, 2014 1:55 PM by Rafael de Sales y Ulhoa

    How to order a global configuration to pass device discrepancy report

      Share This:

      Hello all,

       

      I'm currently having problems with a Cisco Nexus global device configuration item that the community might be able to help me with. The item in question shows up in different positions of the Running and Startup configuration and, although the lines are exactly the same, BNA indicates a false-positive discrepancy because of the different positioning. The image below illustrates the issue which I've been trying to solve.

       

       

      BNA_command_order.png

       

       

      I've already attempted tweaking the device adapter "sortedCommands" section, using types single and block but with no success or visible change. Adding it to the "commentLines" section does make BNA ignore it and pass the discrepancy analysis but it leaves the door open for future oversight by the operations team.

       

      I've added below a snippet of the XML file but please let me know if the rest of it would help.

       

       

      <commentLines>
          <line>^\s*!</line>
          <line>^System Up Time\.+.+$</line>
          <line>^Internal Temperature\.+.+$</line>
          <line>^Last Run\.+.+$</line>
          <line>^.+Last Run\.+.+$</line>
          <line>^User has obsolete role.+$</line>
          <line context="discrepancy" scope="02C89A1F-A5D2-44B0-AE1E-B714EB0E3FAF,1D168B48-15CC-416E-AB4A-88E2E7104E2D">^feature\s+fex.*</line>
          <!-- "feature fex" line missing in tunneled version of startup -->
          <line context="discrepancy" scope="02C89A1F-A5D2-44B0-AE1E-B714EB0E3FAF,1D168B48-15CC-416E-AB4A-88E2E7104E2D">^\s*set dscp </line>
          <!-- "set dscp <id>" occasionally is different between running and startup configs, with running having a user defined name, and the startup the equivalent ID number -->
      </commentLines>
      <sortedCommands>
          <line
              trails="02C89A1F-A5D2-44B0-AE1E-B714EB0E3FAF, 1D168B48-15CC-416E-AB4A-88E2E7104E2D" type="block">^interface\s+\S+.*</line>
          <line
              trails="02C89A1F-A5D2-44B0-AE1E-B714EB0E3FAF, 1D168B48-15CC-416E-AB4A-88E2E7104E2D" type="single">^\s+service-policy type .+</line>
          <line order="descending" context="discrepancy" 
              trails="02C89A1F-A5D2-44B0-AE1E-B714EB0E3FAF, 1D168B48-15CC-416E-AB4A-88E2E7104E2D" type="single">^crypto key param .+</line>
      </sortedCommands>