Programming in zendmd, an interactive shell
We can use zendmd
to test our python statements and to access the methods and attributes available to us from Zenoss Core. From zendmd
, we can write and test Python statements that manipulate the attributes of the devices:
You can use zendmd
as a way to:
Test event transformations
Mass update device properties from a command line
Test programming expressions when writing plugins or zenpacks
This section introduces the environment and provides some basic commands to get us started.
To start the zendmd
shell, you'll need to run the following command as the zenoss user:
zendmd
The Zenoss dmd
command shell opens and displays with a >>>
prompt. Enter the following statements at the shell (exclude the commented text that begins with #):
zhelp() # Display a list of objects pprint(dir(dmd)) # Display methods available to dmd object dir(devices) # Display methods available to devices object find('Coyote') # Find the device by name...