From: Francis Dupont Date: Fri, 28 Sep 2018 11:26:34 +0000 (+0200) Subject: [5-netconf-config] Updated examples and twist global objects X-Git-Tag: 5-netconf-doc-config_base~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c7a719b1c4bbbeb364dbb78c095096ca1c93bc7;p=thirdparty%2Fkea.git [5-netconf-config] Updated examples and twist global objects --- diff --git a/doc/examples/netconf/comments.json b/doc/examples/netconf/comments.json index 1d95de0194..637996dd29 100644 --- a/doc/examples/netconf/comments.json +++ b/doc/examples/netconf/comments.json @@ -19,8 +19,8 @@ "control-socket": { "comment": "using unix/local socket", - "type": "unix", - "name": "/path/to/the/unix/socket-v4" + "socket-type": "unix", + "socket-name": "/path/to/the/unix/socket-v4" } } } diff --git a/doc/examples/netconf/simple.json b/doc/examples/netconf/simple.json index 0d68329c29..a9902e1738 100644 --- a/doc/examples/netconf/simple.json +++ b/doc/examples/netconf/simple.json @@ -20,8 +20,8 @@ "model": "kea-dhcp4-server", "control-socket": { - "type": "unix", - "name": "/path/to/the/unix/socket-v4" + "socket-type": "unix", + "socket-name": "/path/to/the/unix/socket-v4" } }, @@ -31,8 +31,8 @@ "model": "kea-dhcp6-server", "control-socket": { - "type": "unix", - "name": "/path/to/the/unix/socket-v6" + "socket-type": "unix", + "socket-name": "/path/to/the/unix/socket-v6" } }, @@ -43,7 +43,7 @@ "model": "kea-dhcp-ddns", "control-socket": { - "type": "stdout", + "socket-type": "stdout", "user-context": { "in-use": false } } }, @@ -54,9 +54,8 @@ "model": "kea-ctrl-agent", "control-socket": { - "type": "http", - "host": "127.0.0.1", - "port": 8000 + "socket-type": "http", + "socket-url": "http://127.0.0.1:8000/" } } }, diff --git a/src/bin/netconf/netconf_parser.yy b/src/bin/netconf/netconf_parser.yy index c6ace3e2bd..21c1e3ee40 100644 --- a/src/bin/netconf/netconf_parser.yy +++ b/src/bin/netconf/netconf_parser.yy @@ -235,10 +235,9 @@ global_objects: global_object | global_objects COMMA global_object ; -// This represents a single top level entry, e.g. Control-netconf, Dhcp6 or DhcpDdns. +// This represents a single top level entry, e.g. Netconf or Logging. global_object: netconf_object | logging_object - | unknown_map_entry ; // This define the Control-netconf object. diff --git a/src/bin/netconf/tests/parser_unittests.cc b/src/bin/netconf/tests/parser_unittests.cc index c2ad8221f1..450d6f2993 100644 --- a/src/bin/netconf/tests/parser_unittests.cc +++ b/src/bin/netconf/tests/parser_unittests.cc @@ -543,7 +543,8 @@ TEST(ParserTest, errors) { "expecting }"); testError("{ 123 }\n", ParserContext::PARSER_NETCONF, - ":1.3-5: syntax error, unexpected integer"); + ":1.3-5: syntax error, unexpected integer, " + "expecting Netconf or Logging"); testError("{ \"foo\" }\n", ParserContext::PARSER_JSON, ":1.9: syntax error, unexpected }, "