Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
446
Issues
446
List
Boards
Labels
Service Desk
Milestones
Merge Requests
72
Merge Requests
72
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
81474963
Commit
81474963
authored
Sep 28, 2018
by
Tomek Mrugalski
🛰
Committed by
Francis Dupont
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#5
,
!49
] Added DHCPv4-specific netconf example config.
parent
46408c1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
1 deletion
+87
-1
doc/Makefile.am
doc/Makefile.am
+1
-0
doc/examples/netconf/simple-dhcp4.json
doc/examples/netconf/simple-dhcp4.json
+84
-0
src/bin/netconf/tests/parser_unittests.cc
src/bin/netconf/tests/parser_unittests.cc
+2
-1
No files found.
doc/Makefile.am
View file @
81474963
...
@@ -59,6 +59,7 @@ nobase_dist_doc_DATA += examples/kea6/stateless.json
...
@@ -59,6 +59,7 @@ nobase_dist_doc_DATA += examples/kea6/stateless.json
nobase_dist_doc_DATA
+=
examples/kea6/with-ddns.json
nobase_dist_doc_DATA
+=
examples/kea6/with-ddns.json
nobase_dist_doc_DATA
+=
examples/netconf/comments.json
nobase_dist_doc_DATA
+=
examples/netconf/comments.json
nobase_dist_doc_DATA
+=
examples/netconf/simple.json
nobase_dist_doc_DATA
+=
examples/netconf/simple.json
nobase_dist_doc_DATA
+=
examples/netconf/simple-dhcp4.json
devel
:
devel
:
mkdir
-p
html
mkdir
-p
html
...
...
doc/examples/netconf/simple-dhcp4.json
0 → 100644
View file @
81474963
//
This
is
a
simple
example
of
a
configuration
for
Netconf
that
handles
//
DHCPv
4
configuration.
This
example
provides
YANG
interface
for
//
DHCPv
4
server
only.
{
"Netconf"
:
{
//
This
map
specifies
how
each
server
is
managed:
//
the
YANG
model
to
use
and
the
control
channel.
"managed-servers"
:
{
//
This
is
how
Netconf
can
communicate
with
the
DHCPv
4
server.
"dhcp4"
:
{
//
Eventually
,
the
kea-netconf
will
be
able
to
handle
multiple
//
models.
However
,
for
the
time
being
the
only
choice
for
//
DHCPv
4
server
is
kea-dhcp
4
-server
model.
"model"
:
"kea-dhcp4-server"
,
//
Currently
three
control
channel
types
are
supported:
//
-
"stdout"
which
output
the
configuration
on
the
standard
//
output
(this
is
mainly
for
testing
purposes
,
but
you
can
//
use
simple
script
(such
as
curl
or
socat)
to
pass
that
//
information
to
the
server.
//
-
"unix"
which
uses
the
local
control
channel
supported
by
//
"dhcp4"
and
"dhcp6"
servers
(
"d2"
support
is
coming
in
Kea
1.5
)
//
-
"http"
which
uses
the
Control
Agent
(CA)
to
manage
itself
or
//
to
forward
commands
to
"dhcp4"
or
"dhcp6"
.
"control-socket"
:
{
"socket-type"
:
"unix"
,
"socket-name"
:
"/tmp/kea4-ctrl-socket"
},
//
Comment
is
optional.
You
can
put
some
notes
here.
"comment"
:
"Kea DHCP4 server serving network on floor 13"
}
},
//
Netconf
is
able
to
load
hook
libraries
that
augment
its
operation.
//
The
primary
functionality
is
the
ability
to
add
new
commands.
"hooks-libraries"
:
[
//
Hook
libraries
list
may
contain
more
than
one
library.
{
//
The
only
necessary
parameter
is
the
library
filename.
"library"
:
"/opt/local/netconf-commands.so"
,
//
Some
libraries
may
support
parameters.
Make
sure
you
//
type
this
section
carefully
,
as
the
CA
does
not
validate
//
it
(because
the
format
is
library
specific).
"parameters"
:
{
"param1"
:
"foo"
}
}
]
},
//
Similar
to
other
Kea
components
,
Netconf
also
uses
logging.
"Logging"
:
{
"loggers"
:
[
{
"name"
:
"kea-netconf"
,
"output_options"
:
[
{
"output"
:
"/var/log/kea-netconf.log"
,
//
Several
additional
parameters
are
possible
in
addition
//
to
the
typical
output.
Flush
determines
whether
logger
//
flushes
output
to
a
file.
Maxsize
determines
maximum
//
filesize
before
the
file
is
being
rotated.
maxver
//
specifies
the
maximum
number
of
rotated
files
being
//
kept.
"flush"
:
true
,
"maxsize"
:
204800
,
"maxver"
:
4
}
],
"severity"
:
"INFO"
,
"debuglevel"
:
0
}
]
}
}
src/bin/netconf/tests/parser_unittests.cc
View file @
81474963
...
@@ -172,7 +172,7 @@ TEST(ParserTest, keywordNetconf) {
...
@@ -172,7 +172,7 @@ TEST(ParserTest, keywordNetconf) {
TEST
(
ParserTest
,
keywordSubNetconf
)
{
TEST
(
ParserTest
,
keywordSubNetconf
)
{
// This is similar to previous test, but note the lack of outer
// This is similar to previous test, but note the lack of outer
// map and Netconf
-agent
.
// map and Netconf.
string
txt
=
"{
\n
"
string
txt
=
"{
\n
"
"
\"
managed-servers
\"
: {"
"
\"
managed-servers
\"
: {"
"
\"
dhcp4
\"
: {"
"
\"
dhcp4
\"
: {"
...
@@ -348,6 +348,7 @@ TEST(ParserTest, file) {
...
@@ -348,6 +348,7 @@ TEST(ParserTest, file) {
vector
<
string
>
configs
;
vector
<
string
>
configs
;
configs
.
push_back
(
"comments.json"
);
configs
.
push_back
(
"comments.json"
);
configs
.
push_back
(
"simple.json"
);
configs
.
push_back
(
"simple.json"
);
configs
.
push_back
(
"simple-dhcp4.json"
);
for
(
int
i
=
0
;
i
<
configs
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
configs
.
size
();
i
++
)
{
testFile
(
string
(
CFG_EXAMPLES
)
+
"/"
+
configs
[
i
]);
testFile
(
string
(
CFG_EXAMPLES
)
+
"/"
+
configs
[
i
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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