03-03-2021 10:25 AM
Hi,
Have several hundred none Extreme devices I need to add into XMC that are generally unique IP address, under ping only, probably will configure each as out of service as monitoring them is not important.
Obviously only being able to add these in one at a time would be a considerable amount of work. The discovery options (that I can see) wouldn’t work for me as putting in subnet ranges for these would equally be as time consuming, even if I was able to use SNMP (could use seed, but not an option) and besides there not being a ping option anyway, if there was, it would pick up more then just the switches.
The primary reason for adding the switches is just to add them into control as RADIUS clients, as management login for all these switches is being done through XMC / ExtremeControl.
Thought there was a way, maybe more in the legacy (although can’t find it) that allows me to import devices, but been unable to find it?
Currently running latest version 8.5.5.32.
Many thanks in advance for any ideas.
Solved! Go to Solution.
03-19-2021 12:01 PM
Just see this:
https://github.com/extremenetworks/ExtremeScripting/tree/master/Netsight/oneview_workflows
There is a workflow listed called Import Devices
This looks like exactly what was needed, so putting here for anyone else whom might come across the same query.
03-03-2021 02:16 PM
I’ve got as far as the following.
I need to spend more time with workflows (do cutting a few corners), so I’m cheating and trying to run a python script straight from my PC
I created the following:
Which I got the following error:
This was due to the space in the URL string in <Ping Only>, replacing the space with a %20 got past that issue
Then I got another issue:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)
So to get around that using the example below:
Now I get this error:
urllib.error.HTTPError: HTTP Error 400: Bad Request
Yet if I take the URL as is, replace the %20 back for a space:
So not sure what's causing that Bad Request at the moment, maybe not the right call in the script?
Anyway, just posting for ideas
Thanks
03-03-2021 12:11 PM
Ah, that's where it is. Thanks Oscar.
Did add another post about a different method I used whilst I was trying to find my feet on the API. It went to moderator, so should hopefully show soon.
Will have a look at the services API now.
Cheers
03-03-2021 11:47 AM
Go to Connect on XMC, then services api, there you will find some examples.
03-03-2021 11:40 AM
Thanks Oscar.
That’s helped me, not that I maybe doing in best way but given me something to work with.
Was trying to dig up some material about putting some context around using REST API calls, but couldn’t find anything quickly.
Initially I went to the following URL:
https://<ip address>:8443/Clients/nbi/graphiql/index.html
Via the ‘NBI Explorer’ link in XMC shown below:
Which take’s me to GraphiQL
I was trying to find something in there that lead me to something along the lines of the URL you provided, via the Documentation Explorer on the top right
/services/device/create/{ipAddress}/{nickName}
Instead I come across this:
Specifically this method:
The example provided is as follows:
So I initially wasn’t sure how to convert this into the exact line I needed, so I initially run a query using this method
Here is the example:
https://192.168.30.34:8443/axis/services/NetSightDeviceWebService/getAllDevices
I then looked at an entry I already had in XMC for ping only:
And then used that information in that to formulate the string, which now looked like:
https://<enter ip address>:8443/axis/services/NetSightDeviceWebService/addDeviceEx?ipAddress=xx.xx.xx.xx&profileName=<Ping Only>&snmpContext=&nickName=Switch1
After running that it added it into XMC perfectly!
So maybe not the same way you mentioned but think I can adapt that do what I need on mass, with a workflow. What I will work on next and post back when done.
03-03-2021 10:34 AM
Probably using the rest api.
/services/device/create/{ipAddress}/{nickName} Create a device
Script it to insert IP’s from a file.
/oscar