sysrepo.xml 4.2 KB

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