[2091b] cleanup: use getLabels() instead of name in dumpTree.
It should be more accurate notation. Also, we should eventually get rid of
getName() (we can't right now as it's used in node path). This change is
one step toward that goal.
[2091b] encode node label data in more memory-efficient way.
i.e., instead of holding them as Name objects, hold them as serialized
opaque data generated by the corresponding LabelSequence, following the
node structure. the size of the storage for the labels data is encoded
as part of node "flags".
insert/find now internally uses LabelSequence, and compare() can now return
NONE. It requires some adjustments to other part of the code and tests, but
they should be generally straightforward.
in tests, note especially that we now have a separeate "." level. that's
the main reason for the big change to dumpTree().
- better exception handling in dhcpv{4,6}Srv constructors
- port number is now parsed with boost::lexical_cast
- new tests for port numbers implemented
- ControlledDhcpv{4,6}Srv objects are now automatic
- runDhcpv4() method renamed to runCommand() to better prepare
for upcoming 4/6 test merge.
[2119] directly import cfgmgr plugins from their source
as opposed to searching the import path; this gives us more flexibility over cfgmgr plugin names, and makes sure they don't conflict with actual modules.
[2136] added a test dbfile of b10-config for testing stats with the
Mock boss
Stats module asks cfgmgr components of boss config. This test db file
contains test components of boss. Data of components are assumed to be
used only for counting number of multi intances. Here the module of
the multi instances is Auth.
[2136] updated stats.py and added a related testcase
- update last_update_time when initially updating statistics of stats
- strict validation check of poll-interval
- move the code requesting to boss inside of the main loop
[2091a] cleanup: removed the previous "from raw" ctor and getLabelsData().
these were basically for this serialization, but now that we have a
different version of serialization/deserialization, we don't need them
for this purpose. Until we see the need for them for specific purposes,
it'd be better to clean them up.
[2091a] refactor LabelSequence: ensure last_label_ is always valid index.
This simplifies some internal part of the code, and eliminates the need for
offsets_size_ (so it's removed). This change is a preparation for making
the "from raw data" construction more generic to support non absolute labels.
This is a purely internal refactoring, and public interfaces aren't changed.
[2091a] even further simplification; no need for explicit absolute check.
if one is absoulte and the other is not, they won't have common labels,
so the main logic can detect their relationship is NONE. We don't need
to handle this case separately for performance (if that was the reason)
because we generally don't expect to do this type of mismatch comparison.
unit tests need to be adjusted because the order is now non 0.
[2091a] updated LabelSequence::compare() for the NONE-relationship cases.
the originally intended behavior was to return non 0 order for these cases,
so this point was adjusted.
the code was also simplified by removing unnecessary conditions like:
- ((last_label_ < getLabelCount()) ||
- (other.last_label_ < other.getLabelCount())))) {
this is meaningless because getLabelCount() is last_label_ - first_label_,
so the codntion is actually first_label_ < 0, which is always false.
whatever the real intent of this condition was, such additional checks
didn't seem to be necessary for the intended behavior of compare() anyway,
so I simply removed them.
some test cases were adjusted for the change, and some were added to confirm
related cases that were not tested before.
[2090] use offset_ptr::get() for comparison with raw pointers by !=
at least my version of boost doesn't seem to allow the direct comparison
with != between offset_ptr and raw pointers.
also made some trivial style fixes.
As most of the handling moved to the ConfigurableClientList, it got so
simple the separate validate() method needed more care to pass values
around than the work it actually did, so it got inlined.