cancel
Showing results for 
Search instead for 
Did you mean: 

XMC: Add Bulk IP addresses to device list

XMC: Add Bulk IP addresses to device list

Terry_Butts
New Contributor

I have 500+ devices to add to XMC that need to be pre-added.

Is there a way to do this?

4 REPLIES 4

Markus_Nikulski
Extreme Employee

Hi Terry,

we do have a Northbound Interface (NBI) where you can add devices. This interface id good for scripting. You may use my Python class I made XMC_NBI . They is a example to get_all_device. But to add device you have create the own NBI call like this

 

mutation {
  network {
    createDevices(
      input: {devices: {
        ipAddress: "1.2.3.4",
        siteLocation: "/World/CTC/Reading",
        profileName: "snmp_v3_profile"
      }
      }) {
      status
      message
    }
  }
}
 

Thx
markus

I tried to use a query like this but it seems to be totally broken.

It says "SUCCESS" but nothing appears in XIQ-SE.

If I try to add it again it tells me it already exists.

When I try to delete it (using NBI) it tells me SUCCESS, no matter how many times I run the deletion.

But when I try to add it again it still tells me it already exists...

Just wanted to let y'all know that this was a permissions issue.

For some reason, it isn't enough to give API user permissions to NBI. It appears you have to include permissions for "XIQ-SE OneView" in the corresponding authorization group. Even though NBI is the only thing you're using.

Miguel-Angel_RO
Valued Contributor II

Hi Terry,

Connect API’s should do the trick:

2d98c437083f45a582873a60fca06c90_76da8c7b-e5d8-438e-b57b-edb08cd9cef1.png

Mig

GTM-P2G8KFN