Script to Delete Devices

From Observer GigaFlow Support | VIAVI Solutions Inc.
Revision as of 11:10, 21 May 2021 by Kevin Wilkie (Talk | contribs)

Jump to: navigation, search
var devices=[
"10.171.255.179","10.130.255.187","10.171.255.177","10.170.255.179","10.130.255.183"
]
for(var i in devices){

var thisDevice = actions.getDevice(devices[i]); if (thisDevice!=null){ var c= thisDevice.getClass()

       var m = c.getDeclaredMethod("remove")
       m.setAccessible(true);
       log.warn(m)
       m.invoke(thisDevice)
   	log.warn("Removing "+devices[i]);
   }else{
   	log.warn("Not Removing "+devices[i]);
   }
}