Skip to content

Make datumctl inventory plugin type-aware for the property-graph model (Node/Edge) #9

Description

@ecv

Summary

Make the datumctl inventory plugin type-aware so it can render and operate on the property-graph model (typed Node + Edge with attribute bags) proposed in milo-os/inventory#43 and prototyped in milo-os/inventory#44.

Motivation

The graph model collapses the ~13 NetBox-inspired CRDs into two generic kinds (Node, Edge). That trades away per-kind CRD ergonomics:

  • Print columns. Today kubectl get site shows typed columns (Region, Type, …). One generic Node CRD can only expose type + attribute-blob columns — kubectl get node.graph loses the per-kind view.
  • Discoverability. Operators browse inventory by asset class (sites, racks, hosts). A flat node list keyed by spec.type is hard to scan without client-side grouping.

A type-aware datumctl plugin recovers this UX client-side: it reads the NodeType/EdgeType schema registry and renders per-type tables, filters, and validation hints without needing N CRDs.

Scope

  • Read NodeType/EdgeType to learn each type's attribute keys + value types.
  • datumctl inventory get <type> — list Nodes of a given spec.type with attribute-derived columns (e.g. get site shows displayName/siteType pulled from attributes).
  • datumctl inventory get edges --type=located-in [--from=… --to=…] — list/filter edges.
  • Graph traversal helpers (e.g. inventory neighbors <node>, follow located-in/member-of).
  • Reuse / extend the apply path from Native datumctl inventory apply to replace bin/load-inventory #2 (native datumctl inventory apply) for the graph kinds.

Dependencies / references

Blocked on the graph model landing (or being installable side-by-side, as the prototype is under group graph.inventory.miloapis.com).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions