sysrepo.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. </PLUGIN>
  17. <PTYPE name="PLINE_SET">
  18. <COMPL>
  19. <ACTION sym="srp_compl@sysrepo"/>
  20. </COMPL>
  21. <HELP>
  22. <ACTION sym="srp_help@sysrepo"/>
  23. </HELP>
  24. <ACTION sym="PLINE_SET@sysrepo"/>
  25. </PTYPE>
  26. <PTYPE name="PLINE_DEL">
  27. <COMPL>
  28. <ACTION sym="srp_compl@sysrepo"/>
  29. </COMPL>
  30. <HELP>
  31. <ACTION sym="srp_help@sysrepo"/>
  32. </HELP>
  33. <ACTION sym="PLINE_DEL@sysrepo"/>
  34. </PTYPE>
  35. <PTYPE name="PLINE_EDIT">
  36. <COMPL>
  37. <ACTION sym="srp_compl@sysrepo"/>
  38. </COMPL>
  39. <HELP>
  40. <ACTION sym="srp_help@sysrepo"/>
  41. </HELP>
  42. <ACTION sym="PLINE_EDIT@sysrepo"/>
  43. </PTYPE>
  44. <PTYPE name="PLINE_INSERT_FROM">
  45. <COMPL>
  46. <ACTION sym="srp_compl@sysrepo"/>
  47. </COMPL>
  48. <HELP>
  49. <ACTION sym="srp_help@sysrepo"/>
  50. </HELP>
  51. <ACTION sym="PLINE_INSERT_FROM@sysrepo"/>
  52. </PTYPE>
  53. <PTYPE name="PLINE_INSERT_TO">
  54. <COMPL>
  55. <ACTION sym="srp_compl_insert_to@sysrepo"/>
  56. </COMPL>
  57. <HELP>
  58. <ACTION sym="srp_help_insert_to@sysrepo"/>
  59. </HELP>
  60. <ACTION sym="PLINE_INSERT_TO@sysrepo"/>
  61. </PTYPE>
  62. <VIEW name="main">
  63. <COMMAND name="configure" help="Configure system">
  64. <ACTION sym="nav">replace sysrepo</ACTION>
  65. </COMMAND>
  66. <COMMAND name="show" help="Show" mode="switch">
  67. <COMMAND name="running" help="Show running-config">
  68. <ACTION sym="srp_show_running@sysrepo"/>
  69. </COMMAND>
  70. </COMMAND>
  71. </VIEW>
  72. <VIEW name="sysrepo">
  73. <PROMPT>
  74. <ACTION sym="srp_prompt_edit_path@sysrepo"/>
  75. <ACTION sym="prompt" exec_on="always">%u@%h# </ACTION>
  76. </PROMPT>
  77. <HOTKEY key="^Z" cmd="exit"/>
  78. <HOTKEY key="^@" cmd="show"/>
  79. <COMMAND name="exit" help="Exit configuration mode or level up">
  80. <ACTION sym="srp_up@sysrepo"/>
  81. <ACTION sym="nav" exec_on="fail">replace main</ACTION>
  82. </COMMAND>
  83. <COMMAND name="do" help="Execute operational mode command">
  84. <VIEW name="operational" ref="/main"/>
  85. </COMMAND>
  86. <COMMAND name="set" help="Set data to configuration">
  87. <PARAM name="path" ptype="/PLINE_SET" max="100"/>
  88. <ACTION sym="srp_set@sysrepo"/>
  89. </COMMAND>
  90. <COMMAND name="del" help="Delete data from configuration">
  91. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  92. <ACTION sym="srp_del@sysrepo"/>
  93. </COMMAND>
  94. <COMMAND name="edit" help="Change hierarchy level">
  95. <PARAM name="path" ptype="/PLINE_EDIT" max="100"/>
  96. <ACTION sym="srp_edit@sysrepo"/>
  97. </COMMAND>
  98. <COMMAND name="top" help="Change hierarchy level to the top one">
  99. <ACTION sym="srp_top@sysrepo"/>
  100. </COMMAND>
  101. <COMMAND name="up" help="Up hierarchy level">
  102. <ACTION sym="srp_up@sysrepo"/>
  103. </COMMAND>
  104. <COMMAND name="insert" help="Insert statement to specified position">
  105. <PARAM name="from_path" ptype="/PLINE_INSERT_FROM" max="100"/>
  106. <SWITCH name="position">
  107. <COMMAND name="first" help="First position"/>
  108. <COMMAND name="last" help="Last position"/>
  109. <SEQ name="relative_block">
  110. <SWITCH name="relative">
  111. <COMMAND name="before" help="Before specified element"/>
  112. <COMMAND name="after" help="After specified element"/>
  113. </SWITCH>
  114. <PARAM name="to_path" ptype="/PLINE_INSERT_TO" max="100"/>
  115. </SEQ>
  116. </SWITCH>
  117. <ACTION sym="srp_insert@sysrepo"/>
  118. </COMMAND>
  119. <COMMAND name="commit" help="Commit data to running-config">
  120. <ACTION sym="srp_commit@sysrepo"/>
  121. </COMMAND>
  122. <COMMAND name="check" help="Verify the candidate configuration">
  123. <ACTION sym="srp_verify@sysrepo"/>
  124. </COMMAND>
  125. <COMMAND name="reset" help="Reset to running-config">
  126. <ACTION sym="srp_reset@sysrepo"/>
  127. </COMMAND>
  128. <COMMAND name="show" help="Show data hierarchy">
  129. <PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
  130. <ACTION sym="srp_show@sysrepo"/>
  131. </COMMAND>
  132. <COMMAND name="diff" help="Show diff relative running-config">
  133. <PARAM name="path" ptype="/PLINE_EDIT" min="0" max="100"/>
  134. <ACTION sym="srp_diff@sysrepo"/>
  135. </COMMAND>
  136. <!--
  137. <COMMAND name="deactivate" help="Deactivate statement">
  138. <PARAM name="path" ptype="/PLINE_DEL" max="100"/>
  139. <ACTION sym="srp_deactivate@sysrepo"/>
  140. </COMMAND>
  141. -->
  142. </VIEW>
  143. </KLISH>