sysrepo.xml 4.2 KB

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