Difference between revisions of "ZenDMD Tip - Change Interface Speed"

From Zenoss Wiki
Jump to: navigation, search
(create page, helpful zendmd script)
 
Line 13: Line 13:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
Don't forget to lock the interface from updates, or once it's remodeled the change will be lost!
  
 
http://hydruid-blog.com/?p=675
 
http://hydruid-blog.com/?p=675

Revision as of 20:44, 7 January 2014

The following is a zendmd script to set the speed for an interface of a device.

Sometimes after a device is modeled the interface speed can be incorrect.

d = dmd.Devices.findDevice('xensvr02')
for dev in d.Devices.getSubDevices():
    value = d.getProperty(dev)
    for interface in d.os.interfaces():
        if interface.id.startswith('xenbr4'):
            interface.speed = ('1000000000')
            commit ()

Don't forget to lock the interface from updates, or once it's remodeled the change will be lost!

http://hydruid-blog.com/?p=675