Commit 0a35cbe7 authored by Francis Dupont's avatar Francis Dupont

[30-implement-control-socket-for-ddns-2] Updated CA

parent fe841603
......@@ -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()));
......@@ -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) {
......@@ -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) {
testForward("dhcp4", "dhcp4,dhcp6,d2", 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) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment