Python Example of Retrieving a List of All Content Libraries

This example is based on the code in the library_crud.py sample file.

This example uses the steps that are described in Listing All Content Libraries.

Note: For a complete and up-to-date version of the sample code, see the vSphere Automation SDK Python samples at GitHub.
...
 
library_stub = content_client.Library(my_stub_config)
libraries = library_stub.list()
print(’List of all library identifiers:’)
for library_id in library_ids :
  library = library_stub.get(library_id)
  print(’Library ID {}: {}’.format(library_id, library.name))