Skip to main content

Configuration manager for network devices

Project description

Homer allows to manage the lifecycle of the configuration for network devices, generating and deploying their configuration.

The configuration generation is based on YAML files to define variables and Jinja2 templates. The YAML files allow for hierarchical override of variables based on the device role, site or hostname. Once generated, the configuration can be deployed to the selected devices.

The device list can either live hardcoded in the configuration files or be dynamically gathered from Netbox. When using Netbox as inventory both the Virtual Chassis endpoint and the Device endpoint are used to select all the devices that matches the configured whitelist of device roles and statuses.

Also when using Netbox as inventory for each device additional metadata is exposed to the templates, namely:

  • role: device role slug

  • site: device site slug

  • type: device type slug

  • ip4: primary IPv4 without netmask

  • ip6: primary IPv6 without netmask

  • netbox_object: the Netbox device object. Directly exposed data should always be preferred in templates. It is exposed to not be a blocker in case some additional data is needed that is not yet exposed by Homer explicitely. It could be removed in a future release.

If any metadata is present in the YAML inventory file when using Netbox as inventory, this additional metadata ie exposed too to the templates, with the Netbox values having precedence in case of overlapping keys.

When using Netbox to gather dynamic configuration, it’s also possible to write a custom plugin in the form of a Python module that implements a class called NetboxDeviceDataPlugin that inherits from homer.netbox.BaseNetboxDeviceData and is in the Python PATH. Assuming that the plugin class implements a method named _get_name, it will be accessible within the templates with netbox.device_plugin.name.

Homer can use GraphQL to fetch Netbox data. For that, store your query in the basepath/public/graphql directory. And reference it using _gql_execute(filename, variables).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homer-0.11.0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homer-0.11.0-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file homer-0.11.0.tar.gz.

File metadata

  • Download URL: homer-0.11.0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for homer-0.11.0.tar.gz
Algorithm Hash digest
SHA256 33ee248d68fd8fe6e0dc0dfd7d582bd28405c179b6630b837f99b988731d8e65
MD5 f086d1e4bb224878c441563875cf87e9
BLAKE2b-256 6c6d8498c7abb15adb94235d0178e2efd24b89461be08a508f8df6c3ccd7201e

See more details on using hashes here.

File details

Details for the file homer-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: homer-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for homer-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5aa6b811593a8c9a7d5d45773434746848adfcc47cd9a5181bdeff2f74abd02
MD5 b3d9d31ae5bc96d805ade7a18d365906
BLAKE2b-256 5cf2fbb72af1c622580d631b46e8093381f845b9e6efb3595940ef18643af268

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page