Attention is currently required from: laforge, neels, pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/37881?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed: Code-Review-1 by neels, Verified+1 by Jenkins Builder
Change subject: CTRL: get rate_ctr_group by the id from rate_ctr_group_set_name() ......................................................................
CTRL: get rate_ctr_group by the id from rate_ctr_group_set_name()
In CTRL, add keyword "by_id" to use the given name for group instance lookup. IOW, in addition to currently:
GET 123 rate_ctr.abs.hnb.0.iuh:established
also implement:
GET 123 rate_ctr.abs.hnb.by_id.001-01-L2342-R0-S55-C1.iuh:established
Some objects always have fixed indexes, because they come from the config file (think "bts.0" or "msc.0").
However, some object IDs are created dynamically, which makes it "impossible" to verify them in tests. In osmo-hnbgw, the same hNodeB may show up as hnb.0, hnb.1, etc.
We do already have the rate_ctr_group_set_name() API which allows tagging an identifier on a rate counter group. For above example, osmo-hnbgw sets rate_ctr_group_set_name(cell_id_str).
When merging this patch, magically all rate_ctr_groups in all osmo programs will become accessible by their given rate_ctr_group_set_name() IDs.
This also means that the strings passed to rate_ctr_group_set_name() now are required to be a valid identifier, to not mix up the CTRL interface syntax. So far, only log an error, to figure out if we need mangling.
Related: OS#6545 Change-Id: I841a12f76e6fcb2bd7aecb5f4b1707d9ec927137 --- M include/osmocom/core/rate_ctr.h M src/core/libosmocore.map M src/core/rate_ctr.c M src/ctrl/control_if.c 4 files changed, 65 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/37881/4