CodeShare
Have some code. Share some code.
cancel
Showing results for 
Search instead for 
Did you mean: 

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()
Version history
Last update:
‎09-Mar-2015 13:24
Updated by:
Contributors