Important This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

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, TrueSight 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, TrueSight 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. TrueSight 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 TrueSight 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.

TrueSight 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:

  • (This step is required only for version 8.9.02) 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 (Required only for version 8.9.02)

Click here to see the steps to install Phython
  • (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:
      EOL_PythonPanel1.pngEOL_PythonPanel2.png

    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 TrueSight 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 API console.
  2. Create a user account on the Cisco API console with your Support Contract ID if you do not have one.
  3. On the Cisco API console, click the My Applications tab.
  4. Click Register New Application.
  5. In the Application Details section, enter a name for your application (for example, BNA) and an optional description.
  6. Select Client Credentials as OAuth2.0 Credentials.
  7. In the Select APIs section, select the EOX V5 API check box.
  8. In the Terms of Service section, select the I agree to the terms of service check box.
  9. Click Register.
  10. After the application is registered successfully, click My Applications.
    You should see EoX API entry with Client ID and Client Secret.

    CiscoConsole.png

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 Icon_PrepareJob.png.
  3. Enter information for the following runtime parameters, which are required for the Populate End of Life Date external script action:

    Parameter

    Description

    File Path of End of Life Data

    Path 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 Name

    User name for the target application server

    BMC Network Automation Server Password

    Password for the user name

    End of Life Milestone Date Name

    Cisco publishes multiple EOL milestone dates such as, EndOfSaleDate, LastDateOfSupport, and EndOfSWMaintenanceReleases. Specify the one you want to be populated. TrueSight Network Automation follows that date to populate the EOL date.

    Cisco EoX API Registered Client ID

    Client ID that you obtained in the Obtaining Client ID and Client Secret for the EoX APIsection

    Cisco EOX API Client Secret

    Client Secret that you obtained in the Obtaining Client ID and Client Secret for the EoX APIsection

  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 Icon_View.png 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).
    EOL_JobDetailsReport.png
    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:
    EOL_PopulateAction.png
    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.
    EOL_Devices.png

  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:

  • (This step is required only for version 8.9.02) 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:
    • For version 8.9.02:
      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.
    • For versions 8.9.03 and later:
      1. Copy the following files from the application server and paste it on the computer which has internet connectivity (Linux/Windows):
        • deviceBoardModel.xml that you generated in step 2
        • BCA-Networks\public\bmc\bca-networks\extras\bcan-eol-external-utility-8.9.03.zip
      2. Extract the zip file that you copied in step a.
      3. Run the FetchCiscoEolData.bat script from the command line, as follows:

        FetchCiscoEolData.bat -ciscoClientID "<Cisco_Client_ID>" -ciscoClientSecret "<Cisco_Client_Secret>" -ciscoBoardModelInputFilePath "C:\deviceBoardModel.xml" -eolDataOutputFilePath "C:\EOL\CiscoEoL.xml"

        The output is an XML file, CiscoEol.xml, generated in the directory that you provided in the eolDataOutputFilePath argument.
  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. (This step is required only for version 8.9.02) 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:

    Parameter

    Description

    File Path of End of Life Data

    Path 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 Name

    User name for the target application server

    BMC Network Automation Server Password

    Password for the user name

    End of Life Milestone Date Name

    Cisco 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 ID

    Client ID that you obtained in the Obtaining Client ID and Client Secret for the EoX APIsection

    Cisco EOX API Client Secret

    Client Secret that you obtained in the Obtaining Client ID and Client Secret for the EoX APIsection

  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.

    EOL_DeviceInventoryInputs.png
  3. Click Filter Devices to display the Device Filter dialog box.
  4. Click the Dynamic Fields tab.

    EOL_DeviceFilter.png
  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 to begin the report generation and to display its progress on the Report Activity page. 
    ReportActivity.png
  7. Click Refresh until the report is completed, or wait until you receive the notification email. If the report is aborted, the Progress column indicates so, to alert you that the report data is partial. You can view the partial report, but be aware it is partial. You should refine your selections (if you asked for too-large a report) or re-generate the report (if it was aborted due to a system shutdown) in order to obtain a complete report. Then delete the aborted report as soon as possible. For more information about the Report Activity page, see Viewing-report-activity.
  8. Click the Device Inventory link in the Report column to display the report. 
    DeviceInventoryReport.png

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.
    EOL_ConfigSearchReportInputs.png
  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.
    EOL_ConfigSearchDeviceFilter.png
  10. Click Next to begin the report generation and to display its progress on the Report Activity page.
  11. Click Refresh until the report is completed, or wait until you receive the notification email. If the report is aborted, the Progress column indicates so, to alert you that the report data is partial. You can view the partial report, but be aware it is partial. You should refine your selections (if you asked for too-large a report) or re-generate the report (if it was aborted due to a system shutdown) in order to obtain a complete report. Then delete the aborted report as soon as possible. For more information about the Report Activity page, see Viewing-report-activity.
  12. Click the Configuration Search link in the Report column to display the report. 
    The following figure shows a sample report.
    EOL_ConfigSearchReport.png

.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*