Files
python-cratonclient/doc/source/usage/supported-apis.rst
Ian Cordasco 75c3531c43 Add user documentation for the Python API
Most of the copy is duplicated except for the places where it matters.
This allows for any page of this documentation to be page one. If
someone only cares about using hosts first, they can go directly there
and start listing hosts, creating them, etc. without much other
prompting.

Change-Id: Id621947af5d4c3ca53af24904f5f16d3d88bc8b8
2017-03-17 12:57:17 -05:00

672 B

Communicating with Craton

Now that you've configured your authentication method, you can interact with your craton object like so:

for region in craton.regions.list():
    print('Region {} contains:'.format(region.name))
    for host in craton.hosts.list(region_id=region.id):
        print('    {}'.format(host.name))

The Craton API has the following resources:

  • Cells
  • Clouds
  • Devices
  • Hosts
  • Network Devices
  • Network Interfaces
  • Networks
  • Projects
  • Regions
  • Users

Of these:

  • Cells
  • Clouds
  • Hosts
  • Projects
  • Regions

Are implemented.