Attention is currently required from: 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 (#3).
The following approvals got outdated and were removed: Code-Review-1 by pespin, 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()
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).
In CTRL, when a counter group index token is not a clean number, look up that token as the group instance's name instead. This allows for example:
GET 123 rate_ctr.abs.hnb.001-01-L2342-R0-S55-C1.iuh:established
in addition to currently:
GET 123 rate_ctr.abs.hnb.0.iuh:established
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, 55 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/37881/3