Skip to content

Instantly share code, notes, and snippets.

@hackeys
hackeys / BulkDevicesAdd.py
Created August 28, 2013 16:53
AddingBulkDevices
#!/usr/bin/env python
#
# Use the Zenoss JSON API to add a list of hosts
#
import re, string
import getopt, sys
import os, pwd
import time
import urllib
@hackeys
hackeys / BulkDeviceDeletion.py
Created August 28, 2013 16:21
Zenoss Contents
#!/usr/bin/env python
# import the stuff that zendmd needs and create the dmd context
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
from transaction import commit
dmd = ZenScriptBase(connect=True, noopts=True).dmd
# import the stuff that zep needs
from Products.Zuul import getFacade, listFacades