sysrepo.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. <VIEW name="main">
  74. <COMMAND name="configure" help="Configure system">
  75. <ACTION sym="nav">replace sysrepo</ACTION>
  76. </COMMAND>
  77. <COMMAND name="show" help="Show" mode="switch">
  78. <COMMAND name="running" help="Show running-config">
  79. <PARAM name="path" ptype="/PLINE_EDIT_ABS" min="0" max="100"/>
  80. <ACTION sym="srp_show_abs@sysrepo">running</ACTION>
  81. </COMMAND>
  82. </COMMAND>
  83. </VIEW>
  84. <VIEW name="sysrepo">
  85. <PROMPT>
  86. <ACTION sym="srp_prompt_edit_path@sysrepo"/>
  87. <ACTION sym="prompt" exec_on="always">%u@%h# </ACTION>
  88. </PROMPT>
  89. <HOTKEY key="^Z" cmd="exit"/>
  90. <HOTKEY key="^@" cmd="show"/>
  91. <COMMAND name="exit" help="Exit configuration mode or level up">
  92. <ACTION sym="srp_up@sysrepo"/>
  93. <ACTION sym="nav" exec_on="fail">replace main</ACTION>
  94. </COMMAND>
  95. <COMMAND name="do" help="Execute operational mode command">
  96. <VIEW name="operational" ref="/main"/>
  97. </COMMAND>
  98. <COMMAND name="set" help="Set data to configuration">
  99. <PARAM name="path" ptype="/PLINE_SET" max="100"/>
  100. <ACTION sym="srp_set@sysrepo"/>
  101. </COMMAND>
  102. <COMMAND name="del" help="Delete data from configuration">
  103. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  104. <ACTION sym="srp_del@sysrepo"/>
  105. </COMMAND>
  106. <COMMAND name="edit" help="Change hierarchy level">
  107. <PARAM name="path" ptype="/PLINE_EDIT" max="100"/>
  108. <ACTION sym="srp_edit@sysrepo"/>
  109. </COMMAND>
  110. <COMMAND name="top" help="Change hierarchy level to the top one">
  111. <ACTION sym="srp_top@sysrepo"/>
  112. </COMMAND>
  113. <COMMAND name="up" help="Up hierarchy level">
  114. <ACTION sym="srp_up@sysrepo"/>
  115. </COMMAND>
  116. <COMMAND name="insert" help="Insert statement to specified position">
  117. <PARAM name="from_path" ptype="/PLINE_INSERT_FROM" max="100"/>
  118. <SWITCH name="position">
  119. <COMMAND name="first" help="First position"/>
  120. <COMMAND name="last" help="Last position"/>
  121. <SEQ name="relative_block">
  122. <SWITCH name="relative">
  123. <COMMAND name="before" help="Before specified element"/>
  124. <COMMAND name="after" help="After specified element"/>
  125. </SWITCH>
  126. <PARAM name="to_path" ptype="/PLINE_INSERT_TO" max="100"/>
  127. </SEQ>
  128. </SWITCH>
  129. <ACTION sym="srp_insert@sysrepo"/>
  130. </COMMAND>
  131. <COMMAND name="commit" help="Commit data to running-config">
  132. <ACTION sym="srp_commit@sysrepo"/>
  133. </COMMAND>
  134. <COMMAND name="check" help="Verify the candidate configuration">
  135. <ACTION sym="srp_verify@sysrepo"/>
  136. </COMMAND>
  137. <COMMAND name="reset" help="Reset to running-config">
  138. <ACTION sym="srp_reset@sysrepo"/>
  139. </COMMAND>
  140. <COMMAND name="show" help="Show data hierarchy">
  141. <PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
  142. <ACTION sym="srp_show@sysrepo"/>
  143. </COMMAND>
  144. <COMMAND name="diff" help="Show diff relative running-config">
  145. <PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
  146. <ACTION sym="srp_diff@sysrepo"/>
  147. </COMMAND>
  148. <!--
  149. <COMMAND name="deactivate" help="Deactivate statement">
  150. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  151. <ACTION sym="srp_deactivate@sysrepo"/>
  152. </COMMAND>
  153. -->
  154. </VIEW>
  155. </KLISH>