Important

   

Starting version 8.9.03, BMC Network Automation is renamed to TrueSight Network Automation. This space contains information about BMC Network Automation 8.9.02 and previous versions. For TrueSight Network Automation 8.9.03 and later releases, see the TrueSight Network Automation documentation.

Populating End of Life data for Cisco devices

Device vendors regularly publish end of life (EOL) bulletins for an equipment they support. The bulletins indicate that you need to replace or upgrade that equipment within a reasonable time. Starting with version 8.9.02, BMC Network Automation can help remind you to do this by flagging such devices. You can import these EOL bulletins in advance of the EOL dates. 

Different vendors publish the EOL content in different formats, such as PDF, HTML, and XML that can be accessible through various means. Starting with version 8.9.02, BMC Network Automation can read the EOL bulletins (XML) released by Cisco and convert this content in a form that can be used to alert customers about EOLs of various devices in the device inventory.

This topic describes the process of populating EOL data for Cisco devices and provides instructions for the same.

Process of populating EOL data

The process of populating EOL data comprises the following steps:

  1. Discover and store board models IDs and serial numbers of devices: A network device can have multiple boards and each board can have a different EOL date. BMC Network Automation discovers and stores board models IDs and corresponding serial numbers in two multi-value device dynamic fields, Device Board Models and Device Board Serial Numbers, through a custom action, Get Board Models and their Serial Numbers
  2. Fetch EOL data from Cisco Portal: Get EOL data of device board model IDs of the required Cisco devices from Cisco portal in XML format.
  3. Store EOL data: Store the data obtained in steps 1 and 2 in a new configuration trail, Device End of Life in JSON format. 
  4. Populate EOL dates: Populate EOL dates for device on the Devices page through a date type dynamic field, End of Life Date.

Depending on whether the BMC Network Automation application server has the Internet connectivity in your network, you can choose from the following methods to populate the EOL data for your devices:

Populating EOL data when the application server has internet connectivity

To populate EOL data, you need to run the predefined job, Populate Cisco Device Board Models and their End of Life Date on the application server. This predefined job contains a custom action, Get Board Models and their Serial Numbers and an external script action, Populate End of Life Date. By default, the custom action runs on all Cisco devices. You can modify this action to run on specific network span. The external script action contains default values for runtime parameters. Change these values as per your environment.

BMC Network Automation is also shipped with a canned policy, Populate Cisco Device Board Models and their End of Life Date, which you can use to schedule for capturing and populating EOL data. The out of box policy is time based, which will run once in a month. Depending on your requirements, you can schedule this operation weekly, monthly, or yearly to capture hardware changes in your data center. After replacing or upgrading your hardware, BMC recommends to run the predefined job or policy to update EOL data.

Before you begin

Before you begin populating EOL data, ensure that the following prerequisites are met:

  • Install Python version 3.6 or later (64-bit) on the application server.
  • Obtain Client ID and Client Secret for the EoX API from the Cisco API Console.

Installing Python

  • (Windows) Install Python version 3.6 or later (64-bit) on the application server, as follows:
    1.  (Windows) While installing Python, ensure that the Add Python <versionNo> to PATH option is selected on the Install Python panel and the Install for all users option is selected on the Advanced Options panel, as shown in the following figures:
    2. After you install Python, from the <PyhtonInstallationDir>\scripts directory, install the request and lxml dependencies using the following commands: 
      • pip install requests
      • pip install lxml
  • (Linux) Install Python and dependencies as follows: 

    1. Install Python version 3.6 or later. 

      Recommendation

      BMC recommends to install only one version of Python (3.6 or later). If for some reason, it is not possible to uninstall other versions, then you need to point your BMC Network Automation to use 3.6 or later version, using the following commands in the mentioned order:

      sudo rm -f /usr/bin/python

      sudo ln -s /usr/local/bin/python<versionNo> /usr/bin/python

      Warning: If any of the applications are using the default Python installed on your computer, when you execute these commands, they will stop running. So, please contact your system administrator before running these commands.

    2. After you install Python, install the request and lxml dependencies using the following commands:
      • pip install requests
      • pip install lxml

Obtaining Client ID and Client Secret for the EoX API 

  1. Access the Cisco portal.
  2. Create a user account on the Cisco portal if you do not have one.
  3. Under the Your APIs section, click Explore your APIs now.
  4. Look for the EOX API.

    Important

    If you are not able to view the EOX API on the Cisco console for registration, contact Cisco customer support with a valid Support Contract ID.

  5. Click Request Access for the EOX API.

    After registration, you should see EoX API entry with Client ID and Client Secret under My Applications.

To run the predefined job

  1. Navigate to Network > Actions > Predefined Jobs.
    The Predefined Jobs list page appears.
  2. For the Populate Cisco Device Board Models and their End of Life Date predefined job, in the Actions column, click Prepare Job .
  3. Enter information for the following runtime parameters, which are required for the Populate End of Life Date external script action:

    ParameterDescription
    File Path of End of Life DataPath and name of the file in which EOL data is to be stored. Change the default location if required.

    BMC Network Automation Server URL

    Enter the URL of the application server in the following format: https://serverName:portNumber/bca-networks.
    BMC Network Automation Server User NameUser name for the target application server
    BMC Network Automation Server PasswordPassword for the user name
    End of Life Milestone Date NameCisco publishes multiple EOL milestone dates such as, EndOfSaleDate, LastDateOfSupport, and EndOfSWMaintenanceReleases. Specify the one you want to be populated. BMC Network Automation follows that date to populate the EOL date.
    Cisco EoX API Registered Client IDClient ID that you obtained in the Obtaining Client ID and Client Secret for the EoX API section
    Cisco EOX API Client SecretClient Secret that you obtained in the Obtaining Client ID and Client Secret for the EoX API section
  4. Click Next.
  5. (Optional) In the Job Editor, edit the job.
  6. Click Save And Submit.
    The job you have prepared is displayed on the Jobs list page.
  7. Click  to view the Job Details page. 
    The following figure shows the Job Details page for a sample job. The page shows two actions, custom action (Action #1) and external script action (Action #2).

    In the sample job, Action 1# was run on all Cisco devices in the Default realm. The result of this action is board models of devices. If this action fails on any of the devices, then the final job status is shown as Failed. You can click the Status link to check on the device models that were captured and on which the custom action failed. 
    Action #2 shows the results of the external script action. Clicking the link in the Status column displays the transcript where you can see the detailed results, as shown in the following figure:

    The transcript page shows the following information:
    Return Code: Shows a value of 0 if the external script action succeeded and 1 if it failed.
    Output: Provides the total number of models captured of all Cisco devices.
    Errors: Displays errors, warnings and INFO messages. A successful execution of the script might show warnings and INFO messages, which can be ignored.

  8. Upon successful execution of the job, the End of Life column on the Devices page is populated with the EOL dates for the Cisco devices. If a device has multiple boards, the EOL date shown is the earliest EOL date amongst all device board models. The following figure shows the Devices page for the sample job.


  9. (Optional) Use the Device filter to search for the devices which has EOL dates within a specific time period.

Populating EOL data when application server does not have internet connectivity

When application server does not have internet connectivity, it means that Cisco portal is not accessible to the application server. 

Before you begin

Before you begin populating EOL data, ensure that the following prerequisites are met:

  • Install Python version 3.6 or later on a computer which has internet connectivity. 

    Note

    Install 32-bit or 64-bit version of Python depending on the computer where you are installing.

  • Obtain Client ID and Client Secret for the EoX API from the Cisco API Console.

To populate EOL data in an air-gapped environment

  1. Run the custom action: Run the custom action, Get Board Models and their Serial Numbers for Cisco devices on the application server.
  2. Generate XML for BMC Network Automation device board models: To generate the XML, export the dynamic field, Device Board Models on the application server using the import/export utility, as follows:

    export.<bat/sh> -url <applicationServerURL> -user <userName> -password <password> -component DynamicTypes -name "Device Board Models" -file deviceBoardModel.xml

    The deviceBoardModel.xml file is generated in the BCAN_HOME\public\bmc\bca-networks\extras\bcan-import-export-8.9.02\bcan-import-export\bin directory. For information about impoert/export utility, see Exporting and importing components using a script.

  3. Generate Cisco EOL data XML as follows:
    1. Copy the following files from the application server and paste it on the computer which has internet connectivity (Linux/Windows) and Python version 3.6 or later installed.
      • deviceBoardModel.xml that you generated in step 2
      • Python script located in the BCA-Networks-Data\endorsed\eol\generateCiscoEndOfLifeDataForIsolatedBNAServer.py directory
    2. Open the generateCiscoEndOfLifeDataForIsolatedBNAServer.py file with a Python editor, and specify values for the parameters, as shown below:

      CiscoEoxClientID = "<Client ID of Cisco EoX API>"
      CiscoEoxClientSecret = "<Client Secret of Cisco EoX API>"
      inputXMLFileName ="deviceBoardModel.xml”
    3. Save the changes.
    4. Execute the Python script, generateCiscoEndOfLifeDataForIsolatedBNAServer.py.
      The output is an XML file, CiscoEol.xml, generated in the directory from where you ran the Python script.
  4. Populate EOL data on the application server, as follows:
    1. Copy the XML file generated in step 3 and paste it into the BCA-Networks-Data\endorsed directory.

    2. Open the BCA-Networks-Data/endorsed/eol/PopulateEndOfLife file with a text editor, as follows:

      • (Windows) Comment the lines in the PopulateEndOfLife.bat file, as follows:

        REM "%ENA_DATA_DIR%\endorsed\eol\ciscoEolDataQueryForBMC Network AutomationServer.py" %*
        REM set exit_code=%ERRORLEVEL%
        REM if %exit_code% NEQ 0 ( 
        REM    echo Error running python script, return code = %exit_code%
        REM    exit /b %exit_code%
        REM )
      • (Linux) Comment the lines in the PopulateEndOfLife.sh file, as follows:

        #fi
        #python3.6            
        $ENA_DATA_DIR/endorsed/eol/ciscoEolDataQueryForBMC Network AutomationServer.py "$@"
        #EXIT_CODE=$?
        #if [ $EXIT_CODE -ne 0 ]; then
        #echo Error running python script, return code = $EXIT_CODE
        #exit $EXIT_CODE
  5. Run the external script action, Populate Cisco End of Life Date on the application server with the following parameters:

    ParameterDescription
    File Path of End of Life DataPath and name of the file (CiscoEol.xml) in which EOL data is to be stored. Change the default location if required.

    BMC Network Automation Server URL

    Enter the URL of the application server in the following format: https://serverName:portNumber/bca-networks.
    BMC Network Automation Server User NameUser name for the target application server
    BMC Network Automation Server PasswordPassword for the user name
    End of Life Milestone Date NameCisco publishes multiple EOL milestone dates such as, EndOfSaleDate, LastDateOfSupport, and EndOfSWMaintenanceReleases. Specify the one you want to be populated. BMC Network Automation follows that date to populate the EOL date.
    Cisco EoX API Registered Client IDClient ID that you obtained in the Obtaining Client ID and Client Secret for the EoX APIsection
    Cisco EOX API Client SecretClient Secret that you obtained in the Obtaining Client ID and Client Secret for the EoX API section
  6. Upon successful execution of the preceding steps, the End of Life column on the Devices page is populated with the EOL dates for the Cisco devices. If a device has multiple boards, the EOL date shown is the earliest EOL date amongst all device board models. To see the Devices page, navigate to Network > Spans > Devices.
  7. (Optional) Use the Device filter to search for the devices which has EOL dates within a specific time period.

Viewing EOL data using reports

You can generate various reports such as Device Inventory report and Configuration Search report to obtain the list of devices that are reaching their EOL.

To generate the Device Inventory report

  1. Open the Device Inventory Report wizard page by navigating to Reports > Status Reports > Device Inventory.
  2. Under User Assigned Dynamic Fields, select End of Life Date.

  3. Click Filter Devices to display the Device Filter dialog box.

  4. Click the Dynamic Fields tab.

  5. In End of Life Date, specify the date before which if a device EOL occurs that device should appear in the report, and click OK.

  6. Click Next. The Device Inventory report is generated.
    The following figure shows a sample Device Inventory report.


You can also generate the Configuration Search report to view a complete list of board model ID’s of Cisco devices and their EOL dates.

To generate the Configuration Search report

  1. Open the Configuration Search wizard page by navigating to Reports > Search Reports > Configuration Search.
  2. From Configuration, select Other Current or Other Historical
  3. Select Device End of Life from the drop down list. 
  4. If you have chosen Other Historical in the previous step, specify the date before which historical trails need to be considered for generating EOL data.
  5. From Subject, select Pattern.
  6. In Pattern, enter .* as the pattern.
  7. Click Filter Devices to display the Device Filter dialog box.

  8. Click the Dynamic Fields tab.

  9. In End of Life Date, choose the time period before which if a device EOL occurs that device should appear in the report, and click OK.

  10. Click Next. The Configuration Search report is generated.
    The following figure shows a sample report.



Was this page helpful? Yes No Submitting... Thank you

Comments