Client access to inventory entities

Registered by Chris Spencer

The python and command line clients should have the ability to work with inventory entities:
projects, regions, cells, devices, hosts, and labels.

Whiteboard

We need to develop a robust Python client API to support the following:

- Craton tasks running on workers, so that such tasks can fully use core capabilities (as limited by RBAC) to get and publish information, especially variables about devices/hosts
- Horizon dashboards
- Operators who prefer this to the CLI
- Analysis tooling, such as querying the inventory fabric for audits to support stories like FLT001 or FLT005.

github3py_ is one possible starting point for this Python API. Interaction with the client API might look as follows:

.. code-block:: python

   from cratonclient.v1 import make_session, inventory

   session = make_session(...) # can also use CRATON_* env vars
   cell = inventory.Cell(session).get('cell-1')
   for host in cell.hosts():
       print host.resolved['some-variable-key']

.. _github3py: https://github3.readthedocs.io/

(?)

Work Items

Work items:
Implement region-list for CLI: TODO
Implement region-list for python: TODO
Unit test region-list: TODO
[christopher-m-spencer] Implement region-create for CLI: DONE
[christopher-m-spencer] Implement region-create for python: DONE
[christopher-m-spencer] Unit test region-create: DONE
[christopher-m-spencer] Implement region-delete for CLI: DONE
[christopher-m-spencer] Implement region-delete for python: DONE
[christopher-m-spencer] Unit test region-delete: DONE
[christopher-m-spencer] Implement region-update for CLI: DONE
[christopher-m-spencer] Implement region-update for python: DONE
[christopher-m-spencer] Unit test region-update: DONE
[christopher-m-spencer] Implement region-show for CLI: DONE
[christopher-m-spencer] Implement region-show for python: DONE
[christopher-m-spencer] Unit test region-show: DONE
[christopher-m-spencer] Implement cell-list for CLI: DONE
[christopher-m-spencer] Implement cell-list for python: DONE
[christopher-m-spencer] Unit test cell-list: DONE
[christopher-m-spencer] Implement cell-create for CLI: DONE
[christopher-m-spencer] Implement cell-create for python: DONE
[christopher-m-spencer] Unit test cell-create: DONE
[christopher-m-spencer] Implement cell-delete for CLI: DONE
[christopher-m-spencer] Implement cell-delete for python: DONE
[christopher-m-spencer] Unit test cell-delete: DONE
[christopher-m-spencer] Implement cell-update for CLI: DONE
[christopher-m-spencer] Implement cell-update for python: DONE
[christopher-m-spencer] Unit test cell-update: DONE
[christopher-m-spencer] Implement cell-show for CLI: DONE
[christopher-m-spencer] Implement cell-show for python: DONE
[christopher-m-spencer] Unit test cell-show: DONE
Implement device-list for CLI: TODO
Implement device-list for python: TODO
Unit test device-list: TODO
Implement device-create for CLI: TODO
Implement device-create for python: TODO
Unit test device-create: TODO
Implement device-delete for CLI: TODO
Implement device-delete for python: TODO
Unit test device-delete: TODO
Implement device-update for CLI: TODO
Implement device-update for python: TODO
Unit test device-update: TODO
Implement device-show for CLI: TODO
Implement device-show for python: TODO
Unit test device-show: TODO
[christopher-m-spencer] Implement host-list for CLI: DONE
[icordasc] Implement host-list for python: DONE
[christopher-m-spencer] Unit test host-list: DONE
[christopher-m-spencer] Implement host-create for CLI: DONE
[christopher-m-spencer] Implement host-create for python: DONE
[christopher-m-spencer] Unit test host-create: DONE
[christopher-m-spencer] Implement host-delete for CLI: DONE
[christopher-m-spencer] Implement host-delete for python: DONE
[christopher-m-spencer] Unit test host-delete: DONE
[christopher-m-spencer] Implement host-update for CLI: DONE
[christopher-m-spencer] Implement host-update for python: DONE
[christopher-m-spencer] Unit test host-update: DONE
[christopher-m-spencer] Implement host-show for CLI: DONE
[christopher-m-spencer] Implement host-show for python: DONE
[christopher-m-spencer] Unit test host-show: DONE
[christopher-m-spencer] Implement user-list for CLI: TODO
[christopher-m-spencer] Implement user-list for python: TODO
[christopher-m-spencer] Unit test user-list: TODO
Implement variable-create: TODO
Implement variable-list: TODO
Implement variable-update: TODO
Implement variable-show: TODO
Implement variable-delete: TODO

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.