Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
947a8d68
Commit
947a8d68
authored
Mar 21, 2017
by
Francis Dupont
Browse files
[5150a] Fixed some missing stuff after rebase
parent
5b8d7823
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/shell/tests/shell_process_tests.sh.in
View file @
947a8d68
...
...
@@ -178,7 +178,7 @@ version_test() {
version_test "shell.version"
shell_command_test "shell.list-commands" "list-commands" \
"[ { \"arguments\": [ \"build-report\", \"config-te
st
\", \"list-commands\", \"shutdown\", \"version-get\" ], \"result\": 0 } ]" ""
"[ { \"arguments\": [ \"build-report\", \"config-
get\", \"config-test\", \"config-wri
te\", \"list-commands\", \"shutdown\", \"version-get\" ], \"result\": 0 } ]" ""
shell_command_test "shell.bogus" "give-me-a-beer" \
"[ { \"result\": 1, \"text\": \"'give-me-a-beer' command not supported.\" } ]" ""
shell_command_test "shell.empty-config-test" "config-test" \
...
...
src/lib/process/d_controller.cc
View file @
947a8d68
...
...
@@ -489,22 +489,23 @@ DControllerBase::configWriteHandler(const std::string&,
ConstElementPtr
DControllerBase
::
configTestHandler
(
const
std
::
string
&
,
ConstElementPtr
args
)
{
const
int
status_code
=
CONTROL_RESULT_SUCCESS
;
// 1 indicates an error
ConstElementPtr
dhcp4
;
const
int
status_code
=
COMMAND_ERROR
;
// 1 indicates an error
ConstElementPtr
module_config
;
std
::
string
module
=
getAppName
();
std
::
string
message
;
// Command arguments are expected to be:
// { "
Dhcp4
": { ... }, "Logging": { ... } }
// The L
n
ogging component is technically optional. If it's not supplied
// { "
Module
": { ... }, "Logging": { ... } }
// The Logging component is technically optional. If it's not supplied
// logging will revert to default logging.
if
(
!
args
)
{
message
=
"Missing mandatory 'arguments' parameter."
;
}
else
{
dhcp4
=
args
->
get
(
"Dhcp4"
);
if
(
!
dhcp4
)
{
message
=
"Missing mandatory '
Dhcp4
' parameter."
;
}
else
if
(
dhcp4
->
getType
()
!=
Element
::
map
)
{
message
=
"'
Dhcp4
' parameter expected to be a map."
;
module_config
=
args
->
get
(
module
);
if
(
!
module_config
)
{
message
=
"Missing mandatory '
"
+
module
+
"
' parameter."
;
}
else
if
(
module_config
->
getType
()
!=
Element
::
map
)
{
message
=
"'
"
+
module
+
"
' parameter expected to be a map."
;
}
}
...
...
@@ -521,7 +522,7 @@ DControllerBase::configTestHandler(const std::string&, ConstElementPtr args) {
isc
::
dhcp
::
CfgMgr
::
instance
().
rollback
();
// Now we check the server proper.
return
(
checkConfig
(
dhcp4
));
return
(
checkConfig
(
module_config
));
}
ConstElementPtr
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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