Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
415
Issues
415
List
Boards
Labels
Service Desk
Milestones
Merge Requests
65
Merge Requests
65
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
0a35cbe7
Commit
0a35cbe7
authored
Dec 28, 2018
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[30-implement-control-socket-for-ddns-2] Updated CA
parent
fe841603
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/bin/agent/ca_command_mgr.cc
src/bin/agent/ca_command_mgr.cc
+3
-3
src/bin/agent/tests/ca_command_mgr_unittests.cc
src/bin/agent/tests/ca_command_mgr_unittests.cc
+15
-0
No files found.
src/bin/agent/ca_command_mgr.cc
View file @
0a35cbe7
...
...
@@ -118,12 +118,12 @@ CtrlAgentCommandMgr::handleCommandInternal(std::string cmd_name,
s
<<
text
->
stringValue
();
s
<<
" You did not include
\"
service
\"
parameter in the command,"
" which indicates that Kea Control Agent should process this"
" command rather than forward it to one or more DHCP servers. If you"
" command rather than forward it to one or more DHCP servers. If you"
" aimed to send this command to one of the DHCP servers you"
" should include the
\"
service
\"
parameter in your request, e.g."
"
\"
service
\"
: [
\"
dhcp4
\"
] to forward the command to the DHCPv4"
" server, or
\"
service
\"
: [
\"
dhcp4
\"
,
\"
dhcp6
\"
] to forward it to"
"
both DHCPv4 and DHCPv6
servers etc."
;
" server, or
\"
service
\"
: [
\"
dhcp4
\"
,
\"
dhcp6
\"
,
\"
d2
\"
] to forward it to"
"
DHCPv4, DHCPv6 and D2
servers etc."
;
answer
->
set
(
CONTROL_TEXT
,
Element
::
create
(
s
.
str
()));
}
...
...
src/bin/agent/tests/ca_command_mgr_unittests.cc
View file @
0a35cbe7
...
...
@@ -296,6 +296,11 @@ TEST_F(CtrlAgentCommandMgrTest, forwardToDHCPv6Server) {
testForward
(
"dhcp6"
,
"dhcp6"
,
isc
::
config
::
CONTROL_RESULT_SUCCESS
);
}
/// Check that control command is successfully forwarded to the D2 server.
TEST_F
(
CtrlAgentCommandMgrTest
,
forwardToD2Server
)
{
testForward
(
"d2"
,
"d2"
,
isc
::
config
::
CONTROL_RESULT_SUCCESS
);
}
/// Check that the same command is forwarded to multiple servers.
TEST_F
(
CtrlAgentCommandMgrTest
,
forwardToBothDHCPServers
)
{
configureControlSocket
(
"dhcp6"
);
...
...
@@ -304,6 +309,16 @@ TEST_F(CtrlAgentCommandMgrTest, forwardToBothDHCPServers) {
isc
::
config
::
CONTROL_RESULT_SUCCESS
,
-
1
,
2
);
}
/// Check that the same command is forwarded to all servers.
TEST_F
(
CtrlAgentCommandMgrTest
,
forwardToAllServers
)
{
configureControlSocket
(
"dhcp6"
);
configureControlSocket
(
"d2"
);
testForward
(
"dhcp4"
,
"dhcp4,dhcp6,d2"
,
isc
::
config
::
CONTROL_RESULT_SUCCESS
,
isc
::
config
::
CONTROL_RESULT_SUCCESS
,
isc
::
config
::
CONTROL_RESULT_SUCCESS
,
3
);
}
/// Check that the command may forwarded to the second server even if
/// forwarding to a first server fails.
TEST_F
(
CtrlAgentCommandMgrTest
,
failForwardToServer
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment