sysrepo.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. <PLUGIN name="sysrepo">
  7. ShowBrackets = y
  8. ShowSemicolons = y
  9. KeysWithStatement = y
  10. FirstKeyWithStatement = n
  11. Colorize = y
  12. Indent = 2
  13. DefaultKeys = n
  14. ShowDefaultKeys = n
  15. HidePasswords = y
  16. EnableNACM = n
  17. Oneliners = y
  18. </PLUGIN>
  19. <PTYPE name="PLINE_SET">
  20. <COMPL>
  21. <ACTION sym="srp_compl_set@sysrepo"/>
  22. </COMPL>
  23. <HELP>
  24. <ACTION sym="srp_help_set@sysrepo"/>
  25. </HELP>
  26. <ACTION sym="PLINE_SET@sysrepo"/>
  27. </PTYPE>
  28. <PTYPE name="PLINE_DEL">
  29. <COMPL>
  30. <ACTION sym="srp_compl_del@sysrepo"/>
  31. </COMPL>
  32. <HELP>
  33. <ACTION sym="srp_help_del@sysrepo"/>
  34. </HELP>
  35. <ACTION sym="PLINE_DEL@sysrepo"/>
  36. </PTYPE>
  37. <PTYPE name="PLINE_EDIT">
  38. <COMPL>
  39. <ACTION sym="srp_compl_edit@sysrepo"/>
  40. </COMPL>
  41. <HELP>
  42. <ACTION sym="srp_help_edit@sysrepo"/>
  43. </HELP>
  44. <ACTION sym="PLINE_EDIT@sysrepo"/>
  45. </PTYPE>
  46. <PTYPE name="PLINE_EDIT_ABS">
  47. <COMPL>
  48. <ACTION sym="srp_compl_edit_abs@sysrepo"/>
  49. </COMPL>
  50. <HELP>
  51. <ACTION sym="srp_help_edit_abs@sysrepo"/>
  52. </HELP>
  53. <ACTION sym="PLINE_EDIT_ABS@sysrepo"/>
  54. </PTYPE>
  55. <PTYPE name="PLINE_INSERT_FROM">
  56. <COMPL>
  57. <ACTION sym="srp_compl_insert@sysrepo"/>
  58. </COMPL>
  59. <HELP>
  60. <ACTION sym="srp_help_insert@sysrepo"/>
  61. </HELP>
  62. <ACTION sym="PLINE_INSERT_FROM@sysrepo"/>
  63. </PTYPE>
  64. <PTYPE name="PLINE_INSERT_TO">
  65. <COMPL>
  66. <ACTION sym="srp_compl_insert_to@sysrepo"/>
  67. </COMPL>
  68. <HELP>
  69. <ACTION sym="srp_help_insert_to@sysrepo"/>
  70. </HELP>
  71. <ACTION sym="PLINE_INSERT_TO@sysrepo"/>
  72. </PTYPE>
  73. <PTYPE name="PLINE_SHOW">
  74. <COMPL>
  75. <ACTION sym="srp_compl_show@sysrepo"/>
  76. </COMPL>
  77. <HELP>
  78. <ACTION sym="srp_help_show@sysrepo"/>
  79. </HELP>
  80. <ACTION sym="PLINE_SHOW@sysrepo"/>
  81. </PTYPE>
  82. <PTYPE name="PLINE_SHOW_ABS">
  83. <COMPL>
  84. <ACTION sym="srp_compl_show_abs@sysrepo"/>
  85. </COMPL>
  86. <HELP>
  87. <ACTION sym="srp_help_show_abs@sysrepo"/>
  88. </HELP>
  89. <ACTION sym="PLINE_SHOW_ABS@sysrepo"/>
  90. </PTYPE>
  91. <VIEW name="main">
  92. <COMMAND name="configure" help="Configure system">
  93. <ACTION sym="nav">replace sysrepo</ACTION>
  94. </COMMAND>
  95. <COMMAND name="show" help="Show" mode="switch">
  96. <COMMAND name="running" help="Show running-config">
  97. <PARAM name="path" ptype="/PLINE_SHOW_ABS" min="0" max="100"/>
  98. <ACTION sym="srp_show_abs@sysrepo">running</ACTION>
  99. </COMMAND>
  100. </COMMAND>
  101. </VIEW>
  102. <VIEW name="sysrepo">
  103. <PROMPT>
  104. <ACTION sym="srp_prompt_edit_path@sysrepo"/>
  105. <ACTION sym="prompt" exec_on="always">%u@%h# </ACTION>
  106. </PROMPT>
  107. <HOTKEY key="^Z" cmd="exit"/>
  108. <HOTKEY key="^@" cmd="show"/>
  109. <COMMAND name="exit" help="Exit configuration mode or level up">
  110. <ACTION sym="srp_up@sysrepo"/>
  111. <ACTION sym="nav" exec_on="fail">replace main</ACTION>
  112. </COMMAND>
  113. <COMMAND name="do" help="Execute operational mode command">
  114. <VIEW name="operational" ref="/main"/>
  115. </COMMAND>
  116. <COMMAND name="set" help="Set data to configuration">
  117. <PARAM name="path" ptype="/PLINE_SET" max="100"/>
  118. <ACTION sym="srp_set@sysrepo"/>
  119. </COMMAND>
  120. <COMMAND name="del" help="Delete data from configuration">
  121. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  122. <ACTION sym="srp_del@sysrepo"/>
  123. </COMMAND>
  124. <COMMAND name="edit" help="Change hierarchy level">
  125. <PARAM name="path" ptype="/PLINE_EDIT" max="100"/>
  126. <ACTION sym="srp_edit@sysrepo"/>
  127. </COMMAND>
  128. <COMMAND name="top" help="Change hierarchy level to the top one">
  129. <ACTION sym="srp_top@sysrepo"/>
  130. </COMMAND>
  131. <COMMAND name="up" help="Up hierarchy level">
  132. <ACTION sym="srp_up@sysrepo"/>
  133. </COMMAND>
  134. <COMMAND name="insert" help="Insert statement to specified position">
  135. <PARAM name="from_path" ptype="/PLINE_INSERT_FROM" max="100"/>
  136. <SWITCH name="position">
  137. <COMMAND name="first" help="First position"/>
  138. <COMMAND name="last" help="Last position"/>
  139. <SEQ name="relative_block">
  140. <SWITCH name="relative">
  141. <COMMAND name="before" help="Before specified element"/>
  142. <COMMAND name="after" help="After specified element"/>
  143. </SWITCH>
  144. <PARAM name="to_path" ptype="/PLINE_INSERT_TO" max="100"/>
  145. </SEQ>
  146. </SWITCH>
  147. <ACTION sym="srp_insert@sysrepo"/>
  148. </COMMAND>
  149. <COMMAND name="commit" help="Commit data to running-config">
  150. <ACTION sym="srp_commit@sysrepo"/>
  151. </COMMAND>
  152. <COMMAND name="check" help="Verify the candidate configuration">
  153. <ACTION sym="srp_verify@sysrepo"/>
  154. </COMMAND>
  155. <COMMAND name="reset" help="Reset to running-config">
  156. <ACTION sym="srp_reset@sysrepo"/>
  157. </COMMAND>
  158. <COMMAND name="show" help="Show data hierarchy">
  159. <PARAM name="path" ptype="/PLINE_SHOW" min="0" max="100"/>
  160. <ACTION sym="srp_show@sysrepo"/>
  161. </COMMAND>
  162. <COMMAND name="diff" help="Show diff relative running-config">
  163. <PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
  164. <ACTION sym="srp_diff@sysrepo"/>
  165. </COMMAND>
  166. <!--
  167. <COMMAND name="deactivate" help="Deactivate statement">
  168. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  169. <ACTION sym="srp_deactivate@sysrepo"/>
  170. </COMMAND>
  171. -->
  172. </VIEW>
  173. </KLISH>