Community

Zenoss Newsletter

Mass Adding Locations using zendmd

by Jim Shank last modified 2008-04-11 12:45PM

Adding locations using zendmd

If you have a large number of locations to add it can be far more efficient to add them through the zendmd command line interface. Here is an example:

locations = "Denver,New York,London,Moab".split(',')
for name in locations:
   dmd.getDmdRoot("Locations").createOrganizer(name)
commit()


Special thanks to Chet Luther for his post that started me on the right path and ZDeviceLoader.py which gave me the syntax to add a location.

AddThis Social Bookmark Button
Document Actions