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

andy@myserver> show var leaflist-multi-line
  leaflist-multi-line false

andy@myserver> config term
andy@myserver# no top

andy@myserver# top <TAB>
foo    test   test2
andy@myserver# top foo f1 test a1 a2 a3 test2 b1 b2 b3
Applying 1 edit

andy@myserver# 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

andy@myserver> $$leaflist-multi-line=true
System variable set
OK

andy@myserver> sho var leaflist-multi-line
  leaflist-multi-line true

andy@myserver> conf t
andy@myserver# no top
andy@myserver# top foo f1 test a1 a2 a3 test2 b1 b2 b3
Applying 1 edit

andy@myserver# do sho run
nc:rpc-reply {
  data {
    ypshell-test4:top {
      foo f1
      test a1
      test a2
      test a3
      test2 b1
      test2 b2
      test2 b3
    }
  }
}