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
Sebastian Schrader
Kea
Commits
63c0a4d5
Commit
63c0a4d5
authored
Mar 09, 2017
by
Tomek Mrugalski
🛰
Browse files
[master] fix for CA parser (use bison, not Element::fromJSON)
parent
816dc5cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/agent/ca_controller.cc
View file @
63c0a4d5
...
...
@@ -8,6 +8,7 @@
#include
<agent/ca_controller.h>
#include
<agent/ca_process.h>
#include
<agent/parser_context.h>
using
namespace
isc
::
process
;
...
...
@@ -40,6 +41,12 @@ CtrlAgentController::createProcess() {
return
(
new
CtrlAgentProcess
(
getAppName
().
c_str
(),
getIOService
()));
}
isc
::
data
::
ConstElementPtr
CtrlAgentController
::
parseFile
(
const
std
::
string
&
name
)
{
ParserContext
parser
;
return
(
parser
.
parseFile
(
name
,
ParserContext
::
PARSER_AGENT
));
}
CtrlAgentController
::
CtrlAgentController
()
:
DControllerBase
(
agent_app_name_
,
agent_bin_name_
)
{
}
...
...
src/bin/agent/ca_controller.h
View file @
63c0a4d5
...
...
@@ -40,6 +40,13 @@ public:
/// by convention this should match the executable name.
static
const
char
*
agent_bin_name_
;
/// @brief Parses the configuration file using Agent::ParserContext (bison)
///
/// @param name name of the text file to be parsed
/// @return Element tree structure representing parsed configuration
isc
::
data
::
ConstElementPtr
parseFile
(
const
std
::
string
&
name
);
private:
/// @brief Creates an instance of the Control Agent application
...
...
src/bin/agent/tests/ca_process_tests.sh.in
View file @
63c0a4d5
...
...
@@ -16,6 +16,7 @@ EXPECTED_VERSION="@PACKAGE_VERSION@"
CONFIG="{
\"Control-agent\":
{
\"http-host\": \"127.0.0.1\"
},
\"Logging\":
{
...
...
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