Skip to content

Function: loadYangLibrary() ​

ts
function loadYangLibrary(ctx, options?): Promise<YangLibrary>;

Defined in: netconf/src/operations/yang-library.ts:408

The session's YANG library, read once and shared by everything on the session (this module, client.content.loadModules(), other modules' support checks). Once a read has succeeded, later calls resolve with it and send nothing, even after a failed refresh; only refresh reads again. A failed read isn't kept. Concurrent callers share one read, which runs under the session's own RPC timeout and no caller's signal; each caller stops waiting when its own signal aborts or its own timeout passes (an already-aborted signal sends nothing), without failing the others.

A server that answers with an empty library (none configured, or hidden by access control) is taken at its word for the session, as a successful read. Doesn't check capabilities: see hasYangLibrary.

Parameters ​

ctx ​

ExtensionContext

options? ​

YangLibraryLoadOptions = {}

Returns ​

Promise<YangLibrary>

Released under the MIT Licence.