cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
806
Views
0
Helpful
4
Replies

Referential of products/version

florentodievre
Level 1
Level 1

Hello,
We have more than a hundred switches (most of them are Cisco). We monitor them with Orion.
I want to display the switches whose version is not up to date.
I'm looking for a way to check this (automatically (script)) using a list of products with their recommended version (flat list, API, etc.).
I can't find a solution. Can you help me? Did you have this need?
Thanks in advance.
Florent

1 Accepted Solution

Accepted Solutions

I got you - Customers with Smart Net Total Care (SNTC) and Partners (PSS) can access the support API. API https://developer.cisco.com/docs/support-apis/#!software-suggestion 

https://developer.cisco.com/docs/support-apis/#!getting-started-with-cisco-support-apis-for-pss/overviewhttps://community.cisco.com/t5/partner-support-service/ct-p/5456-partner-support-service

Click > Request access to PSS APIs and the API Console

Send email to TAC.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

4 Replies 4

There is couple of ways of doing this and few libraries in python or Ansible. I am loading the switches IP in via a text file, but there is no reason 

 

 

import netmiko
from textfsm import TextFSM

with open('Devices.txt') as switches:
  for IP in switches:
    Switch = {
      'device_type': 'cisco_ios',
      'ip': IP,
      'username': 'user',
      'password': 'password'
    }

    netconnect = ConnectHandler(**Switch)
    print('-' * 79)
    output = netconnect.send_command('show version', use_textfsm=True)
    for i in output:
      if i['software_version'] < '11.3(6)':
        print(i['hostname'], i['software_version'])
    print()
    print('-' * 79)

netconnect.disconnect()

 

 

This line checks to see if the software version is less than 11.3(6). If the software version is less than 11.3(6), then the code will enter the if block.

 

if i['software_version'] < '11.3(6)':

 

But that said, if all your devices are in Orion, look at their SDK for Python. This project contains a python client for interacting with the SolarWinds Orion API https://github.com/solarwinds/orionsdk-python, then you are just sending a request to one device and parsing the information in the same way. There is an example here which would fetch all the nodes, https://github.com/solarwinds/orionsdk-python/blob/master/samples/query.py you should be able to use this and parse the information based on switch and version.

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks, but I have no problem accessing Orion's data. I can do it in SQL, API, PowerShell (usually I do it in SQL).
I have the list of nodes with their model and version.
But what I don't have are the recommended versions for each model.
I know that for some models a recent version number is not applicable, while for others it is.
I'd need an (up-to-date) data source to which my script could refer.
I could then cross-reference the Orion data to display the nodes that need updating.

Florent

I got you - Customers with Smart Net Total Care (SNTC) and Partners (PSS) can access the support API. API https://developer.cisco.com/docs/support-apis/#!software-suggestion 

https://developer.cisco.com/docs/support-apis/#!getting-started-with-cisco-support-apis-for-pss/overviewhttps://community.cisco.com/t5/partner-support-service/ct-p/5456-partner-support-service

Click > Request access to PSS APIs and the API Console

Send email to TAC.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thank you, that is indeed the solution. I'll find out if my customer or his supplier has access to this API.
Regards, Florent