<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/20890">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chapters/vty: add documentation for the expert mode<br><br>Change-Id: Ic43fbef8df77ad5561ca4521a29bc9f60bd3d7ac<br>Related: SYS#4910<br>---<br>M common/chapters/vty.adoc<br>1 file changed, 37 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/common/chapters/vty.adoc b/common/chapters/vty.adoc</span><br><span>index 6fe31a8..972e71f 100644</span><br><span>--- a/common/chapters/vty.adoc</span><br><span>+++ b/common/chapters/vty.adoc</span><br><span>@@ -363,6 +363,7 @@</span><br><span> ----</span><br><span> OsmoBSC> show vty-attributes</span><br><span>   Global attributes:</span><br><span style="color: hsl(120, 100%, 40%);">+    ^  This command is hidden (check expert mode)</span><br><span>     !  This command applies immediately</span><br><span>     @  This command applies on VTY node exit</span><br><span>   Library specific attributes:</span><br><span>@@ -435,3 +436,39 @@</span><br><span> commands outside "configure terminal", vty node navigation commands, commands</span><br><span> to show / write the config file) or will require a full restart of the overall</span><br><span> process to take effect.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== The expert mode</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Some VTY commands are considered relatively dangerous if used in production operation,</span><br><span style="color: hsl(120, 100%, 40%);">+so the general approach is to hide them. This means that they don't show up anywhere</span><br><span style="color: hsl(120, 100%, 40%);">+but the source code, but can still be executed. On the one hand, this approach reduces</span><br><span style="color: hsl(120, 100%, 40%);">+the risk of an accidental invocation and potential service degradation; on the other,</span><br><span style="color: hsl(120, 100%, 40%);">+it complicates intentional use of the hidden commands.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The VTY features so-called __expert__ mode, that makes the hidden commands appear in</span><br><span style="color: hsl(120, 100%, 40%);">+the interactive help, as well as in the XML VTY reference, just like normal ones. This</span><br><span style="color: hsl(120, 100%, 40%);">+mode can be activated from the 'VIEW' node by invoking the `enable` command with the</span><br><span style="color: hsl(120, 100%, 40%);">+parameter `expert-mode`. It remains active for the individual VTY session, and gets</span><br><span style="color: hsl(120, 100%, 40%);">+disabled automatically when the user switches back to the 'VIEW' node or terminates</span><br><span style="color: hsl(120, 100%, 40%);">+the session.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+A special attribute in the output of the `list with-flags` command indicates whether</span><br><span style="color: hsl(120, 100%, 40%);">+a given command is hidden in normal mode, or is a regular command:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Example: Hidden commands in the output of the `list with-flags` command</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+OsmoBSC> enable expert-mode <1></span><br><span style="color: hsl(120, 100%, 40%);">+OsmoBSC# list with-flags</span><br><span style="color: hsl(120, 100%, 40%);">+  ...</span><br><span style="color: hsl(120, 100%, 40%);">+  ^   bts <0-255> (activate-all-lchan|deactivate-all-lchan) <2></span><br><span style="color: hsl(120, 100%, 40%);">+  ^   bts <0-255> trx <0-255> (activate-all-lchan|deactivate-all-lchan) <2></span><br><span style="color: hsl(120, 100%, 40%);">+  .   bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> mdcx A.B.C.D <0-65535> <3></span><br><span style="color: hsl(120, 100%, 40%);">+  ^   bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (borken|unused) <2></span><br><span style="color: hsl(120, 100%, 40%);">+  .   bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> handover <0-255> <3></span><br><span style="color: hsl(120, 100%, 40%);">+  .   bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> assignment <3></span><br><span style="color: hsl(120, 100%, 40%);">+  .   bts <0-255> smscb-command (normal|schedule|default) <1-4> HEXSTRING <3></span><br><span style="color: hsl(120, 100%, 40%);">+  ...</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+<1> This command enables the __expert__ mode.</span><br><span style="color: hsl(120, 100%, 40%);">+<2> This is a hidden command (only shown in the __expert__ mode).</span><br><span style="color: hsl(120, 100%, 40%);">+<3> This is a regular command that is always shown regardless of the mode.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/20890">change 20890</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/20890"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-manuals </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic43fbef8df77ad5561ca4521a29bc9f60bd3d7ac </div>
<div style="display:none"> Gerrit-Change-Number: 20890 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>