cancel
Showing results for 
Search instead for 
Did you mean: 

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_devices  Mem_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."
Version history
Last update:
‎09-Mar-2015 13:25
Updated by:
Contributors