Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4202 closed defect (complete)

D2's configuration parameter names should use hyphens not underscores

Reported by: tmark Owned by: tmark
Priority: medium Milestone: Kea1.0-beta
Component: ddns Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 12 Add Hours to Ticket: 0
Total Hours: 2 Internal?: no

Description (last modified by tmark)

From its inception, D2's configuration element names have been used underscores instead of hyphens, unlike every thing else. This would be a mostly rote task, confined to src/bin/D2 and documentation.
It should probably be done for consistency between modules. I'm surprised we don't have a ticket for this already.

This would impact some portion of Forge as well.

Subtickets

Change History (9)

comment:1 Changed 4 years ago by tmark

  • Milestone changed from Kea-proposed to Kea1.0
  • Owner set to tmark
  • Status changed from new to accepted

comment:2 Changed 4 years ago by tmark

  • Owner changed from tmark to Unassigned
  • Status changed from accepted to reviewing
  • Total Hours changed from 0 to 2

The changes are complete within Kea, this includes the source, unit tests, documentation, default, and sample configuration files. Forge will need to be updated to produce the correct names, under https://qatrac.isc.org/trac/ticket/148#ticket

I propose the following

1xxx.   [func]      [tmark]
    Replaced underscores, "_", with hyphens "-", in the kea-ddns
    server's configuration parameter names. For example, "ip_address"
    is now "ip-address", "dns_server" is now "dns-server".  This
    makes it consistent with the naming convention used by the
    other servers.
    (Trac #4202    git TBD)

comment:3 Changed 4 years ago by tmark

  • Description modified (diff)

comment:4 Changed 4 years ago by marcin

  • Owner changed from Unassigned to marcin

comment:5 Changed 4 years ago by marcin

  • Owner changed from marcin to tmark

I reviewed your changes and they look ok. One thing we discussed over jabber is that perhaps the names of parameters in the JSON representation of the NCRs should also be changed to use hyphens rather than underscores. This will make it uniform with the configuration parameters.

You may decide to do it within this ticket or submit another ticket. If the latter, you're ok to merge your current changes into master.

comment:6 Changed 4 years ago by tmark

  • Owner changed from tmark to marcin

I elected to update the NCRS with this ticket.
Please re-review it. The updated ChangeLog would be:

1xxx.   [func]      [tmark]
    Replaced underscores, "_", with hyphens "-", in the parameter
    names used in the kea-ddns server's configuration as well as
    those in the DDNS messages (NCRs) sent to the server. For
    example, "ip_address" is now "ip-address", "change_type" is
    now "change-type".  This makes JSON element naming consistent
    throughout Kea.
    (Trac #4202    git TBD)

Which I know you thing is too long, but sometimes they ought to be. ;)

comment:7 Changed 4 years ago by marcin

  • Owner changed from marcin to tmark

/src/bin/d2/tests/nc_test_utils.h
Some comments/examples in this file still use underscores, e.g. line 321.

The same in /src/lib/dhcp_ddns/ncr_msg.h

Otherwise the changes look good and unit tests pass.

comment:8 Changed 4 years ago by tmark

  • Resolution set to complete
  • Status changed from reviewing to closed

Commentary corrected.
Changes merged with git #91bf527662060d4b1e294cd53e79b431edf0e910
Added ChangeLog entry 1054.

Ticket is complete.

comment:9 Changed 4 years ago by tomek

  • Milestone changed from Kea1.0 to Kea1.0-beta

Milestone renamed

Note: See TracTickets for help on using tickets.