Script Set Manual Interface Speed

From Observer GigaFlow Support | VIAVI Solutions Inc.
Jump to: navigation, search
var rosutils = Java.type('ros.CROSUtils');
var devIP = "172.21.40.254";
var thisDevice = actions.getDevice(devIP);
var anint = thisDevice.interfaces.get(ifIndex)
var c= anint.getClass()
var m = c.getDeclaredField("manualspeed")
m.setAccessible(true);
anint.manualspeed=true;
anint.setIfSpeedIn(downSpeed,false);
anint.setIfSpeedOut(upSpeed,false);
anint.save(1)