Skip to main content

Crate nornir_rs

Crate nornir_rs 

Source
Expand description

Core types for describing Kore inventory models and transports.

This crate is intentionally opinionated: every public structure mirrors the flat data that Nornir (Python) consumes, so loaders, CLIs, and programmatic callers can stitch together inventories without juggling bespoke schemas. Whether the inventory originates from TOML files, HTTP APIs, or an adhoc in-memory fixture, the goal is the same—normalize data into these structs, merge them, and let higher layers run tasks with minimal ceremony.

The types in this module power both the CLI binary shipped in this repo and any downstream applications that want to embed Kore as a library.

Modules§

builder
Builder abstractions that mirror the CLI task tree.
cli
Command-line interface definitions shared by the kore binary and tests.
collections
Device collections and registry scaffolding.
config
Shared configuration helpers: capture/store, tree parsing, diffing, and policy evaluation.
devices
Collections of CLI/HTTP profiles describing platform-specific behavior.
filter
Inventory filter parsing and evaluation helpers.
getters
Shared getter scaffolding.
inventory
Configuration loading and inventory source plumbing.
nornir
High-level executor that wires inventories, filters, and tasks together.
pipeline
Pipeline runner that chains multiple tasks with shared selectors/context.
render
Shared rendering helpers (output settings, inline expressions, context builders).
sdk
High-level SDK facade for embedding the Kore runner.
secrets
Secrets providers and helpers for resolving credential references.
tasks
Task implementations invoked by the registry/runner.
textfsm
TextFSM template loader and evaluator.
transport
Transport abstractions used by the task runner to interact with devices.
util
Internal helpers such as environment interpolation and token parsing.
vars
Host/group variable loading and merge strategies.
vault
Vault-compatible helpers for encrypting and decrypting data.

Structs§

CompositeFileInventorySource
Loads hosts/groups/defaults from separate files and merges them.
ConfigStoreOverride
Per-host overrides when capturing configuration files (command, suffix, etc.).
Credentials
Authentication material shared by hosts, groups, and defaults.
Defaults
Global fallbacks applied to every host after groups inherit.
FileInventorySource
Reads inventory data from a file path.
Group
Collection of hosts that share credentials, connection tuning, or metadata.
Host
Canonical representation of a network endpoint.
HttpInventorySource
Fetches inventory data from an HTTP endpoint.
Inventory
A fully materialized view of the network inventory.
InventoryBuilder
Builder that merges multiple inventory sources.
NautobotInventoryConfig
Configuration consumed by the Nautobot inventory source.
NautobotInventorySource
Inventory source that pulls devices/VMs from Nautobot’s REST API.
NetboxInventoryConfig
Configuration consumed by the NetBox inventory source.
NetboxInventorySource
Inventory source backed by NetBox’s REST API.
Secret
Basic representation of sensitive text.
SecretReference
StaticInventorySource
In-memory helper useful for tests, fixtures, and doc examples.
TransportSettings
Transport-specific configuration.

Enums§

CliMode
CLI session mode requested by the task runner.
InventoryError
Errors raised by inventory loaders and builders.
InventoryFormat
Supported file formats when loading from disk or HTTP.

Traits§

InventorySource
Unified interface for inventory data sources.

Type Aliases§

GroupMap
Groups keyed by name with deterministic iteration order.
HostMap
Hosts keyed by name with deterministic iteration order.
OrderedMap
Order-preserving map used for host/group inventories.
Variables
Generic key/value bag for metadata and user-defined variables.