ncdiff.ModelDownloader class

class ncdiff.ModelDownloader(nc_device, folder)[source]

Bases: object

Abstraction of a Netconf schema downloader.

device

Model name.

Type:ModelDevice
dir_yang

Path to yang files.

Type:str
yang_capabilities

Path to capabilities.txt file in the folder of yang files.

Type:str
need_download

True if the content of capabilities.txt file disagrees with device capabilities exchange. False otherwise.

Type:bool

__init__ instantiates a ModelDownloader instance.

download_all(check_before_download=True)[source]

High-level api: Convert cxml tree to an internal schema tree. This method is recursive.

Parameters:check_before_download (bool) – True if checking capabilities.txt file is required.
Returns:Nothing returns.
Return type:None
download(module)[source]

High-level api: Download a module schema.

Parameters:module (str) – Module name that will be downloaded.
Returns:Nothing returns.
Return type:None