netconf_get_schemas

NETCONF Schemas.

Functions

netconf_get_schemas(→ nornir.core.task.Result)

Fetch provided schemas and write to a file inside of a given directory path, schema_path.

Module Contents

netconf_get_schemas.netconf_get_schemas(task: nornir.core.task.Task, schemas: nornir.core.task.List[str], schema_path: str) nornir.core.task.Result

Fetch provided schemas and write to a file inside of a given directory path, schema_path.

All schemas will be written to a file in the schema_path directory provided and named by the schema name.

Any errors on extracting the schema will be logged in the result object.

Parameters:
  • schemas (List[str]) – List of schemas to fetch.

  • schema_path (str) – Directory path to save schemas output.

Simple Example

> nr.run(task=netconf_schemas, schemas=["schema1", "schema2"], schema_path="workdir/schemas")
Returns:

Result object with the following attributes set:

* result (SchemaResult): List of files created, errors, if any and base directory path.