Opened 3 years ago

Last modified 3 years ago

#5173 new defect

Post-5114 get_config autogeneration clean-up

Reported by: tomek Owned by:
Priority: medium Milestone: Outstanding Tasks
Component: management API Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


Francis added brilliant config extraction routines in #5114. The instrumented unit-tests now are able to extract configuration used. Configurations in src/bin/agent and src/bin/d2 use separate get_config.json files, while those in src/bin/dhcp{4,6} require copying and injecting the output data. It seems that the approach used in CA and D2 is much convenient.

Also, the *.skel files doesn't seem to be mentioned in neither nor any Makefile.ams. This means they will likely break down make distcheck.


Change History (4)

comment:1 Changed 3 years ago by tomek

  • Summary changed from #5114 get_config autogeneration clean-up to Post-5114 get_config autogeneration clean-up

comment:2 Changed 3 years ago by fdupont

D2 and agent have a catch all configuration example so it was easier to use it. Note the code can be easily adapted to use a small set of configurations. The problem with DHCPv4 and DHCPv6 is such a thing does not yet exist so I used the existing configurations embedded in the parser unit tests with the assumption they cover all interesting cases (not really true but first if an interesting case is not covered it should be added in both parser and get-config aka unparse unit tests, second I worked on a system where the official supported cases where all (and only all :-) the cases in the (very large) documentation. It used a script to build a test file from the documentation (an idea which should not be seemed so new :-) so the claim can be verified).
And the *.skel files are just a tool to help to regenerate real files, i.e., they are a kind of meta-sources and they can't break 'make distcheck' (BTW the agent unit and system tests in parallel break it). To summary the *.skel files are only useful (but not required) when someone wants to regenerate src/bin/dhcp[4]/tests/ files for instance because a toElement method was modified or a new unit test was added to Dhcp[46]ParserTest suite.
Note things will be simpler when we'll have a Jenkins Kea developer project to check coverage (cf QA 424): it will be easy to build and check if a small set of configurations from files covers all reachable lines of toElement code.

A last word: to find the end of a configuration block just search for }; two character sequence.

comment:3 Changed 3 years ago by tomek

  • Milestone changed from Kea1.2 to Kea1.2-final

Code freeze for 1.2-beta. Moving all remaining open tickets to 1.2-final.

comment:4 Changed 3 years ago by tomek

  • Milestone changed from Kea1.2-final to Outstanding Tasks

As discussed on 2017-04-13 call, moving to outstanding.

Note: See TracTickets for help on using tickets.