cancel
Showing results for 
Search instead for 
Did you mean: 

Import Devices Into XMC

Import Devices Into XMC

Anonymous
Not applicable

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.

1 ACCEPTED SOLUTION

Anonymous
Not applicable

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.

 

View solution in original post

9 REPLIES 9

Anonymous
Not applicable

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:

4b48afe9171c492bb08ebb741b149fa7_7a61cb7c-1c24-4234-883f-cb770d53c869.png

Which I got the following error:

4b48afe9171c492bb08ebb741b149fa7_81bded45-df55-40ad-8cb4-381614a434a0.png

This was due to the space in the URL string in <Ping Only>, replacing the space with a %20 got past that issue

4b48afe9171c492bb08ebb741b149fa7_e271a48e-518f-4f2a-b3fc-1820879239c8.png

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:

4b48afe9171c492bb08ebb741b149fa7_89fb38aa-88a1-4e98-93c3-249fb23c5276.png

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:

4b48afe9171c492bb08ebb741b149fa7_716880bb-b18d-4960-8b48-4a054511cc43.png

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

Anonymous
Not applicable

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

OscarK
Extreme Employee

Go to Connect on XMC, then services api, there you will find some examples.

 

Anonymous
Not applicable

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:

d0c432a8777c4345b462f16cdd83d31b_6d6e28af-3aab-48d1-a06b-41b696aa7fee.png

Which take’s me to GraphiQL

d0c432a8777c4345b462f16cdd83d31b_cec5af40-a464-4b82-8bf9-1440a00307c9.png

 

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:

https://emc.extremenetworks.com/content/oneview/docs/connect/docs/netsight_device_web_service/ov_con...

Specifically this method:

Method: addDeviceEx

https://emc.extremenetworks.com/content/oneview/docs/connect/docs/netsight_device_web_service/ov_con...

The example provided is as follows:

https://192.168.30.34:8443/axis/services/NetSightDeviceWebService/addDeviceEx?ipAddress=192.168.10.2...

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

Method: getAllDevices

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:

d0c432a8777c4345b462f16cdd83d31b_1f132400-308a-4d0d-91bb-25aed18b99f8.png

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.

 

OscarK
Extreme Employee

Probably using the rest api.

/services/device/create/{ipAddress}/{nickName} Create a device

Script it to insert IP’s from a file.

 

/oscar

GTM-P2G8KFN