Delete Device (Python code sample)
Problem this snippet solves:
This Python client code sample uses Enterprise Manager's device inventory to delete a list of devices managed by the referenced Enterprise Manager.
Code :
#!/usr/bin/python import sys import pycontrol.pycontrol as pc MIN_ARGS = 4 USAGE = "Management_EM_delete_devicesMem_username> Mem_password> [ ] ..." if len(sys.argv) < MIN_ARGS: print "Usage %s" % USAGE sys.exit() em_address = sys.argv[1] em_username = sys.argv[2] em_password = sys.argv[3] device_addresses = sys.argv[4:] ic = pc.BIGIP( hostname = em_address, username = em_username, password = em_password, fromurl = True, wsdls = ['Management.EM']) ic.Management.EM.delete_devices(device_addresses) print "Device(s) deleted."
Published Mar 09, 2015
Version 1.0CodeCentral_194
Cirrus
Joined May 05, 2019
CodeCentral_194
Cirrus
Joined May 05, 2019
No CommentsBe the first to comment