Package ncdiff is a simplified version of yang.ncdiff
. Both were initially
developed internally in Cisco and is now available to the general public through
open-source. yang.ncdiff
is integrated into the modular architecture of pyATS
framework, while ncdiff
is more lightweight and standalone.
Docs: https://ncdiff.readthedocs.io/en/latest/
GitHub: https://github.com/CiscoTestAutomation/ncdiff/
Configuration is a major goal of NetConf. RFC 6241 claims "NETCONF defined in
this document provides mechanisms to install, manipulate, and delete the
configuration of network devices."
Each YANG model tries to abstract one aspect of configuration by a hierarchical
schema. There might be a model to describe OSPF configuration, and another
model to describe BGP configuration, etc.
For one model, there are many different possible configurations. Each
configuration might be considered as a state, and it can be obtained by a
get-config request. Between two states, there are two directional transitions:
from state A to state B, and from state B to state A. Each transition
corresponds to an edit-config RPC.
Primarily, there are three classes defined in this module: ModelDevice, Config
and ConfigDelta.
Quick examples can be found in section Tutorial.
Summary of config operations:
============= ========= ============= ========= ============= ==============================
operand operator operand equality result note
============= ========= ============= ========= ============= ==============================
Config \+ Config = Config Combine two config
Config \+ ConfigDelta = Config Apply edit-config to a config
ConfigDelta \+ ConfigDelta = N/A Not implemented
ConfigDelta \+ Config = Config Apply edit-config to a config
Config \- Config = ConfigDelta Generate an edit-config
Config \- ConfigDelta = Config Apply an opposite edit-config
ConfigDelta \- ConfigDelta = N/A Not implemented
ConfigDelta \- Config = N/A Not implemented
============= ========= ============= ========= ============= ==============================
ncdiff module requires a few packages. Some of them are required implicitly:
Others are required directly:
Installation of these packages are normally smooth. Based on our support
experience, most issues are related to lxml and paramiko installation.
This package can be installed from pypi server.
First-time installation steps:
pip install ncdiff
Steps to upgrade to latest:
pip install --upgrade ncdiff
Owner
Contributors
Categories
NetworkingProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community