schema.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <KLISH
  3. xmlns="https://klish.libcode.org/klish3"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xsi:schemaLocation="https://src.libcode.org/pkun/klish/src/master/klish.xsd">
  6. <!-- Test for Juniper-like scheme -->
  7. <ENTRY name="schema" mode="switch" container="true">
  8. <ENTRY name="iface" help="Interface">
  9. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  10. <ENTRY name="iface_name" help="Interface name">
  11. <ENTRY name="IFACE_NAME" purpose="ptype" ref="/IFACE_NAME"/>
  12. <ENTRY name="mtu" help="MTU">
  13. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  14. <ENTRY name="mtu_value" help="MTU">
  15. <ENTRY name="MTU" purpose="ptype" ref="/MTU"/>
  16. </ENTRY> <!-- mtu_value -->
  17. </ENTRY> <!-- mtu -->
  18. <ENTRY name="addr" help="IP address">
  19. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  20. <ENTRY name="addr_value" help="IP address">
  21. <ENTRY name="IP" purpose="ptype" ref="/IP"/>
  22. </ENTRY> <!-- addr_value -->
  23. </ENTRY> <!-- mtu -->
  24. </ENTRY> <!-- iface_name -->
  25. </ENTRY> <!-- iface -->
  26. </ENTRY>
  27. <!-- VIEW. Views are not visible for path. Switch because you must choose one of the commands -->
  28. <ENTRY name="main" mode="switch" container="true">
  29. <!-- COMMAND -->
  30. <ENTRY name="cmd" help="Clear settings" mode="sequence">
  31. <!-- SWITCH container. Container is not visible while CLI session -->
  32. <ENTRY name="opt" help="Switch subcommand" mode="switch" container="true">
  33. <!-- PARAMs (switched) -->
  34. <ENTRY name="o1" help="Clear callerid_number_prepend assignment" />
  35. <ENTRY name="o2" help="Clear record assignment" />
  36. <ENTRY name="o3" help="Clear callerid assignment" />
  37. <ENTRY name="o4" help="Clear a schedule">
  38. <!-- subPARAM -->
  39. <ENTRY name="o5" help="Include number">
  40. </ENTRY>
  41. </ENTRY>
  42. <ENTRY name="o6" help="Clear callerid_number_remove assignment" />
  43. <ENTRY name="o7" help="Clear callerid_number_postpend assignment" />
  44. <ENTRY name="o8" help="Clear callerid_number_replace assignment" />
  45. </ENTRY>
  46. <ACTION sym="nop" exec_on="always">
  47. ps aux
  48. </ACTION>
  49. </ENTRY>
  50. <!-- Another COMMAND. Sequence means that all subENTRYes can be entered simultaneously -->
  51. <ENTRY name="cmd1" help="Clear settings" mode="sequence" purpose="common">
  52. <!-- PTYPE. Special purpose=ptype. Link to previosly defined "COMMAND" PTYPE -->
  53. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  54. <!-- COND. Conditional expression. Is parent COMMAND visible? -->
  55. <ENTRY name="o2" purpose="cond"/>
  56. <ENTRY name="o1" help="Clear callerid_number_prepend assignment">
  57. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  58. </ENTRY>
  59. <ENTRY name="o3" help="Clear callerid_number_prepend assignment">
  60. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  61. </ENTRY>
  62. <!-- Conditional ACTIONs -->
  63. <ACTION sym="tsym" exec_on="always">0</ACTION>
  64. <ACTION sym="tsym" exec_on="always">1</ACTION>
  65. <ACTION sym="tsym" exec_on="fail">2</ACTION>
  66. <ACTION sym="tsym" exec_on="never">3</ACTION>
  67. <ACTION sym="tsym" exec_on="always" sync="true">4</ACTION>
  68. <ACTION sym="tsym" exec_on="always"></ACTION>
  69. <ACTION sym="tsym" exec_on="success">5</ACTION>
  70. <ACTION sym="tsym" exec_on="always">6</ACTION>
  71. </ENTRY>
  72. </ENTRY>
  73. </KLISH>