NETCONF Schema Server Configuration

The yangcli-pro program can be configured to associate a name with a set of schema server parameters to start a NETCONF schema device with a server. These named schema servers are saved in a configuration file. Use the --autoschemaservers to suppress automatic loading of this file. The default is to load this file at start-up and save it upon exit.

By default, the schema server configuration is saved in $HOME/.yumapro/yangcli_pro_schema_servers.conf. To override this file, set --autoschemaservers=false and use the schema-servers-cfg command to load a specific schema server configuration file.

If a session that is starting up goes not support get-schema then yangcli will check its get-schema-servers list and do a special side session to that remote server to get the missing YANG modules. Leave the remote session open until all autoload is done then close it.

Creating New Schema Servers

A schema server is created with a saved device id and a saved user id.

Example: Use the saved user id of userA and the saved device id of deviceA to create a new schema-serverA.

> user-cfg show=userA
User 'userA':
   user: admin
   password: fredlow
   connected: false

> device-cfg show=deviceA
Device 'deviceA':
   server: 192.168.0.57
   connected: false

> schema-server-cfg create=schema-serverA device-id=deviceA user-id=userA

A new schema_server is created:

schema_server-id=schema-serverA name=schema-serverA device=deviceA user=userA

Saving Schema Servers

To save schema servers, the text configuration file can be edited or the schema-servers-cfg 'save' command can be used.

> schema-servers-cfg save

Saved 1 schema_servers OK to '~/.yumapro/.yangcli_pro_schema_servers.conf'

> schema-server-cfg show=schema-serverA

Schema Server: schema-serverA
       Device Id: deviceA
       User Id: userA
       Connected: false

To save the schema servers to a different file, simply provide the filespec in the 'schema-servers-cfg save' command:

> schema-servers-cfg save=~/.yumapro/schema-servers.conf

Saved 3 schema_servers OK to '~/.yumapro/schema-servers.conf'

Multiple Schema Servers

Multiple schema servers can be configured, only one schema server can be active. If a session that is starting up does not support get-schema then yangcli will check its get-schema-servers list and do a special side session to that remote server to get the missing YANG modules. Leave the remote session open until all autoload is done then closes it.

Displaying the Configured Schema Servers

The schema servers that are available can be displayed with the schema-servers-cfg 'show' command. The --brief and --full extensions are available for this command.

> schema-servers-cfg

Saved schema_servers source: '~/.yumapro/.yangcli_pro_schema_servers.conf'

Schema Server: schema-serverA
  Device Id: deviceA
  User Id: userA
  Connected: false

Schema Server: schema-server-ACER
  Device Id: device-ACER
  User Id: user-ACER
  Connected: false

Schema Server: schema-server-asus2
  Device Id: asus2-device
  User Id: asus2
  Connected: false

Displaying A Schema Server

Displaying a Specific Schema Server

To see information about a specific device, use the schema-server-cfg 'show' command:

> schema-server-cfg show=schema-serverA

Schema Server: schema-serverA
  Device Id: deviceA
  User Id: userA
  Connected: false

Saved Schema Server Configuration File Format

The saved schema servers are stored in a YumaPro configuration file.

The file contents must conform to the following YANG container definition:

container saved-schema-servers {
  ncx:abstract;
  description
    "Represents all the saved schema-servers in
     the ~/.yumapro/yangcli_pro_schema_server file.
     Use the 'schema-server' command to access this file.
     Edit by hand only if you follow this YANG definition.";

  list schema-server-id {
    description
      "The list of schema-servers to use.";
    key name;

    leaf name  {
      type nt:NcxName;
      description
        "The id of the saved server.";
    }

    leaf user-id {
      type nt:NcxName;
      description
        "The id of the saved user.";
    }

    leaf device-id {
      type nt:NcxName;
      description
        "The id of the saved device.";
    }
  }
}

Schema Server Configuration File Example

The following example file shows a valid schema server configuration file:

saved-schema-servers {
  schema-server-id  'schema-serverA' {
    user-id 'userA'
    device-id 'deviceA'
  }
  schema-server-id  'schema-server-ACER' {
    user-id 'user-ACER'
    device-id 'device-ACER'
  }
  schema-server-id  'schema-server-asus2' {
    user-id 'asus2'
    device-id 'asus2-device'
  }
}