mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[#1950] Addressed comments
This commit is contained in:
@@ -46,7 +46,7 @@ packet processing, but the exact order depends on the actual processing. Hook po
|
|||||||
that are not specific to packet processing (e.g. lease expiration) will be added
|
that are not specific to packet processing (e.g. lease expiration) will be added
|
||||||
to the end of this list.
|
to the end of this list.
|
||||||
|
|
||||||
@subsection d2HooksD2SrvConfigured dhcp2_srv_configured
|
@subsection d2HooksD2SrvConfigured d2_srv_configured
|
||||||
- @b Arguments:
|
- @b Arguments:
|
||||||
- name: @b io_context, type: isc::asiolink::IOServicePtr, direction: <b>in</b>
|
- name: @b io_context, type: isc::asiolink::IOServicePtr, direction: <b>in</b>
|
||||||
- name: @b json_config, type: isc::data::ConstElementPtr, direction: <b>in</b>
|
- name: @b json_config, type: isc::data::ConstElementPtr, direction: <b>in</b>
|
||||||
|
@@ -111,14 +111,14 @@ libcallout_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
|
|||||||
# The d2_srv_configured callout library
|
# The d2_srv_configured callout library
|
||||||
libconfigured_la_SOURCES = configured_library.cc
|
libconfigured_la_SOURCES = configured_library.cc
|
||||||
libconfigured_la_CXXFLAGS = $(AM_CXXFLAGS)
|
libconfigured_la_CXXFLAGS = $(AM_CXXFLAGS)
|
||||||
libconfigured_la_CPPFLAGS = $(AM_CPPFLAGS)
|
libconfigured_la_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
|
||||||
libconfigured_la_LIBADD = $(top_builddir)/src/lib/hooks/libkea-hooks.la
|
libconfigured_la_LIBADD = $(top_builddir)/src/lib/hooks/libkea-hooks.la
|
||||||
libconfigured_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
|
libconfigured_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
|
||||||
libconfigured_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
|
libconfigured_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
|
||||||
libconfigured_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
|
libconfigured_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
|
||||||
libconfigured_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
|
libconfigured_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
|
||||||
libconfigured_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
|
libconfigured_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
|
||||||
libconfigured_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)
|
libconfigured_la_LIBADD += $(LOG4CPLUS_LIBS) $(BOOST_LIBS) $(GTEST_LDADD)
|
||||||
libconfigured_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
|
libconfigured_la_LDFLAGS = -avoid-version -export-dynamic -module -rpath /nowhere
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libcallout.la libconfigured.la
|
noinst_LTLIBRARIES = libcallout.la libconfigured.la
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <cc/data.h>
|
#include <cc/data.h>
|
||||||
#include <hooks/hooks.h>
|
#include <hooks/hooks.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
using namespace isc::data;
|
using namespace isc::data;
|
||||||
using namespace isc::hooks;
|
using namespace isc::hooks;
|
||||||
@@ -22,18 +23,22 @@ extern "C" {
|
|||||||
int
|
int
|
||||||
d2_srv_configured(CalloutHandle& handle) {
|
d2_srv_configured(CalloutHandle& handle) {
|
||||||
// Get the parameters.
|
// Get the parameters.
|
||||||
|
EXPECT_EQ(CalloutHandle::NEXT_STEP_CONTINUE, handle.getStatus());
|
||||||
ConstElementPtr cfg;
|
ConstElementPtr cfg;
|
||||||
string error;
|
|
||||||
handle.getArgument("json_config", cfg);
|
handle.getArgument("json_config", cfg);
|
||||||
|
EXPECT_TRUE(cfg);
|
||||||
|
if (!cfg) {
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
string error;
|
||||||
handle.getArgument("error", error);
|
handle.getArgument("error", error);
|
||||||
|
EXPECT_TRUE(error.empty());
|
||||||
|
|
||||||
if (cfg) {
|
ConstElementPtr uc = cfg->get("user-context");
|
||||||
ConstElementPtr uc = cfg->get("user-context");
|
if (uc) {
|
||||||
if (uc) {
|
ConstElementPtr msg = uc->get("error");
|
||||||
ConstElementPtr msg = uc->get("error");
|
if (msg && (msg->getType() == Element::string)) {
|
||||||
if (msg && (msg->getType() == Element::string)) {
|
error = msg->stringValue();
|
||||||
error = msg->stringValue();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ has been invoked.
|
|||||||
|
|
||||||
% DHCP_DDNS_CONFIGURED_CALLOUT_DROP configuration was rejected because a callout set the next step to 'drop': %1
|
% DHCP_DDNS_CONFIGURED_CALLOUT_DROP configuration was rejected because a callout set the next step to 'drop': %1
|
||||||
This error message indicates that the DHCP-DDNS had failed configuration
|
This error message indicates that the DHCP-DDNS had failed configuration
|
||||||
attempt because the next stop of the configured callout was set to 'drop'
|
attempt because the next step of the configured callout was set to 'drop'
|
||||||
by a hook library. The error message provided by the hook library is displayed.
|
by a hook library. The error message provided by the hook library is displayed.
|
||||||
|
|
||||||
% DHCP_DDNS_CONFIG_CHECK_FAIL DHCP-DDNS server configuration check failed: %1
|
% DHCP_DDNS_CONFIG_CHECK_FAIL DHCP-DDNS server configuration check failed: %1
|
||||||
|
Reference in New Issue
Block a user