<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/20522">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: explain how command attributes are used<br><br>The VTY features a method to associate commands with certain<br>attrubutes. Tell the VTY user how to use the help to display the<br>attributes and their meaning.<br><br>Change-Id: If03e07f1f8e7e3c0166a00e3f395e2a46a9a7713<br>Related: SYS#4937, OS#1601<br>---<br>M common/chapters/vty.adoc<br>1 file changed, 88 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/22/20522/1</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 3aed41a..dec3be2 100644</span><br><span>--- a/common/chapters/vty.adoc</span><br><span>+++ b/common/chapters/vty.adoc</span><br><span>@@ -344,3 +344,91 @@</span><br><span>   periodic location update <6-1530></span><br><span>   no periodic location update</span><br><span> ----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== The attribute system</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The VTY allows to edit the configuration at runtime. For many VTY commands the</span><br><span style="color: hsl(120, 100%, 40%);">+configuration change is immediately valid but for some commands a change becomes</span><br><span style="color: hsl(120, 100%, 40%);">+valid on a certain event only. In some cases it is even necessary to restart the</span><br><span style="color: hsl(120, 100%, 40%);">+whole process.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+To give the user an overview, which configuration change applies when, the VTY</span><br><span style="color: hsl(120, 100%, 40%);">+implemets a system of attribute flags, which can be displayed using the `show`</span><br><span style="color: hsl(120, 100%, 40%);">+command with the parameter `vty-attributes`</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Example: Typing `show vty-attributes` at the VTY prompt</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+OsmoBSC> show vty-attributes</span><br><span style="color: hsl(120, 100%, 40%);">+  Global attributes:</span><br><span style="color: hsl(120, 100%, 40%);">+    !  This command applies immediately</span><br><span style="color: hsl(120, 100%, 40%);">+    @  This command applies on VTY node exit</span><br><span style="color: hsl(120, 100%, 40%);">+  Library specific attributes:</span><br><span style="color: hsl(120, 100%, 40%);">+    A  This command applies on ASP restart</span><br><span style="color: hsl(120, 100%, 40%);">+    I  This command applies on IPA link establishment</span><br><span style="color: hsl(120, 100%, 40%);">+    L  This command applies on E1 line update</span><br><span style="color: hsl(120, 100%, 40%);">+  Application specific attributes:</span><br><span style="color: hsl(120, 100%, 40%);">+    o  This command applies on A-bis OML link (re)establishment</span><br><span style="color: hsl(120, 100%, 40%);">+    r  This command applies on A-bis RSL link (re)establishment</span><br><span style="color: hsl(120, 100%, 40%);">+    l  This command applies for newly created lchans</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%);">+The attributes are symbolized through a single ASCII letter (flag) and do exist</span><br><span style="color: hsl(120, 100%, 40%);">+in three levels. This is more or less due to the technical aspects of the VTY</span><br><span style="color: hsl(120, 100%, 40%);">+implementation. For the user, the level of an attribute has only informative</span><br><span style="color: hsl(120, 100%, 40%);">+purpose.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The global attributes, which can be found under the same attribute letter in every</span><br><span style="color: hsl(120, 100%, 40%);">+osmocom application, exist on the top level. The Library specific attributes below</span><br><span style="color: hsl(120, 100%, 40%);">+are used in various osmocom libraries. Like with the global attributes the attribute</span><br><span style="color: hsl(120, 100%, 40%);">+flag letter stays the same throughout every osmocom application here as well. On</span><br><span style="color: hsl(120, 100%, 40%);">+the third level one can find the application specific attributes. Those are unique</span><br><span style="color: hsl(120, 100%, 40%);">+to each osmocom application and the attribute letters may have different meanings</span><br><span style="color: hsl(120, 100%, 40%);">+in different osmocom applications. To make the user more aware of this, lowercase</span><br><span style="color: hsl(120, 100%, 40%);">+letters were used as attribute flags.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The `list` command with the parameter `with-flags` displays a list of available</span><br><span style="color: hsl(120, 100%, 40%);">+commands on the current VTY node, along with attribute columns on the left side.</span><br><span style="color: hsl(120, 100%, 40%);">+Those columns contain the attribute flag letters to indicate to the user how the</span><br><span style="color: hsl(120, 100%, 40%);">+command behaves in terms of how and when the configuration change takes effect.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Example: Typing `list with-flags` at the VTY prompt</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+OsmoBSC(config-net-bts)# list with-flags</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  help</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  list [with-flags]</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  show vty-attributes</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  show vty-attributes (application|library|global)</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  write terminal</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  write file [PATH]</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  write memory</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  write</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  show running-config</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  exit</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  end</span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  type (unknown|bs11|nanobts|rbs2000|nokia_site|sysmobts)</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  description .TEXT</span><br><span style="color: hsl(120, 100%, 40%);">+  . ...  no description</span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  band BAND</span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  cell_identity <0-65535></span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  dtx uplink [force]</span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  dtx downlink</span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  no dtx uplink</span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  no dtx downlink</span><br><span style="color: hsl(120, 100%, 40%);">+  . .r.  location_area_code <0-65535></span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  base_station_id_code <0-63></span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  ipa unit-id <0-65534> <0-255></span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  ipa rsl-ip A.B.C.D</span><br><span style="color: hsl(120, 100%, 40%);">+  . o..  nokia_site skip-reset (0|1)</span><br><span style="color: hsl(120, 100%, 40%);">+  ! ...  nokia_site no-local-rel-conf (0|1)</span><br><span style="color: hsl(120, 100%, 40%);">+  ! ...  nokia_site bts-reset-timer  <15-100></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%);">+There are multiple columns because a single command may be associated with</span><br><span style="color: hsl(120, 100%, 40%);">+multiple attributes at the same time. To improve readability each flag letter</span><br><span style="color: hsl(120, 100%, 40%);">+gets a dedicated column. Empty spaces in the column are marked with a dot (".")</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+In some cases the listing will contain commands that are associated with no</span><br><span style="color: hsl(120, 100%, 40%);">+flags at all. Those commands either play an exceptional role (interactive</span><br><span style="color: hsl(120, 100%, 40%);">+commands outside "configure terminal", vty node navigation commands, commands</span><br><span style="color: hsl(120, 100%, 40%);">+to show / write the config file) or will require a full restart of the overall</span><br><span style="color: hsl(120, 100%, 40%);">+process to take effect.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/20522">change 20522</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/+/20522"/><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: If03e07f1f8e7e3c0166a00e3f395e2a46a9a7713 </div>
<div style="display:none"> Gerrit-Change-Number: 20522 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>