Nmstate

A Declarative API for Host Network Management

View on GitHub

Introduction

Nmpolicy is an expressions driven declarative API for dynamic network configuration.

Nmpolicy contains two sections:

Using nmpolicy allows user to generate desired state base on current network state.

Example YAML for changing gateway interface MTU to 1280.

capture:
  gw: routes.running.destination=="0.0.0.0/0"
  gw-iface: interfaces.name==capture.gw.routes.running.0.next-hop-interface
desired:
  interfaces:
  - name: ""
    type: ethernet
    state: up
    mtu: 1280

You may applying this YAML directly through nmstatectl apply or use nmstatectl policy to generate desired state without apply.

Documentation