For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Retrieve platform version using iControl Proxy (Python code sample)

Problem this snippet solves:

This Python client code sample uses the iControl Proxy to retrieve the platform version for each device managed by the referenced Enterprise Manager.

Code :

# Get foo.
foo = ic.Management.EM.get_foo()

# Iterate through foo.
for foo in foos:
    LOG.info('Found: %s', foo)

else:
    LOG.error('No foo found.')
    sys.exit()

# Get bar ID.
bar_id = ic.Management.EM.get_bar_id()

# Append bar ID to iControl URI.
ic.query = {'bar_id': bar_id}

# Set foo context.
ic.Management.bar.set_foo_context(ip_address=foo)

# Get sprocket version from foo.
print ic.System.SystemInfo.get_version()
Published Mar 09, 2015
Version 1.0
No CommentsBe the first to comment