Client access to inventory entities
The python and command line clients should have the ability to work with inventory entities:
projects, regions, cells, devices, hosts, and labels.
Blueprint information
- Status:
- Not started
- Approver:
- Chris Spencer
- Priority:
- Undefined
- Drafter:
- Chris Spencer
- Direction:
- Needs approval
- Assignee:
- Chris Spencer
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Bug #1607843: Allow hosts to be created in clients | Fix Released |
Bug #1607851: Allow hosts to be deleted in clients | Fix Released |
Bug #1611418: Allow regions to be created in clients | Fix Committed |
Bug #1611419: Allow hosts to be updated in clients | Fix Released |
Bug #1611420: Allow hosts to be shown in clients | Fix Released |
Bug #1613339: Allow regions to be deleted in clients | Fix Committed |
Bug #1613344: Allow regions to be shown in clients | Fix Committed |
Bug #1613345: Allow regions to be updated in clients | Fix Committed |
Bug #1613346: Allow cells to be created in clients | Fix Committed |
Bug #1613347: Allow cells to be deleted in clients | Fix Committed |
Bug #1613349: Allow cells to be updated in clients | Fix Committed |
Bug #1613350: Allow cells to be shown/listed in clients | Fix Committed |
Bug #1614765: Allow regions to be listed in clients | Fix Released |
Bug #1625690: Allow crud access to devices in clients | New |
Bug #1628248: Allow crud access to users in clients | In Progress |
Sprints
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.
for host in cell.hosts():
print host.resolved[
.. _github3py: https:/
Work Items
Work items:
Implement region-list for CLI: TODO
Implement region-list for python: TODO
Unit test region-list: TODO
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
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-
[icordasc] Implement host-list for python: DONE
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
[christopher-
Implement variable-create: TODO
Implement variable-list: TODO
Implement variable-update: TODO
Implement variable-show: TODO
Implement variable-delete: TODO