-
Bug
-
Resolution: Won't Do
-
Medium
-
None
-
None
-
None
-
None
The python want_stats API has no documentation. What I've discovered:
1. I can turn it on with enable_disable = 1 (which should proabbly be enable=1)
2. I have no idea how to control the stats I get back
3. I can't make any sense of the stats I get back because the data structure has no explanation:
('vnet_interface_counters', vnet_interface_counters(_0=24, vnet_counter_type=6, is_combined=0, first_sw_if_index=0, count=10, data='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'))
From what I can work out, the is_combined and vnet_counter_type can be referred back to the C source code in interface.c (vnet_interface_counter_type_t). The opaque data and count doesn't make any sense and there's no explanation how it might be used, and I don't know why it's returning a 'first' sw if index - does it return multiple counters sometimes?
From talking with Ole there are underlying problems here
- the enumeration needs to be exposed, and related back to the enum in the C code so that they're in lockstep
- the 'data' field should be structured data
... but some documentation of the API functions, exposed by pydoc, would be incredibly useful as well.