Patch Set 5:

> I like the idea, but why not simply add the "name" attribute in
 > addtion to the existing "node-id" attribute?  This way the old
 > 'vty-additions.xml' would still work, while we could write new ones
 > referring to the names?  In any case, if that adds extra work for
 > some reason I'm missing here, nevermind. We can merge it and
 > convert the vty-additions.xml very easily - and as you have stated,
 > this doesn't have to happen at the same time.

The current situation is that the last time the node ids were generated for the 
additions.xml, the id was produced by a simple loop counter while exporting. 
Needless to say that any added or re/moved vty node has jumbled up the node 
ids. At least for OsmoNITB, the situation I found was that the vty-additions 
are at all the wrong nodes.

That previous patch changes it to use the vty FOO_NODE constants. The patch is 
nice and simple. https://gerrit.osmocom.org/#/c/3978/3

But to figure out which VTY additions belong where in the current jumbled up 
state, the easiest is to have the node names available -- when I read something 
about MNCC, I will swiftly have found the <node id='config-mncc'>. If it has 
only a number, I need to parse the XML and cross reference with VTY list 
commands to figure out which child commands the MNCC node has... So I like the 
names, right now.

We could of course add a name attribute to the <node> tag besides the id 
attribute (if that is permitted by docbook XML), but

- if we ever change the _LAST_OSMO_VTY_NODE, all of these IDs would change, 
while the name would stay constant.

- and either way we can only use one of those criteria to bind additions to the 
vty-exported XML.

Personally, I prefer the name for better XML navigation. And when we have it, 
there's no need to keep the node id.

-- 
To view, visit https://gerrit.osmocom.org/3979
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8fa555570268b231c5e01727c661da92fad265de
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-HasComments: No

Reply via email to