nmstate
Project description
We are nmstate!
A declarative network manager API for hosts.
What is it?
NMState is a library with an accompanying command line tool that manages host networking settings in a declarative manner. The networking state is described by a pre-defined schema. Reporting of current state and changes to it (desired state) both conform to the schema.
NMState is aimed to satisfy enterprise needs to manage host networking through a northbound declarative API and multi provider support on the southbound. NetworkManager acts as the main (and currently the only) provider supported.
Development Environment
Install:
pip install tox pbr
Run Unit Tests:
tox
Runtime Environment
Install (from sources) system-wide:
sudo pip install --upgrade .
Install just for the local user:
pip install --user --upgrade .
Make sure that ~/.local/bin
is in your PATH when installing as a local user.
The export
command can be used to add it for the current session:
export PATH="${HOME}/.local/bin:${PATH}"
Basic Operations
Show current state:
nmstatectl show
Change to desired state:
nmstatectl set desired-state.json
nmstatectl
will also read from stdin when no file is specified:
nmstatectl set < desired-state.json
Desired/Current state example:
{
"interfaces": [
{
"ipv4": {
"addresses": [
{
"ip": "192.168.122.1",
"prefix-length": 24
}
],
"enabled": true
},
"name": "eth0",
"state": "up",
"type": "ethernet"
}
]
}
The state is also supported as YAML, to get the current state in YAML format:
nmstatectl show --yaml
The set
command accepts both YAML and JSON.
Supported Interfaces:
- bond
- dummy
- ethernet
- ovs-bridge
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nmstate-0.0.1.dev79-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b7df69c706412ee7aeea21945481517f2579e4879650be68cc8acc1ea1c0de8 |
|
MD5 | ac9c92e2f254d206b63c34f8779aabca |
|
BLAKE2b-256 | 27e11e5248587e24eeac63356beb2af2f381cdba8fefb3f621a2538a4d181b3c |