]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5-netconf-config] Updated examples and twist global objects
authorFrancis Dupont <fdupont@isc.org>
Fri, 28 Sep 2018 11:26:34 +0000 (13:26 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 28 Sep 2018 13:20:46 +0000 (09:20 -0400)
doc/examples/netconf/comments.json
doc/examples/netconf/simple.json
src/bin/netconf/netconf_parser.yy
src/bin/netconf/tests/parser_unittests.cc

index 1d95de01940d5496d95483ec41b97f43c7c2112c..637996dd2937f6860fd2198da040e95d7df95b00 100644 (file)
@@ -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"
                 }
             }
         }
index 0d68329c29c5aa9690ec35c9e076a8ee6aa3b196..a9902e17382c250dce1653bc75adb1ce54b8f74e 100644 (file)
@@ -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/"
                 }
             }
         },
index c6ace3e2bd0d094c9d1d2d94e80529a5c97073c2..21c1e3ee400e6b33755c6355ab3d46e76ad336fe 100644 (file)
@@ -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.
index c2ad8221f1b7a172155c6a6f25c94b2a0bff2d22..450d6f29938e20f3fbcf2e648303c8338df3d716 100644 (file)
@@ -543,7 +543,8 @@ TEST(ParserTest, errors) {
               "expecting }");
     testError("{ 123 }\n",
               ParserContext::PARSER_NETCONF,
-              "<string>:1.3-5: syntax error, unexpected integer");
+              "<string>:1.3-5: syntax error, unexpected integer, "
+              "expecting Netconf or Logging");
     testError("{ \"foo\" }\n",
               ParserContext::PARSER_JSON,
               "<string>:1.9: syntax error, unexpected }, "