Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5165 closed enhancement (complete)

Control Agent: remove hardcoded values, use config

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

Description

#5134 introduced configuration parsing that stores the configuration in CtrlAgentCfgContext?. However, those values are not used. They should be.

Subtickets

Attachments (1)

trac5165.patch (2.4 KB) - added by tomek 3 years ago.

Download all attachments as: .zip

Change History (8)

Changed 3 years ago by tomek

comment:1 Changed 3 years ago by tomek

Attached a patch that does the work. One problem is that the config specifies http-host, but the HttpListener? class takes only IOAddress. This means that IP literals will work, while hostnames won't. This affects several unit-tests.

comment:2 Changed 3 years ago by marcin

  • Owner set to marcin
  • Status changed from new to accepted

comment:3 Changed 3 years ago by marcin

  • Owner changed from marcin to UnAssigned
  • Status changed from accepted to reviewing

Changes applied as necessary. Please review.

comment:4 Changed 3 years ago by tomek

  • Owner changed from UnAssigned to tomek

comment:5 Changed 3 years ago by tomek

  • Add Hours to Ticket changed from 0 to 1
  • Owner changed from tomek to marcin
  • Total Hours changed from 0 to 1

Looks good. Code compiles, unit-test passed on ubuntu 16.04.1 x64.

It seems you prefer the port to be 8081. The default in AgentSimpleParser::AGENT_DEFAULTS is 8000 (just an arbitrary port I picked). Feel free to update it to 8081, if you so desire. That change won't affect unit-tests.

Regardless if you decide to change the port, the code is ready to go.

comment:6 Changed 3 years ago by marcin

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

Merged with commit c43220c52f1960343d26e6f2edc55833ceef009c

comment:7 Changed 3 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea1.2

Per 9 Mar team meeting, move from proposed to 1.2

Note: See TracTickets for help on using tickets.