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()));
}
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");
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) {