1 Reply Latest reply on May 15, 2020 11:01 AM by James Smith

    bulk change device type

    Greg Michael
      Share This:

      We discovered that the Digi Cellular routers that we use have changed their model string, and the current Digi adapter in TSNA needed to be modified to accommodate this.

       

      For anyone using these, the bootloader starting with version 7.2.x no longer contains the word "Transport" in the model string.

       

      To work around this specific issue, updating the following code in the adapter fixed it.

                      <capture buffer="Digi(?:\s+TransPort)?\s+(\S+).*">
                          <property name="disc.model">{1}</property>
                      </capture>
      

       

      Explanation:

      * The parentheses (?:\s+TransPort)? create a regular expression grouping, and the '?:' tells the system to not group the matched pattern.

      * \s+ matches one or more space characters (space, tab, etc.)

      * the trailing '?' tells us the regular expression appears zero or one times

       

      What I'm now faced with is how to update 2000+ devices in bulk to use the new adapter? I'm not the normal administrator for this product, but I have been stepping in to assist.

       

      Anyone have any scriptable or command line utilities that can do this?

       

      Thanks in advance!

      Greg

        • 1. Re: bulk change device type
          James Smith

          Greg,

           

             If you've simply modified and imported the existing adapter (recommended) then you need to do nothing further. The next job run against these devices will utilize the new regex pattern and work for you.

           

            However if you've created an entirely new adapter (not recommended), then you can perform a mass change in a couple of ways:

               1) You can filter your device list to include the devices you need to change, select all , click the edit at the top of the frame, change the device type to the new adapter

           

               2) You can also do a device import using a CSV file and indicate the new device type. You will need to select the "overwrite existing device type" option in the import task. Here is a link to the document with the CSV file format:

                   Mapping for the CSV format - Documentation for TrueSight Network Automation 20.02 - BMC Documentation

           

          Smitty

          1 of 1 people found this helpful