OcNOS-RON : NetConf User Guide : NetConf Monitoring
NetConf Monitoring
OcNOS supports NetConf monitoring to retrieve a schema, which includes module/sub-module and it returns the requested schema. This can be achieved by <get-schema> operation.
Retrieve YANG Schema
To retrieve a YANG module/sub-module:
Yangcli yangcli root@127.1> get-schema identifier=ipi-ospf
 
RPC Data Reply 4 for session 1:
 
rpc-reply {
data '/*
….
<displays module schema here in this field>
…. '
}
 
Yangcli yangcli root@127.1> get-schema identifier=ipi-ospf-area
 
RPC Data Reply 4 for session 1:
 
rpc-reply {
data '/*
….
<displays sub-module schema here in this field>
…. '
}
Error Messages
Error is reported, when the requested schema does not exists.
<yangcli root@127.1> get-schema identifier=zeb
 
RPC Error Reply 1 for session 5:
 
rpc-reply {
rpc-error {
error-type protocol
error-tag operation-failed
error-severity error
error-app-tag no-matches
error-path /nc:rpc/ncm:get-schema/ncm:identifier
error-message 'no matches found'
error-info {
error-number 365
}
}
}
Retrieving Schema List
OcNOS supports to retrieve schema list from /netconf-state/schemas using the sget command.
yangcli ocnos@10.12.12.233> sget /netconf-state/schemas
 
Filling container /netconf-state/schemas:
RPC Data Reply 4 for session 1:
 
rpc-reply {
data {
netconf-state {
schemas {
schema cml-data-types 2021-05-03 ncm:yang {
identifier cml-data-types
version 2021-05-03
format ncm:yang
namespace http://www.ipinfusion.com/yang/ocnos/cml-data-types
location NETCONF
}
schema feature-list 2021-05-03 ncm:yang {
identifier feature-list
version 2021-05-03
format ncm:yang
namespace http://ipinfusion.com/ns/feature-list
location NETCONF
}
...
...
 
<Lists all schemas here in this space>
...
...
}
}
}
}