Use leaflist-multi-line to Configure leaf-list

The --leaflist-multi-line parameter controls how the leaf-list can be edited in config-mode

  • If set to 'true', then multiple leaf-lists can be configured at the same line.

  • If set to 'false', then only one leaf-list can be configured and it must be configured at the end of the line.

  • The default value is 'false'.

Example YANG:

container top {
  leaf foo { type string; }
  leaf-list test { type string; }
  leaf-list test2 { type string; }
}

leaflist-multi-line is FALSE

[email protected]> show var leaflist-multi-line
  leaflist-multi-line false

[email protected]> config term
[email protected]# no top

[email protected]# top <TAB>
foo    test   test2
[email protected]# top foo f1 test a1 a2 a3 test2 b1 b2 b3
Applying 1 edit

[email protected]# do show run
nc:rpc-reply {
  data {
    ypshell-test4:top {
      foo f1
      test a1
      test a2
      test a3
      test test2
      test b1
      test b2
      test b3
    }
  }
}

leaflist-multi-line is TRUE

[email protected]> $$leaflist-multi-line=true
System variable set
OK

[email protected]> sho var leaflist-multi-line
  leaflist-multi-line true

[email protected]> conf t
[email protected]# no top
[email protected]# top foo f1 test a1 a2 a3 test2 b1 b2 b3
Applying 1 edit

[email protected]# do sho run
nc:rpc-reply {
  data {
    ypshell-test4:top {
      foo f1
      test a1
      test a2
      test a3
      test2 b1
      test2 b2
      test2 b3
    }
  }
}