FORGE Course

 

Full Height |  Two columns |  Parts | 

Lecture 9: Special operations

Lecture 9: Special operations Apostolos Palladinos 12/05/2016 English
NETCONF

Special commands

Special commands Apostolos Palladinos 12/05/2016 English
Widget

The last part of the course describes 2 special commands, which only the administrator of the NETCONF server can use, in order to manage the YANG model of the NETCONF server, and the transAPI modules if they exist:

  1. yang-model (value): This command contains 7 arguments in order to deal with the yang models of the server:
    • -save (value) [-transapi ]: Saves the YANG model which is given in the textbox of the snippet label with the name (value). The name of the YANG model must be the same with the main module of the YANG file. After its storage the NETCONF server produces the YIN model and the validation schemas of the saved model. If the user wants to utilize a transAPI module he adds also -transapi argument and the name of the transapi module in command line prompt.  
    • -delete: Deletes the specified YANG model. Before you delete your YANG model is necessery to disable it from netopeer server through "-disable-model" command, otherwise netopeer server will not start through CLI.
    • -get (value): Retrieves the content of the specified YANG model.
    • -yang-models: Returns the available YANG models.
    • -enable-model (value): Enables the specified model at NETCONF server.
    • -disable-model ( value ): Disables the specified model at NETCONF server.
    • -models: Returns the enabled data models of the NETCONF server.
  2. transapi (value): This command provides 7 arguments in order to handle the transAPI modules that user defines:
    • -compile (value): Configures the NETCONF server with the specified transapi module of the corresponded YANG model.
    • -save (value): Saves the particular .c transAPI model provided by the textbox of the snippet label with the name (value).
    • -modules: Returns the available transAPI modules of the NETCONF server.
    • -get (value): Retrieves the content of the specified transAPI .c module.
    • -paths: Retrieves the available path files.
    • -save-path (value): Saves the specified path parameters provided by the textbox of the snippet label in a file with the name (value).
    • -get-path (value): Retrieves the defined parameters of the specified path file.
  3. netopeer: By using this command a NETCONF client can enable or disable the netopeer server:
    • -start: Enables NETCONF server.
    • -stop: Disables NETCONF server.
  4. clear: This command clears the textbox of the output label.

By executing the commands below, following the order that is indicated, the administrator of the NETCONF server can install the transapi module that has the same name with the yang model that is defined in the arguments of the commands( (value) must have the same name of the yang model in all commands ):

  1. transapi -save-path (value)
  2. yang-model -save (value) -transapi
  3. transapi -save (value)
  4.  transapi -compile (value)
  5. yang-model -enable-model (value) -transapi
  6. netopeer -stop
  7. netopeer -start

Special operations exercises

Special operations exercises Apostolos Palladinos 12/05/2016 English
NETCONF Excercises
  1. Create a custom YANG model and enable it in NETCONF server. Be sure that this is the only enabled model. If not, disable all the other models. Then try to execute NETCONF commands on that in order to verify that it works properly.
  2. Modify the YANG model of exercise 1 in order to contain a notification element. Then add a transapi module in your NETCONF server that sends this kind of notification every time a session is calling get operation. Alternatively, send this notification each time a modification occurs in a YANG leaf of your choice.