Copyright (c) 2015 Arista Networks, Inc.  All rights reserved.  Arista
Networks, Inc. Confidential and Proprietary.

This tarball provides a set of python APIs for interacting with the
CloudVision Portal. A simple API example is shown below. You can also reference
the cvptool.py, for a more extensive example of how the API can be used.

$ tar -zxvf CloudVisionPortal-Python-API-1.0.1.tgz 
cvp.py
cvpServices.py
errorCodes.py
README-Python-API.txt
CloudVisionPortal-Python-API-1.0.1.pdf

$ cat example.py
#!/usr/bin/env python
'''Simple example of the CVP python API that logs in to a CVP instance and
count the number of configlets, images, and devices.'''

import cvp

host = 'cvp1'
server = cvp.Cvp( host )
server.authenticate( 'cvpadmin', 'TheQuickBr0wnF0x' )

configlets = server.getConfiglets()
images = server.getImageBundles()
devices = server.getDevices()

print '%s contains - configlets:%d images:%d devices:%d' %  \
   ( host, len( configlets ), len( images ), len( devices ) )

$ ./example.py
cvp1 contains - configlets:66 images:4 devices:48
