sysrepo.xml 4.3 KB

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