From e833c57668496ed349cfda5540b4a4f0fa13f1e2 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 12 Jun 2018 23:32:35 +0200 Subject: [PATCH 001/169] [5422] Initial kea-docgen implemented --- configure.ac | 1 + doc/guide/Makefile.am | 1 + doc/guide/kea-guide.xml | 2 + tools/cmd-docgen/Makefile.am | 20 +++ tools/cmd-docgen/cmd_docgen.cc | 239 +++++++++++++++++++++++++++++++++ 5 files changed, 263 insertions(+) create mode 100644 tools/cmd-docgen/Makefile.am create mode 100644 tools/cmd-docgen/cmd_docgen.cc diff --git a/configure.ac b/configure.ac index ba86b3e0ad..bf731bce19 100644 --- a/configure.ac +++ b/configure.ac @@ -1648,6 +1648,7 @@ AC_CONFIG_FILES([Makefile src/share/database/scripts/pgsql/upgrade_4.0_to_5.0.sh tools/Makefile tools/path_replacer.sh + tools/cmd-docgen/Makefile ]) AC_CONFIG_COMMANDS([permissions], [ diff --git a/doc/guide/Makefile.am b/doc/guide/Makefile.am index f13cca197b..ece9ed07fe 100644 --- a/doc/guide/Makefile.am +++ b/doc/guide/Makefile.am @@ -10,6 +10,7 @@ DOCBOOK += keactrl.xml dhcp4-srv.xml dhcp6-srv.xml lease-expiration.xml logging. DOCBOOK += ddns.xml hooks.xml hooks-ha.xml hooks-host-cache.xml hooks-lease-cmds.xml DOCBOOK += hooks-radius.xml hooks-stat-cmds.xml libdhcp.xml lfc.xml stats.xml DOCBOOK += ctrl-channel.xml faq.xml classify.xml shell.xml agent.xml netconf.xml +DOCBOOK += api.xml EXTRA_DIST = $(DOCBOOK) diff --git a/doc/guide/kea-guide.xml b/doc/guide/kea-guide.xml index f0e42a47ed..ef69b636cd 100644 --- a/doc/guide/kea-guide.xml +++ b/doc/guide/kea-guide.xml @@ -92,6 +92,8 @@ + + diff --git a/tools/cmd-docgen/Makefile.am b/tools/cmd-docgen/Makefile.am new file mode 100644 index 0000000000..cbf1894281 --- /dev/null +++ b/tools/cmd-docgen/Makefile.am @@ -0,0 +1,20 @@ +SUBDIRS = . + +AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib +AM_CPPFLAGS += $(BOOST_INCLUDES) + +AM_CXXFLAGS = $(KEA_CXXFLAGS) + +AM_LDFLAGS = -static + +if GENERATE_DOCS +noinst_PROGRAMS = cmd_docgen +cmd_docgen_SOURCES = cmd_docgen.cc + +# For bare distcheck +EXTRA_DIST = cmd_docgen + +cmd_docgen_LDADD = $(top_builddir)/src/lib/cc/libkea-cc.la +cmd_docgen_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la + +endif diff --git a/tools/cmd-docgen/cmd_docgen.cc b/tools/cmd-docgen/cmd_docgen.cc new file mode 100644 index 0000000000..aaa5c1a582 --- /dev/null +++ b/tools/cmd-docgen/cmd_docgen.cc @@ -0,0 +1,239 @@ +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace isc; +using namespace isc::data; + + + +class DocGen { +public: + + const string OUTPUT = "../guide/api.xml"; + + void loadFiles(const vector& files) { + + map commands; + + int cnt = 0; + + try { + for (auto f : files) { + string cmd = f.substr(0, f.find(".")); + + cout << "Loading description of command " << cmd; + ElementPtr x = Element::fromJSONFile(f, false); + cout << "."; + + sanityCheck(f, x); + cout << "."; + cmds_.insert(make_pair(cmd, x)); + cout << "loaded" << endl; + + cnt++; + } + } catch (const Unexpected& e) { + isc_throw(Unexpected, e.what() << " while processing " + << cnt + 1 << " file out of " << files.size()); + } + + cout << "Loaded " << cmds_.size() << " commands out of " << files.size() + << " file(s)" << endl; + } + + + void requireString(const ElementPtr& x, const string& name, const string& fname) { + if (!x->contains(name)) { + isc_throw(Unexpected, "Mandatory '" + name + " field missing while " + "processing file " + fname); + } + if (x->get(name)->getType() != Element::string) { + isc_throw(BadValue, "'" + name + " field is present, but is not a string" + " in file " + fname); + } + if (x->get(name)->stringValue().empty()) { + isc_throw(BadValue, "'" + name + " field is present, is a string, but is " + "empty in file " + fname); + } + } + + void requireList(const ElementPtr& x, const string& name, const string& fname) { + if (!x->contains(name)) { + isc_throw(Unexpected, "Mandatory '" + name + " field missing while " + "processing file " + fname); + } + if (x->get(name)->getType() != Element::list) { + isc_throw(BadValue, "'" + name + " field is present, but is not a list " + "in file " + fname); + } + + ConstElementPtr l = x->get(name); + + if (l->size() == 0) { + isc_throw(BadValue, "'" + name + " field is a list, but is empty in file " + + fname); + } + + // todo: check that every element is a string + } + + void sanityCheck(const string& fname, const ElementPtr& x) { + requireString(x, "name", fname); + requireString(x, "brief", fname); + requireList (x, "support", fname); + requireString(x, "avail", fname); + requireString(x, "brief", fname); + requireString(x, "cmd-syntax", fname); + requireString(x, "cmd-comment", fname); + requireString(x, "resp-comment", fname); + requireString(x, "resp-syntax", fname); + } + + void generateCopyright(stringstream& f) { + f << "" << endl; + f << endl; + f << "" << endl; + } + + void generateOutput() { + + stringstream f; + + generateCopyright(f); + + f << "" + << endl; + f << " Management API Reference" << endl; + + // Generate initial list of commands + f << " Kea currently supports " << cmds_.size() << " commands:" << endl + << " " << endl; + + for (auto cmd : cmds_) { + f << " " << cmd.first << "" << endl; + } + + f << " " << endl; + f << " " << endl; + + // Generate actual commands references. + generateCommands(f); + + f << "" << endl; + + cout << "----------------" << endl; + ofstream file(OUTPUT.c_str(), ofstream::trunc); + file << f.str(); + cout << f.str(); + cout << "----------------" << endl; + } + + void generateCommands(stringstream& f){ + + for (auto cmd : cmds_) { + f << "" << endl; + f << "
" << endl; + f << "" << cmd.first << " reference" << endl; + generateCommand(f, cmd.second); + f << "
" << endl; + f << "" << endl; + f << endl; + } + } + +void replaceAll(std::string& str, const std::string& from, const std::string& to) { + if(from.empty()) + return; + size_t start_pos = 0; + while((start_pos = str.find(from, start_pos)) != std::string::npos) { + str.replace(start_pos, from.length(), to); + start_pos += to.length(); + } +} + +string escapeString(string txt) { + + replaceAll(txt, "<", "<"); + replaceAll(txt, ">", ">"); + return (txt); +} + +void generateCommand(stringstream& f, const ElementPtr& cmd) { + + // command overview + f << "" << cmd->get("name")->stringValue() << " - " + << cmd->get("brief")->stringValue() << "" << endl << endl; + + // command can be issued to the following daemons + f << "Supported by: "; + ConstElementPtr daemons = cmd->get("support"); + for (int i = 0; i < daemons->size(); i++) { + if (i) { + f << ", "; + } + + f << daemons->get(i)->stringValue(); + } + f << "" << endl << endl; + + // availability + f << "Availability: " << cmd->get("avail")->stringValue() << "" + << endl << endl; + + // description and examples + f << "Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; + + // Command syntax: + f << "Command syntax:" << endl + << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) + << "" + << endl + << cmd->get("cmd-comment")->stringValue() << "" << endl << endl; + + // Response syntax + f << "Response syntax:" << endl + << " " << escapeString(cmd->get("resp-syntax")->stringValue()) + << "" + << endl + << cmd->get("resp-comment")->stringValue() << "" << endl << endl; +} + + map cmds_; +}; + +int main(int argc, const char*argv[]) { + + vector files; + + for (int i = 1; i < argc; i++) { + files.push_back(string(argv[i])); + } + + cout << "Loading " << files.size() << " files(s)." << endl; + + try { + DocGen doc_gen; + + doc_gen.loadFiles(files); + + doc_gen.generateOutput(); + } catch (const exception& e) { + cerr << "ERROR: " << e.what() << endl; + } + + return (0); +} -- GitLab From c671e542b6bc0a8710ecef00a29867f1878178ba Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 12 Jun 2018 23:52:57 +0200 Subject: [PATCH 002/169] [5422] Template handling improved. --- tools/cmd-docgen/cmd_docgen.cc | 60 ++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/tools/cmd-docgen/cmd_docgen.cc b/tools/cmd-docgen/cmd_docgen.cc index aaa5c1a582..93641cc794 100644 --- a/tools/cmd-docgen/cmd_docgen.cc +++ b/tools/cmd-docgen/cmd_docgen.cc @@ -26,16 +26,26 @@ public: try { for (auto f : files) { - string cmd = f.substr(0, f.find(".")); - - cout << "Loading description of command " << cmd; + string cmd = f; + size_t pos = f.find_last_of('/'); + if (pos != string::npos) { + cmd = f.substr(pos + 1, -1); + } + cmd = cmd.substr(0, cmd.find(".")); + + if (cmd == "_template") { + cout << "Skipping template file (_template.json)" << endl; + continue; + } + + cout << "Loading description of command " << cmd << "... "; ElementPtr x = Element::fromJSONFile(f, false); - cout << "."; + cout << "loaded, sanity check..."; sanityCheck(f, x); - cout << "."; + cmds_.insert(make_pair(cmd, x)); - cout << "loaded" << endl; + cout << " looks ok." << endl; cnt++; } @@ -63,7 +73,7 @@ public: "empty in file " + fname); } } - + void requireList(const ElementPtr& x, const string& name, const string& fname) { if (!x->contains(name)) { isc_throw(Unexpected, "Mandatory '" + name + " field missing while " @@ -73,17 +83,17 @@ public: isc_throw(BadValue, "'" + name + " field is present, but is not a list " "in file " + fname); } - + ConstElementPtr l = x->get(name); - + if (l->size() == 0) { isc_throw(BadValue, "'" + name + " field is a list, but is empty in file " + fname); } - + // todo: check that every element is a string } - + void sanityCheck(const string& fname, const ElementPtr& x) { requireString(x, "name", fname); requireString(x, "brief", fname); @@ -107,42 +117,42 @@ public: f << endl; f << "" << endl; } - + void generateOutput() { - + stringstream f; generateCopyright(f); - + f << "" << endl; f << " Management API Reference" << endl; - + // Generate initial list of commands f << " Kea currently supports " << cmds_.size() << " commands:" << endl << " " << endl; - + for (auto cmd : cmds_) { f << " " << cmd.first << "" << endl; } - + f << " " << endl; f << " " << endl; - + // Generate actual commands references. generateCommands(f); - + f << "" << endl; - + cout << "----------------" << endl; ofstream file(OUTPUT.c_str(), ofstream::trunc); file << f.str(); - cout << f.str(); + // cout << f.str(); cout << "----------------" << endl; } - + void generateCommands(stringstream& f){ - + for (auto cmd : cmds_) { f << "" << endl; f << "
" << endl; @@ -163,7 +173,7 @@ void replaceAll(std::string& str, const std::string& from, const std::string& to start_pos += to.length(); } } - + string escapeString(string txt) { replaceAll(txt, "<", "<"); @@ -194,7 +204,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { << endl << endl; // description and examples - f << "Description and examples: See Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; // Command syntax: -- GitLab From 38da58d3c6cc08f4baca12bf2141830854b9bb08 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:30:02 +0200 Subject: [PATCH 003/169] [5422] List of supported commands added. --- tools/cmd-docgen/cmds-list | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 tools/cmd-docgen/cmds-list diff --git a/tools/cmd-docgen/cmds-list b/tools/cmd-docgen/cmds-list new file mode 100644 index 0000000000..6a6bb62a9a --- /dev/null +++ b/tools/cmd-docgen/cmds-list @@ -0,0 +1,65 @@ +build-report +cache-clear +cache-get +cache-insert +cache-load +cache-remove +cache-write +config-get +config-reload +config-set +config-test +config-write +dhcp-disable +dhcp-enable +ha-heartbeat +ha-scopes +ha-sync +lease4-add +lease4-del +lease4-get +lease4-get-all +lease4-update +lease4-wipe +lease6-add +lease6-del +lease6-get +lease6-get-all +lease6-update +lease6-wipe +leases-reclaim +libreload +list-commands +network4-add +network4-del +network4-get +network4-list +network4-subnet-add +network4-subnet-del +network6-add +network6-del +network6-get +network6-list +network6-subnet-add +network6-subnet-del +reservation-add +reservation-del +reservation-get +shutdown +stat-lease4-get +stat-lease6-get +statistic-get +statistic-get-all +statistic-remove +statistic-remove-all +statistic-reset +statistic-reset-all +subnet4-add +subnet4-del +subnet4-get +subnet4-list +subnet6-add +subnet6-del +subnet6-get +subnet6-list +version-get -- GitLab From af95c7133903ffda93c000e0a5851c16fc8b1f51 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:31:38 +0200 Subject: [PATCH 004/169] [5422] Some parameters are now optional. --- tools/cmd-docgen/cmd_docgen.cc | 63 ++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/tools/cmd-docgen/cmd_docgen.cc b/tools/cmd-docgen/cmd_docgen.cc index 93641cc794..7febabeed9 100644 --- a/tools/cmd-docgen/cmd_docgen.cc +++ b/tools/cmd-docgen/cmd_docgen.cc @@ -16,7 +16,7 @@ using namespace isc::data; class DocGen { public: - const string OUTPUT = "../guide/api.xml"; + const string OUTPUT = "../../doc/guide/api.xml"; void loadFiles(const vector& files) { @@ -101,9 +101,11 @@ public: requireString(x, "avail", fname); requireString(x, "brief", fname); requireString(x, "cmd-syntax", fname); - requireString(x, "cmd-comment", fname); - requireString(x, "resp-comment", fname); - requireString(x, "resp-syntax", fname); + + // They're optional. + //requireString(x, "cmd-comment", fname); + //requireString(x, "resp-syntax", fname); + //requireString(x, "resp-comment", fname); } void generateCopyright(stringstream& f) { @@ -126,7 +128,7 @@ public: f << "" << endl; - f << " Management API Reference" << endl; + f << " API Reference" << endl; // Generate initial list of commands f << " Kea currently supports " << cmds_.size() << " commands:" << endl @@ -181,6 +183,32 @@ string escapeString(string txt) { return (txt); } +string standardResponseSyntax() { + stringstream t; + + t << "{" << endl + << " \"result\": ," << endl + << " \"text\": " << endl + << "}" << endl; + return (t.str()); +} + +string standardResponseComment() { + stringstream t; + + t << "Result is an integer representation of the status. Currently supported" + << " statuses are:" << endl + << "" << endl + << " 0 - success" << endl + << " 1 - error" << endl + << " 2 - unsupported" << endl + << " 3 - empty (command was completed successfully, but " + << "no data was affected or returned)" + << "" << endl + << "" << endl; + return (t.str()); +} + void generateCommand(stringstream& f, const ElementPtr& cmd) { // command overview @@ -211,15 +239,28 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { f << "Command syntax:" << endl << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) << "" - << endl - << cmd->get("cmd-comment")->stringValue() << "" << endl << endl; + << endl; + if (cmd->get("cmd-comment")) { + f << cmd->get("cmd-comment")->stringValue(); + } + f << "" << endl << endl; // Response syntax f << "Response syntax:" << endl - << " " << escapeString(cmd->get("resp-syntax")->stringValue()) - << "" - << endl - << cmd->get("resp-comment")->stringValue() << "" << endl << endl; + << " "; + if (cmd->get("resp->syntax")) { + f << escapeString(cmd->get("resp-syntax")->stringValue()); + } else { + f << escapeString(standardResponseSyntax()); + } + f << "" << endl; + + if (cmd->contains("resp-comment")) { + f << cmd->get("resp-comment")->stringValue(); + } else { + f << standardResponseComment(); + } + f << "" << endl << endl; } map cmds_; -- GitLab From b20dd55ce7b2b50433779d203160640fd36f0026 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:31:53 +0200 Subject: [PATCH 005/169] [5422] template added. --- doc/api/_template.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/_template.json diff --git a/doc/api/_template.json b/doc/api/_template.json new file mode 100644 index 0000000000..7c53c32b8d --- /dev/null +++ b/doc/api/_template.json @@ -0,0 +1,12 @@ +{ + "name": "template-command", + "brief": "a sentence or two explaining what it is", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "first version, possible a hook library name and (premium) if applicable", + + "cmd-syntax": "Syntax of the command", + "cmd-comment": "Possibly some extra comments after the syntax.", + + "resp-syntax": "Syntax of the response", + "resp-comment": "Optional extra comments after the respone syntax." +} -- GitLab From 49bfad5bef6e99aa1aae49e4975aa5242d3c2553 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:51:57 +0200 Subject: [PATCH 006/169] [5422] reservation-{add,del,get} documented. --- doc/api/reservation-add.json | 53 ++++++++++++++++++++++++++++++++++++ doc/api/reservation-del.json | 17 ++++++++++++ doc/api/reservation-get.json | 44 ++++++++++++++++++++++++++++++ doc/guide/hooks.xml | 10 +++---- 4 files changed, 119 insertions(+), 5 deletions(-) create mode 100644 doc/api/reservation-add.json create mode 100644 doc/api/reservation-del.json create mode 100644 doc/api/reservation-get.json diff --git a/doc/api/reservation-add.json b/doc/api/reservation-add.json new file mode 100644 index 0000000000..80a796e339 --- /dev/null +++ b/doc/api/reservation-add.json @@ -0,0 +1,53 @@ +{ + "name": "reservation-add", + "brief": "adds a new host reservation. The reservation may include IPv4 address, + IPv6 addresses, IPv6 prefixes, various identifiers, a class + the client will be assigned to, DHCPv4 and DHCPv6 options and + more.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0, host_cmds library (premium)", + "description": "See ", + + "cmd-syntax": "{ + \"command\": \"reservation-add\", + \"arguments\": { + \"reservation\": { + \"boot-file-name\": , + \"comment\": + \"client-id\": , + \"circuit-id\": , + \"duid\": , + \"flex-id\": , + \"ip-address\": , + \"ip-addresses\": [ ], + \"hw-address\": , + \"hostname\": , + \"next-server\": , + \"option-data-list\": [ ], + \"prefixes\": [ ], + \"reservation-client-classes\": [ ], + \"server-hostname\": , + \"subnet-id\": , + \"user-context\": , + } + } +}", + "cmd-comment": "Note the ip-address, client-id, next-server, server-hostname and +boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are +IPv6 specific.", + + "resp-syntax": " +{ + \"result\": , + \"text\": +}", + "resp-comment": "Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + +" +} + diff --git a/doc/api/reservation-del.json b/doc/api/reservation-del.json new file mode 100644 index 0000000000..1300fd28f1 --- /dev/null +++ b/doc/api/reservation-del.json @@ -0,0 +1,17 @@ +{ + "name": "reservation-del", + "brief": "Deletes an existing host reservation.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0, host_cmds library (premium)", + + "cmd-syntax": "{ + \"command\": \"reservation-del\", + \"arguments\": { + \"subnet-id\": , + \"ip-address\": , + \"identifier-type\": , + \"identifier\": + } +}", + "cmd-comment": "The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier)." +} diff --git a/doc/api/reservation-get.json b/doc/api/reservation-get.json new file mode 100644 index 0000000000..78befb5674 --- /dev/null +++ b/doc/api/reservation-get.json @@ -0,0 +1,44 @@ +{ + "name": "reservation-get", + "brief": "attempts to retrieve an existing host reservation", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0, host_cmds library (premium)", + + "cmd-syntax": "{ + \"command\": \"reservation-get\", + \"arguments\": { + \"subnet-id\": , + \"identifier-type\": , + \"identifier\": ; + } +}", + + "cmd-comment": "The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier).", + + "resp-syntax": "{ + \"result\": , + \"text\": , + \"arguments\": { + \"boot-file-name\": , + \"comment\": + \"client-id\": , + \"circuit-id\": , + \"duid\": , + \"flex-id\": , + \"ip-address\": , + \"ip-addresses\": [ ], + \"hw-address\": , + \"hostname\": , + \"next-server\": , + \"option-data-list\": [ ], + \"prefixes\": [ ], + \"reservation-client-classes\": [ ], + \"server-hostname\": , + \"subnet-id\": , + \"user-context\": , + } +}", + + "resp-comment": "Arguments object appear only if a host is found. Many fields in the arguments +object appear only if specific field is set." +} diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 3d48fd9ecc..34f0c28dc7 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1432,7 +1432,7 @@ Requirements document.
-
+
reservation-add command reservation-add allows for the insertion of a new host. It @@ -1524,7 +1524,7 @@ Here is an example of complex IPv6 reservation:
-
+
reservation-get command reservation-get can be used to query the host database and retrieve existing reservations. There are two types of @@ -1560,7 +1560,7 @@ An example query by (subnet-id, identifier-type, identifier) looks as follows: { "command": "reservation-get", - "arguments": + "arguments": { "subnet-id": 4, "identifier-type": "hw-address", "identifier": "01:02:03:04:05:06" @@ -1602,7 +1602,7 @@ An example result returned when the query was malformed:
-
+
reservation-del command reservation-del can be used to delete a reservation from the host database. There are two types of parameters @@ -2568,4 +2568,4 @@ both the command and the response. of server id which is DHCPv6 only.
- + -- GitLab From c370715fcd6caad855da395a14c31e9eb46358d0 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:53:43 +0200 Subject: [PATCH 007/169] [5422] template generator added --- tools/cmd-docgen/.gitignore | 1 + tools/cmd-docgen/cmd_docgen.cc | 13 ++++++++----- tools/cmd-docgen/generate-templates | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 tools/cmd-docgen/.gitignore create mode 100755 tools/cmd-docgen/generate-templates diff --git a/tools/cmd-docgen/.gitignore b/tools/cmd-docgen/.gitignore new file mode 100644 index 0000000000..a6c57f5fb2 --- /dev/null +++ b/tools/cmd-docgen/.gitignore @@ -0,0 +1 @@ +*.json diff --git a/tools/cmd-docgen/cmd_docgen.cc b/tools/cmd-docgen/cmd_docgen.cc index 7febabeed9..027a145bd9 100644 --- a/tools/cmd-docgen/cmd_docgen.cc +++ b/tools/cmd-docgen/cmd_docgen.cc @@ -131,15 +131,18 @@ public: f << " API Reference" << endl; // Generate initial list of commands - f << " Kea currently supports " << cmds_.size() << " commands:" << endl - << " " << endl; + f << " Kea currently supports " << cmds_.size() << " commands:" << endl; + bool first = true; for (auto cmd : cmds_) { - f << " " << cmd.first << "" << endl; + if (!first) { + f << ", "; + } + f << "" << cmd.first << "" << endl; + first = false; } - f << " " << endl; - f << " " << endl; + f << "." << endl; // Generate actual commands references. generateCommands(f); diff --git a/tools/cmd-docgen/generate-templates b/tools/cmd-docgen/generate-templates new file mode 100755 index 0000000000..7f5353f379 --- /dev/null +++ b/tools/cmd-docgen/generate-templates @@ -0,0 +1,18 @@ +#!/bin/bash +while read -r LINE; do + F=$LINE.json + echo "{" > $F + echo " \"name\": \"$LINE\",\n" >> $F + echo " \"brief\": \"a sentence or two explaining what this command does\",\n" >> $F + echo " \"support\": [ \"kea-dhcp4\", \"kea-dhcp6\" ],\n" >> $F + echo " \"avail\": \"first version, possible a hook library name and (premium) if applicable\",\n" >> $F + + echo " \"cmd-syntax\": \"Syntax of the command\",\n" >> $F + echo " \"cmd-comment\": \"Possibly some extra comments after the syntax.\",\n" >> $F + + echo " \"resp-syntax\": \"Syntax of the response\",\n" >> $F + echo " \"resp-comment\": \"Optional extra comments after the respone syntax.\"\n" >> $F + echo "}" >> $F + + echo "$LINE generated." +done < cmds-list -- GitLab From e48ae94afa8a09c34fa61d490050c48a82e7c2af Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 00:56:45 +0200 Subject: [PATCH 008/169] [5422] renamed to kea-docgen --- tools/cmd-docgen/.gitignore | 1 + tools/cmd-docgen/Makefile.am | 8 ++++---- tools/cmd-docgen/{cmd_docgen.cc => kea_docgen.cc} | 0 3 files changed, 5 insertions(+), 4 deletions(-) rename tools/cmd-docgen/{cmd_docgen.cc => kea_docgen.cc} (100%) diff --git a/tools/cmd-docgen/.gitignore b/tools/cmd-docgen/.gitignore index a6c57f5fb2..568bae86bf 100644 --- a/tools/cmd-docgen/.gitignore +++ b/tools/cmd-docgen/.gitignore @@ -1 +1,2 @@ +cmd-docgen *.json diff --git a/tools/cmd-docgen/Makefile.am b/tools/cmd-docgen/Makefile.am index cbf1894281..72d8bd94c6 100644 --- a/tools/cmd-docgen/Makefile.am +++ b/tools/cmd-docgen/Makefile.am @@ -8,13 +8,13 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) AM_LDFLAGS = -static if GENERATE_DOCS -noinst_PROGRAMS = cmd_docgen -cmd_docgen_SOURCES = cmd_docgen.cc +noinst_PROGRAMS = kea-docgen +kea_docgen_SOURCES = kea_docgen.cc # For bare distcheck EXTRA_DIST = cmd_docgen -cmd_docgen_LDADD = $(top_builddir)/src/lib/cc/libkea-cc.la -cmd_docgen_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la +kea_docgen_LDADD = $(top_builddir)/src/lib/cc/libkea-cc.la +kea_docgen_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la endif diff --git a/tools/cmd-docgen/cmd_docgen.cc b/tools/cmd-docgen/kea_docgen.cc similarity index 100% rename from tools/cmd-docgen/cmd_docgen.cc rename to tools/cmd-docgen/kea_docgen.cc -- GitLab From e0021f33d05742a071c0f6d05877f4748dfd3f19 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 10:54:21 +0200 Subject: [PATCH 009/169] [5422] Bug in kea-docgen fixed. --- doc/guide/hooks.xml | 4 ++-- tools/cmd-docgen/kea_docgen.cc | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 34f0c28dc7..68c959f004 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1524,7 +1524,7 @@ Here is an example of complex IPv6 reservation:
-
+
reservation-get command reservation-get can be used to query the host database and retrieve existing reservations. There are two types of @@ -1602,7 +1602,7 @@ An example result returned when the query was malformed:
-
+
reservation-del command reservation-del can be used to delete a reservation from the host database. There are two types of parameters diff --git a/tools/cmd-docgen/kea_docgen.cc b/tools/cmd-docgen/kea_docgen.cc index 027a145bd9..2b0758dc61 100644 --- a/tools/cmd-docgen/kea_docgen.cc +++ b/tools/cmd-docgen/kea_docgen.cc @@ -235,7 +235,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { << endl << endl; // description and examples - f << "Description and examples: See Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; // Command syntax: @@ -243,7 +243,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) << "" << endl; - if (cmd->get("cmd-comment")) { + if (cmd->contains("cmd-comment")) { f << cmd->get("cmd-comment")->stringValue(); } f << "" << endl << endl; @@ -251,7 +251,8 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { // Response syntax f << "Response syntax:" << endl << " "; - if (cmd->get("resp->syntax")) { + + if (cmd->contains("resp-syntax")) { f << escapeString(cmd->get("resp-syntax")->stringValue()); } else { f << escapeString(standardResponseSyntax()); -- GitLab From 6cc5d94b7c64695749a8a9e44c23df7609d30813 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 13 Jun 2018 15:18:07 +0200 Subject: [PATCH 010/169] [gitlab10/5422] list for specific daemons are now generated. --- tools/cmd-docgen/kea_docgen.cc | 78 ++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 13 deletions(-) diff --git a/tools/cmd-docgen/kea_docgen.cc b/tools/cmd-docgen/kea_docgen.cc index 2b0758dc61..b47b53652f 100644 --- a/tools/cmd-docgen/kea_docgen.cc +++ b/tools/cmd-docgen/kea_docgen.cc @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -120,30 +121,79 @@ public: f << "" << endl; } - void generateOutput() { - - stringstream f; - - generateCopyright(f); - - f << "" - << endl; - f << " API Reference" << endl; + void generateCmdLink(stringstream& f, const string& cmd) { + f << "" << cmd << "" << endl; + } - // Generate initial list of commands + void generateLists(stringstream& f) { + // Generate a list of all commands f << " Kea currently supports " << cmds_.size() << " commands:" << endl; bool first = true; for (auto cmd : cmds_) { if (!first) { f << ", "; + generateCmdLink(f, cmd.first); } - f << "" << cmd.first << "" << endl; + first = false; } f << "." << endl; + // Generate a list of components: + set all_daemons; + for (auto cmd : cmds_) { + auto daemons = cmd.second->get("support"); + for (int i = 0; i < daemons->size(); i++) { + string daemon = daemons->get(i)->stringValue(); + if (all_daemons.find(daemon) == all_daemons.end()) { + all_daemons.insert(daemon); + } + } + } + + cout << "### " << all_daemons.size() << " daemon(s) detected." << endl; + + for (auto daemon : all_daemons) { + f << "" + << "Commands supported by " << daemon << ": "; + + bool first = true; + for (auto cmd : cmds_) { + + first = true; + auto daemons = cmd.second->get("support"); + for (auto d : daemons->listValue()) { + if (d->stringValue() == daemon) { + if (!first) { + f << ", "; + } + generateCmdLink(f, cmd.first); + first = false; + break; // get to next command + } + } + } + + f << "." << endl; + } + + } + + void generateOutput() { + + stringstream f; + + generateCopyright(f); + + f << "" + << endl; + f << " API Reference" << endl; + + + generateLists(f); + // Generate actual commands references. generateCommands(f); @@ -215,7 +265,8 @@ string standardResponseComment() { void generateCommand(stringstream& f, const ElementPtr& cmd) { // command overview - f << "" << cmd->get("name")->stringValue() << " - " + f << "get("name")->stringValue() << "\">" + << cmd->get("name")->stringValue() << " - " << cmd->get("brief")->stringValue() << "" << endl << endl; // command can be issued to the following daemons @@ -226,7 +277,8 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { f << ", "; } - f << daemons->get(i)->stringValue(); + f << "get(i)->stringValue() + << "\">" << daemons->get(i)->stringValue() << ""; } f << "" << endl << endl; -- GitLab From 4df92d31c2c5d7bb5e1805756a6d3d03e89658b5 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 28 Aug 2018 19:43:56 +0200 Subject: [PATCH 011/169] [#10,!3] reservation-get/del/all references updated. --- doc/api/reservation-add.json | 3 ++- doc/api/reservation-del.json | 3 ++- doc/api/reservation-get.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/api/reservation-add.json b/doc/api/reservation-add.json index 80a796e339..17818261ec 100644 --- a/doc/api/reservation-add.json +++ b/doc/api/reservation-add.json @@ -5,7 +5,8 @@ the client will be assigned to, DHCPv4 and DHCPv6 options and more.", "support": [ "kea-dhcp4", "kea-dhcp6" ], - "avail": "1.2.0, host_cmds library (premium)", + "hook": "host_cmds", + "avail": "1.2.0", "description": "See ", "cmd-syntax": "{ diff --git a/doc/api/reservation-del.json b/doc/api/reservation-del.json index 1300fd28f1..48d5938bc1 100644 --- a/doc/api/reservation-del.json +++ b/doc/api/reservation-del.json @@ -2,7 +2,8 @@ "name": "reservation-del", "brief": "Deletes an existing host reservation.", "support": [ "kea-dhcp4", "kea-dhcp6" ], - "avail": "1.2.0, host_cmds library (premium)", + "hook": "host_cmds", + "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"reservation-del\", diff --git a/doc/api/reservation-get.json b/doc/api/reservation-get.json index 78befb5674..cb6925758d 100644 --- a/doc/api/reservation-get.json +++ b/doc/api/reservation-get.json @@ -2,7 +2,8 @@ "name": "reservation-get", "brief": "attempts to retrieve an existing host reservation", "support": [ "kea-dhcp4", "kea-dhcp6" ], - "avail": "1.2.0, host_cmds library (premium)", + "hook": "host_cmds", + "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"reservation-get\", -- GitLab From 2c7b4cfdece62a5e2548c13b0679dd290a3399d6 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 28 Aug 2018 19:44:36 +0200 Subject: [PATCH 012/169] [#10, !3] docgen now generates a list of hooks --- tools/cmd-docgen/kea_docgen.cc | 75 ++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/tools/cmd-docgen/kea_docgen.cc b/tools/cmd-docgen/kea_docgen.cc index b47b53652f..41da9f9bab 100644 --- a/tools/cmd-docgen/kea_docgen.cc +++ b/tools/cmd-docgen/kea_docgen.cc @@ -17,7 +17,9 @@ using namespace isc::data; class DocGen { public: - const string OUTPUT = "../../doc/guide/api.xml"; + const string OUTPUT = "guide/api.xml"; + + bool verbose = false; void loadFiles(const vector& files) { @@ -101,9 +103,9 @@ public: requireList (x, "support", fname); requireString(x, "avail", fname); requireString(x, "brief", fname); - requireString(x, "cmd-syntax", fname); // They're optional. + //requireString(x, "cmd-syntax", fname); //requireString(x, "cmd-comment", fname); //requireString(x, "resp-syntax", fname); //requireString(x, "resp-comment", fname); @@ -143,21 +145,30 @@ public: // Generate a list of components: set all_daemons; + set all_hooks; for (auto cmd : cmds_) { auto daemons = cmd.second->get("support"); + auto hook = cmd.second->get("hook"); for (int i = 0; i < daemons->size(); i++) { string daemon = daemons->get(i)->stringValue(); if (all_daemons.find(daemon) == all_daemons.end()) { all_daemons.insert(daemon); } } + if (hook) { + string hook_txt = hook->stringValue(); + if (all_hooks.find(hook_txt) == all_hooks.end()) { + all_hooks.insert(hook_txt); + } + } } cout << "### " << all_daemons.size() << " daemon(s) detected." << endl; + cout << "### " << all_hooks.size() << " hook lib(s) detected." << endl; for (auto daemon : all_daemons) { f << "" - << "Commands supported by " << daemon << ": "; + << "Commands supported by " << daemon << " daemon: "; bool first = true; for (auto cmd : cmds_) { @@ -179,6 +190,28 @@ public: f << "." << endl; } + for (auto hook : all_hooks) { + f << "" + << "Commands supported by " << hook << " hook library: "; + + bool first = true; + for (auto cmd : cmds_) { + + first = true; + auto daemon_hook = cmd.second->get("hook"); + if (!daemon_hook || daemon_hook->stringValue() != hook) { + continue; + } + if (!first) { + f << ", "; + } + generateCmdLink(f, cmd.first); + first = false; + } + + f << "." << endl; + } + } void generateOutput() { @@ -199,11 +232,16 @@ public: f << "" << endl; - cout << "----------------" << endl; ofstream file(OUTPUT.c_str(), ofstream::trunc); file << f.str(); - // cout << f.str(); - cout << "----------------" << endl; + if (verbose) { + cout << "----------------" << endl; + cout << f.str(); + cout << "----------------" << endl; + } + file.close(); + + cout << "Output written to " << OUTPUT << endl; } void generateCommands(stringstream& f){ @@ -283,18 +321,31 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { f << "" << endl << endl; // availability - f << "Availability: " << cmd->get("avail")->stringValue() << "" - << endl << endl; + f << "Availability: " << cmd->get("avail")->stringValue(); + auto hook = cmd->get("hook"); + if (hook) { + f << " (stringValue() << "-lib\">" + << hook->stringValue() << ")"; + } else { + f << " (built-in)"; + } + + f << "" << endl << endl; // description and examples f << "Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; // Command syntax: - f << "Command syntax:" << endl - << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) - << "" - << endl; + f << "Command syntax:" << endl; + if (cmd->contains("cmd-syntax")) { + f << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) + << "" << endl; + } else { + f << " {" << endl + << " \"command\": \"" << cmd->get("name")->stringValue() << "\"" << endl + << "}" << endl; + } if (cmd->contains("cmd-comment")) { f << cmd->get("cmd-comment")->stringValue(); } -- GitLab From bf55ad45cf450c7323512f60e957dee29ac6b997 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 28 Aug 2018 21:50:11 +0200 Subject: [PATCH 013/169] [#10, !3] cache-clear,get documented --- doc/api/cache-clear.json | 7 +++++++ doc/api/cache-get.json | 13 +++++++++++++ doc/guide/hooks-host-cache.xml | 14 +++++++------- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 doc/api/cache-clear.json create mode 100644 doc/api/cache-get.json diff --git a/doc/api/cache-clear.json b/doc/api/cache-clear.json new file mode 100644 index 0000000000..d1096e3e5d --- /dev/null +++ b/doc/api/cache-clear.json @@ -0,0 +1,7 @@ +{ + "name": "cache-clear", + "brief": "This command removes all cached host reservations.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "hook": "host_cache", + "avail": "1.4.0" +} diff --git a/doc/api/cache-get.json b/doc/api/cache-get.json new file mode 100644 index 0000000000..7c72ff1b7f --- /dev/null +++ b/doc/api/cache-get.json @@ -0,0 +1,13 @@ +{ + "name": "cache-get", + "brief": "Returns full content of the host cache.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + + "resp-syntax": "{ + \"result\": 0 + \"text\": \"123 entries returned.\" + \"arguments\": +}" +} diff --git a/doc/guide/hooks-host-cache.xml b/doc/guide/hooks-host-cache.xml index eb6ef01740..a71905db0b 100644 --- a/doc/guide/hooks-host-cache.xml +++ b/doc/guide/hooks-host-cache.xml @@ -60,7 +60,7 @@ sections describe the commands available. -
+
cache-flush command This command allows removal of specified number of cached host entries. It takes one parameter which defines the number of @@ -76,7 +76,7 @@ in FIFO order, so always the oldest entries are removed.
-
+
cache-clear command This command allows removal of all cached host entries. An example usage looks as follows: @@ -89,7 +89,7 @@ certain number of cached hosts, please use cache-flush instead.
-
+
cache-write command In general case the cache content is considered a run-time state and the server can be shutdown or restarted as usual. The @@ -121,7 +121,7 @@ any other tool that is able to understand JSON format.
-
+
cache-load command See previous section for a discussion regarding use cases where it may be useful to write and load contents of the host @@ -142,7 +142,7 @@ any other tool that is able to understand JSON format.
-
+
cache-get command This command is similar to cache-write, but instead of writing the cache contents to disk, it returns the contents to @@ -159,7 +159,7 @@ may be large.
-
+
cache-insert command This command may be used to manually insert a host into the cache. There are very few use cases when this command could be @@ -220,7 +220,7 @@ may be large.
-
+
cache-remove command Sometimes it is useful to remove a single entry from the host cache. A good use case is a situation where the device is up, -- GitLab From be3e7a5fdcc67676f9570900b56ca7576e39b582 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 12:45:49 +0200 Subject: [PATCH 014/169] [#10,!3] API reference is now an appendix --- doc/guide/kea-guide.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guide/kea-guide.xml b/doc/guide/kea-guide.xml index ef69b636cd..fb07d213f5 100644 --- a/doc/guide/kea-guide.xml +++ b/doc/guide/kea-guide.xml @@ -92,8 +92,6 @@ - - @@ -120,7 +118,7 @@ within the BIND 10 framework. We thank the founding sponsors of the BIND10 project: Afilias, IIS.SE, - Nominet, + Nominet, SIDN, JPRS, CIRA; and additional sponsors @@ -138,6 +136,8 @@ + + -- GitLab From c6b9d78908fc9d61cfb62bfa48be71cc33a7a75e Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 13:16:24 +0200 Subject: [PATCH 015/169] [#10,!3] docgen moved to doc/docgen --- configure.ac | 2 +- {tools/cmd-docgen => doc/docgen}/.gitignore | 0 {tools/cmd-docgen => doc/docgen}/Makefile.am | 0 {tools/cmd-docgen => doc/docgen}/cmds-list | 0 {tools/cmd-docgen => doc/docgen}/generate-templates | 0 {tools/cmd-docgen => doc/docgen}/kea_docgen.cc | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename {tools/cmd-docgen => doc/docgen}/.gitignore (100%) rename {tools/cmd-docgen => doc/docgen}/Makefile.am (100%) rename {tools/cmd-docgen => doc/docgen}/cmds-list (100%) rename {tools/cmd-docgen => doc/docgen}/generate-templates (100%) rename {tools/cmd-docgen => doc/docgen}/kea_docgen.cc (100%) diff --git a/configure.ac b/configure.ac index bf731bce19..9a6a1ec541 100644 --- a/configure.ac +++ b/configure.ac @@ -1468,6 +1468,7 @@ AC_CONFIG_FILES([Makefile doc/Makefile doc/guide/Makefile doc/version.ent + doc/docgen/Makefile ext/Makefile ext/gtest/Makefile kea_version.h @@ -1648,7 +1649,6 @@ AC_CONFIG_FILES([Makefile src/share/database/scripts/pgsql/upgrade_4.0_to_5.0.sh tools/Makefile tools/path_replacer.sh - tools/cmd-docgen/Makefile ]) AC_CONFIG_COMMANDS([permissions], [ diff --git a/tools/cmd-docgen/.gitignore b/doc/docgen/.gitignore similarity index 100% rename from tools/cmd-docgen/.gitignore rename to doc/docgen/.gitignore diff --git a/tools/cmd-docgen/Makefile.am b/doc/docgen/Makefile.am similarity index 100% rename from tools/cmd-docgen/Makefile.am rename to doc/docgen/Makefile.am diff --git a/tools/cmd-docgen/cmds-list b/doc/docgen/cmds-list similarity index 100% rename from tools/cmd-docgen/cmds-list rename to doc/docgen/cmds-list diff --git a/tools/cmd-docgen/generate-templates b/doc/docgen/generate-templates similarity index 100% rename from tools/cmd-docgen/generate-templates rename to doc/docgen/generate-templates diff --git a/tools/cmd-docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc similarity index 100% rename from tools/cmd-docgen/kea_docgen.cc rename to doc/docgen/kea_docgen.cc -- GitLab From 1e8166dcce405de4319da8bb4bfead491964fbe1 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 13:16:36 +0200 Subject: [PATCH 016/169] [#10,!3] Build order changed. --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 42bdfe0534..21f19fc487 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,9 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} # ^^^^^^^^ This has to be the first line and cannot come later in this # Makefile.am due to some bork in some versions of autotools. -SUBDIRS = compatcheck tools doc . ext src m4macros @PREMIUM_DIR@ @CONTRIB_DIR@ +# We now build doc after src/, because docgen, a tool to generate API +# documentation requires libkea-exceptions and libkea-cc. +SUBDIRS = compatcheck tools . ext src doc m4macros @PREMIUM_DIR@ @CONTRIB_DIR@ USE_LCOV=@USE_LCOV@ LCOV=@LCOV@ -- GitLab From f77ae9c9ee5dcf7dd09b2224af556ae3dca46407 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 13:18:45 +0200 Subject: [PATCH 017/169] [#10,!3] Three more commands documented. --- doc/api/build-report.json | 16 ++++++++++++++++ doc/api/cache-write.json | 13 +++++++++++++ doc/api/config-get.json | 20 ++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 doc/api/build-report.json create mode 100644 doc/api/cache-write.json create mode 100644 doc/api/config-get.json diff --git a/doc/api/build-report.json b/doc/api/build-report.json new file mode 100644 index 0000000000..4abc5fb374 --- /dev/null +++ b/doc/api/build-report.json @@ -0,0 +1,16 @@ +{ + "name": "build-report", + "brief": "returns a list of compilition options that this particular binary was built with", + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], + "avail": "1.2.0", + + "cmd-syntax": "{ + \"command\": \"build-report\" +}", + + "resp-syntax": "{ + \"result\": 0, + \"text\": +}", + "resp-comment": "" +} diff --git a/doc/api/cache-write.json b/doc/api/cache-write.json new file mode 100644 index 0000000000..635fe666e7 --- /dev/null +++ b/doc/api/cache-write.json @@ -0,0 +1,13 @@ +{ + "name": "cache-write", + "brief": "Instructs Kea to write its host cache content to disk.", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + + "cmd-syntax": "{ + \"command\": \"cache-write\", + \"arguments\": \"/path/to/the/file.json\" +}", + "cmd-comment": "The command takes one mandatory argument that specifies a filename path of a file to be written." +} diff --git a/doc/api/config-get.json b/doc/api/config-get.json new file mode 100644 index 0000000000..30233b5e8b --- /dev/null +++ b/doc/api/config-get.json @@ -0,0 +1,20 @@ +{ + "name": "config-get", + "brief": "retrieves the current configurationa used by the server. The configuration + is roughtly equal to the configuration file, but includes additional + changes made by other commands and due to parameters inheritance.", + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], + "avail": "1.2.0", + + "cmd-syntax": "{ + \"command\": \"config-get\" +}", + "cmd-comment": "config-get takes no parameters.", + + "resp-syntax": "{ + \"result\": , + \"arguments\": { + + } +}" +} -- GitLab From 84a5a8af7d6523c18eb45f1da291a4c257700a07 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:01:09 +0200 Subject: [PATCH 018/169] [#10,!3] generate-templates script updated --- doc/Makefile.am | 6 +++++ doc/docgen/generate-templates | 50 ++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 1237c598ca..98c3de0377 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -74,6 +74,12 @@ guide: clean: rm -rf html +templates: + docgen/generate-templates docgen/cmds-list + +api: templates + docgen/kea-docgen api/*.json + # That's a bit of a hack, but we are making sure that devel target # is always valid. The alternative is to make devel depend on all # *.cc *.h files in the whole tree. diff --git a/doc/docgen/generate-templates b/doc/docgen/generate-templates index 7f5353f379..c38f69b8e1 100755 --- a/doc/docgen/generate-templates +++ b/doc/docgen/generate-templates @@ -1,18 +1,44 @@ #!/bin/bash -while read -r LINE; do - F=$LINE.json + +# This script generates API documentation templates. +# Usage: +# +# ./generate-templates file +# +# File is expected to have a list of commands, one per line. +# The templates will be created in api/ directory. + +if (( $# != 1 )); then + echo "Usage: ./generate-templates file" + echo + echo "File specifies a plain text file with each line having name of a command" + exit +fi + + +mkdir -p api/ + +while read -r CMD; do + F=api/$CMD.json + + if [ -e $F ]; then + echo "$F exists, skipping" + continue; + fi echo "{" > $F - echo " \"name\": \"$LINE\",\n" >> $F - echo " \"brief\": \"a sentence or two explaining what this command does\",\n" >> $F - echo " \"support\": [ \"kea-dhcp4\", \"kea-dhcp6\" ],\n" >> $F - echo " \"avail\": \"first version, possible a hook library name and (premium) if applicable\",\n" >> $F + echo " \"name\": \"$CMD\"," >> $F + echo " \"brief\": \"a sentence or two explaining what this command does\"," >> $F + echo " \"description\": \"See \"," >> $F + echo " \"support\": [ \"undocumented\" ]," >> $F + echo " \"avail\": \"first Kea version this command appeared in\"," >> $F + echo " \"hook\": \"\"," >> $F - echo " \"cmd-syntax\": \"Syntax of the command\",\n" >> $F - echo " \"cmd-comment\": \"Possibly some extra comments after the syntax.\",\n" >> $F + echo " \"cmd-syntax\": \"Syntax of the command\"," >> $F + echo " \"cmd-comment\": \"Possibly some extra comments after the syntax.\"," >> $F - echo " \"resp-syntax\": \"Syntax of the response\",\n" >> $F - echo " \"resp-comment\": \"Optional extra comments after the respone syntax.\"\n" >> $F + echo " \"resp-syntax\": \"Syntax of the response\"," >> $F + echo " \"resp-comment\": \"Optional extra comments after the resposne syntax.\"" >> $F echo "}" >> $F - echo "$LINE generated." -done < cmds-list + echo "$CMD generated." +done < $1 -- GitLab From 66a390fe09164b406e125c35eecd347589a42e9d Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:16:22 +0200 Subject: [PATCH 019/169] [#10,!3] Docgen sources are now documented. --- doc/docgen/kea_docgen.cc | 283 ++++++++++++++++++++++++--------------- 1 file changed, 175 insertions(+), 108 deletions(-) diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index 41da9f9bab..88386c7c1b 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -1,3 +1,9 @@ +// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + #include #include #include @@ -13,14 +19,19 @@ using namespace isc; using namespace isc::data; - +/// @brief API documentation generator class DocGen { public: + /// Output location of a file. const string OUTPUT = "guide/api.xml"; + /// Controls whether to print out extra information. bool verbose = false; + /// @brief Load JSON files that each contain description of an API command + /// + /// @param files a vector with names of files. void loadFiles(const vector& files) { map commands; @@ -61,42 +72,57 @@ public: << " file(s)" << endl; } - + /// @brief checks if mandatory string parameter is specified + /// + /// @param x a map that is being checked + /// @param name name of the string element expected to be there + /// @param fname name of the file (used in error reporting) + /// @throw Unexpected if missing, different type or empty void requireString(const ElementPtr& x, const string& name, const string& fname) { if (!x->contains(name)) { isc_throw(Unexpected, "Mandatory '" + name + " field missing while " "processing file " + fname); } if (x->get(name)->getType() != Element::string) { - isc_throw(BadValue, "'" + name + " field is present, but is not a string" + isc_throw(Unexpected, "'" + name + " field is present, but is not a string" " in file " + fname); } if (x->get(name)->stringValue().empty()) { - isc_throw(BadValue, "'" + name + " field is present, is a string, but is " + isc_throw(Unexpected, "'" + name + " field is present, is a string, but is " "empty in file " + fname); } } + /// @brief checks if mandatory list parameter is specified + /// + /// @param x a map that is being checked + /// @param name name of the list element expected to be there + /// @param fname name of the file (used in error reporting) + /// @throw Unexpected if missing, different type or empty void requireList(const ElementPtr& x, const string& name, const string& fname) { if (!x->contains(name)) { isc_throw(Unexpected, "Mandatory '" + name + " field missing while " "processing file " + fname); } if (x->get(name)->getType() != Element::list) { - isc_throw(BadValue, "'" + name + " field is present, but is not a list " + isc_throw(Unexpected, "'" + name + " field is present, but is not a list " "in file " + fname); } ConstElementPtr l = x->get(name); if (l->size() == 0) { - isc_throw(BadValue, "'" + name + " field is a list, but is empty in file " + isc_throw(Unexpected, "'" + name + " field is a list, but is empty in file " + fname); } // todo: check that every element is a string } + /// @brief Checks that the essential parameters for each command are defined + /// + /// @param fname name of the file the data was read from (printed if error is detected) + /// @param x a JSON map that contains content of the file void sanityCheck(const string& fname, const ElementPtr& x) { requireString(x, "name", fname); requireString(x, "brief", fname); @@ -111,6 +137,9 @@ public: //requireString(x, "resp-comment", fname); } + /// @brief Writes ISC copyright note to the stream + /// + /// @param f stream to write copyrights to void generateCopyright(stringstream& f) { f << "" << endl; } + /// @brief generates a link to command + /// + /// @param f stream to write the generated link to + /// @param cmd name of the command void generateCmdLink(stringstream& f, const string& cmd) { - f << "" << cmd << "" << endl; + f << "" << cmd + << "" << endl; } + /// @brief generates lists of all commands. + /// + /// Currently there are several lists (or rather lists of lists). They all enumerate + /// commands, but each list serving a different purpose: + /// - list of commands supported by a daemon + /// - list of commands provided by a hook + /// + /// @param f stream to write the generated lists to void generateLists(stringstream& f) { // Generate a list of all commands f << " Kea currently supports " << cmds_.size() << " commands:" << endl; @@ -163,8 +205,8 @@ public: } } - cout << "### " << all_daemons.size() << " daemon(s) detected." << endl; - cout << "### " << all_hooks.size() << " hook lib(s) detected." << endl; + cout << all_daemons.size() << " daemon(s) detected." << endl; + cout << all_hooks.size() << " hook lib(s) detected." << endl; for (auto daemon : all_daemons) { f << "" @@ -214,6 +256,7 @@ public: } + /// @brief generates the whole API documentation void generateOutput() { stringstream f; @@ -244,6 +287,9 @@ public: cout << "Output written to " << OUTPUT << endl; } + /// @brief generate sections for all commands + /// + /// @param f stream to write the commands to void generateCommands(stringstream& f){ for (auto cmd : cmds_) { @@ -257,118 +303,139 @@ public: } } -void replaceAll(std::string& str, const std::string& from, const std::string& to) { - if(from.empty()) - return; - size_t start_pos = 0; - while((start_pos = str.find(from, start_pos)) != std::string::npos) { - str.replace(start_pos, from.length(), to); - start_pos += to.length(); + /// @brief replace all strings + /// + /// @param str [in,out] this string will have some replacements + /// @param from what to replace + /// @param to what to replace with + void replaceAll(std::string& str, const std::string& from, const std::string& to) { + if(from.empty()) + return; + size_t start_pos = 0; + while((start_pos = str.find(from, start_pos)) != std::string::npos) { + str.replace(start_pos, from.length(), to); + start_pos += to.length(); + } } -} - -string escapeString(string txt) { - - replaceAll(txt, "<", "<"); - replaceAll(txt, ">", ">"); - return (txt); -} -string standardResponseSyntax() { - stringstream t; + /// @brief escapes string to be safe for XML (docbook) + /// + /// @param txt string to be escaped + /// @return escaped string + string escapeString(string txt) { - t << "{" << endl - << " \"result\": ," << endl - << " \"text\": " << endl - << "}" << endl; - return (t.str()); -} + replaceAll(txt, "<", "<"); + replaceAll(txt, ">", ">"); + return (txt); + } -string standardResponseComment() { - stringstream t; - - t << "Result is an integer representation of the status. Currently supported" - << " statuses are:" << endl - << "" << endl - << " 0 - success" << endl - << " 1 - error" << endl - << " 2 - unsupported" << endl - << " 3 - empty (command was completed successfully, but " - << "no data was affected or returned)" - << "" << endl - << "" << endl; - return (t.str()); -} + /// @brief generates standard description of command's response + /// + /// If a command doesn't have response syntax specified, we will + /// assume it follows the usual syntax and provide the default description. + string standardResponseSyntax() { + stringstream t; + + t << "{" << endl + << " \"result\": ," << endl + << " \"text\": " << endl + << "}" << endl; + return (t.str()); + } -void generateCommand(stringstream& f, const ElementPtr& cmd) { + /// @brief generates standard description of command's comment + /// + /// If a command doesn't have response syntax comment specified, we will + /// assume it follows the usual syntax and provide the default description. + string standardResponseComment() { + stringstream t; + + t << "Result is an integer representation of the status. Currently supported" + << " statuses are:" << endl + << "" << endl + << " 0 - success" << endl + << " 1 - error" << endl + << " 2 - unsupported" << endl + << " 3 - empty (command was completed successfully, but " + << "no data was affected or returned)" + << "" << endl + << "" << endl; + return (t.str()); + } - // command overview - f << "get("name")->stringValue() << "\">" - << cmd->get("name")->stringValue() << " - " - << cmd->get("brief")->stringValue() << "" << endl << endl; + /// @brief generates command description + /// + /// @param f stream to write the description to + /// @param cmd pointer to JSON structure that describes the command + void generateCommand(stringstream& f, const ElementPtr& cmd) { + + // command overview + f << "get("name")->stringValue() << "\">" + << cmd->get("name")->stringValue() << " - " + << cmd->get("brief")->stringValue() << "" << endl << endl; + + // command can be issued to the following daemons + f << "Supported by: "; + ConstElementPtr daemons = cmd->get("support"); + for (int i = 0; i < daemons->size(); i++) { + if (i) { + f << ", "; + } - // command can be issued to the following daemons - f << "Supported by: "; - ConstElementPtr daemons = cmd->get("support"); - for (int i = 0; i < daemons->size(); i++) { - if (i) { - f << ", "; + f << "get(i)->stringValue() + << "\">" << daemons->get(i)->stringValue() << ""; + } + f << "" << endl << endl; + + // availability + f << "Availability: " << cmd->get("avail")->stringValue(); + auto hook = cmd->get("hook"); + if (hook) { + f << " (stringValue() << "-lib\">" + << hook->stringValue() << ")"; + } else { + f << " (built-in)"; } - f << "get(i)->stringValue() - << "\">" << daemons->get(i)->stringValue() << ""; - } - f << "" << endl << endl; - - // availability - f << "Availability: " << cmd->get("avail")->stringValue(); - auto hook = cmd->get("hook"); - if (hook) { - f << " (stringValue() << "-lib\">" - << hook->stringValue() << ")"; - } else { - f << " (built-in)"; - } - - f << "" << endl << endl; - - // description and examples - f << "Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; - - // Command syntax: - f << "Command syntax:" << endl; - if (cmd->contains("cmd-syntax")) { - f << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) - << "" << endl; - } else { - f << " {" << endl - << " \"command\": \"" << cmd->get("name")->stringValue() << "\"" << endl - << "}" << endl; - } - if (cmd->contains("cmd-comment")) { - f << cmd->get("cmd-comment")->stringValue(); - } - f << "" << endl << endl; + f << "" << endl << endl; + + // description and examples + f << "Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; + + // Command syntax: + f << "Command syntax:" << endl; + if (cmd->contains("cmd-syntax")) { + f << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) + << "" << endl; + } else { + f << " {" << endl + << " \"command\": \"" << cmd->get("name")->stringValue() << "\"" << endl + << "}" << endl; + } + if (cmd->contains("cmd-comment")) { + f << cmd->get("cmd-comment")->stringValue(); + } + f << "" << endl << endl; - // Response syntax - f << "Response syntax:" << endl - << " "; + // Response syntax + f << "Response syntax:" << endl + << " "; - if (cmd->contains("resp-syntax")) { - f << escapeString(cmd->get("resp-syntax")->stringValue()); - } else { - f << escapeString(standardResponseSyntax()); - } - f << "" << endl; + if (cmd->contains("resp-syntax")) { + f << escapeString(cmd->get("resp-syntax")->stringValue()); + } else { + f << escapeString(standardResponseSyntax()); + } + f << "" << endl; - if (cmd->contains("resp-comment")) { - f << cmd->get("resp-comment")->stringValue(); - } else { - f << standardResponseComment(); + if (cmd->contains("resp-comment")) { + f << cmd->get("resp-comment")->stringValue(); + } else { + f << standardResponseComment(); + } + f << "" << endl << endl; } - f << "" << endl << endl; -} map cmds_; }; -- GitLab From 0875cf30ae9a2b7c93ac917bdaa93b8020a43562 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:17:06 +0200 Subject: [PATCH 020/169] [#10,!3] Couple convenience make targets added --- doc/Makefile.am | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 98c3de0377..2b21e409c4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -74,12 +74,21 @@ guide: clean: rm -rf html -templates: +# This target will generate templates. There's no need to run it, unless +# new commands have been added or there are existing commands that are +# still not documented. +templates: docgen docgen/generate-templates docgen/cmds-list -api: templates +# This will generate the api.xml file using docgen generator. It will +# read the JSON files from api/ directory. Make sure they're up to date. +api: templates docgen docgen/kea-docgen api/*.json +# This convenience target makes sure the docgen tool is built properly +docgen: + $(MAKE) -C docgen + # That's a bit of a hack, but we are making sure that devel target # is always valid. The alternative is to make devel depend on all # *.cc *.h files in the whole tree. -- GitLab From 3bfa961c4595075a6e943565ebaef088c06ba8cf Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:31:18 +0200 Subject: [PATCH 021/169] [#10,!3] Generated API is now an appendix --- doc/Makefile.am | 2 +- doc/docgen/kea_docgen.cc | 8 +++----- doc/guide/kea-guide.xml | 12 ++++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 2b21e409c4..611e12f14b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -92,4 +92,4 @@ docgen: # That's a bit of a hack, but we are making sure that devel target # is always valid. The alternative is to make devel depend on all # *.cc *.h files in the whole tree. -.PHONY: devel guide +.PHONY: devel guide docgen diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index 88386c7c1b..28b2ebb52d 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -177,8 +177,8 @@ public: for (auto cmd : cmds_) { if (!first) { f << ", "; - generateCmdLink(f, cmd.first); } + generateCmdLink(f, cmd.first); first = false; } @@ -215,7 +215,6 @@ public: bool first = true; for (auto cmd : cmds_) { - first = true; auto daemons = cmd.second->get("support"); for (auto d : daemons->listValue()) { if (d->stringValue() == daemon) { @@ -239,7 +238,6 @@ public: bool first = true; for (auto cmd : cmds_) { - first = true; auto daemon_hook = cmd.second->get("hook"); if (!daemon_hook || daemon_hook->stringValue() != hook) { continue; @@ -263,7 +261,7 @@ public: generateCopyright(f); - f << "" + f << "" << endl; f << " API Reference" << endl; @@ -273,7 +271,7 @@ public: // Generate actual commands references. generateCommands(f); - f << "" << endl; + f << "" << endl; ofstream file(OUTPUT.c_str(), ofstream::trunc); file << f.str(); diff --git a/doc/guide/kea-guide.xml b/doc/guide/kea-guide.xml index fb07d213f5..2424beaa9a 100644 --- a/doc/guide/kea-guide.xml +++ b/doc/guide/kea-guide.xml @@ -92,9 +92,12 @@ - + - + + + Acknowledgments Kea is an open source project designed, developed, and maintained by Internet Systems @@ -133,10 +136,7 @@ Technical Center of Internet . - - - - + -- GitLab From 43eb8b698d2c16be738979ff8a01c74b3add5890 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:41:51 +0200 Subject: [PATCH 022/169] [#10,!3] Updated generate-templates to better emphasize not documented cmds --- doc/docgen/generate-templates | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docgen/generate-templates b/doc/docgen/generate-templates index c38f69b8e1..762bc1a687 100755 --- a/doc/docgen/generate-templates +++ b/doc/docgen/generate-templates @@ -30,8 +30,8 @@ while read -r CMD; do echo " \"brief\": \"a sentence or two explaining what this command does\"," >> $F echo " \"description\": \"See \"," >> $F echo " \"support\": [ \"undocumented\" ]," >> $F - echo " \"avail\": \"first Kea version this command appeared in\"," >> $F - echo " \"hook\": \"\"," >> $F + echo " \"avail\": \"0.0.0\"," >> $F + echo " \"hook\": \"undocumented\"," >> $F echo " \"cmd-syntax\": \"Syntax of the command\"," >> $F echo " \"cmd-comment\": \"Possibly some extra comments after the syntax.\"," >> $F -- GitLab From 88c2621cbf9cb985e4c36369220d058d69291250 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:43:19 +0200 Subject: [PATCH 023/169] [#10,!3] api.xml regen --- doc/api.xml | 1752 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1752 insertions(+) create mode 100644 doc/api.xml diff --git a/doc/api.xml b/doc/api.xml new file mode 100644 index 0000000000..cc2a09e701 --- /dev/null +++ b/doc/api.xml @@ -0,0 +1,1752 @@ + + + + + API Reference + Kea currently supports 65 commands: +, cache-clear +, cache-get +, cache-insert +, cache-load +, cache-remove +, cache-write +, config-get +, config-reload +, config-set +, config-test +, config-write +, dhcp-disable +, dhcp-enable +, ha-heartbeat +, ha-scopes +, ha-sync +, lease4-add +, lease4-del +, lease4-get +, lease4-get-all +, lease4-update +, lease4-wipe +, lease6-add +, lease6-del +, lease6-get +, lease6-get-all +, lease6-update +, lease6-wipe +, leases-reclaim +, libreload +, list-commands +, network4-add +, network4-del +, network4-get +, network4-list +, network4-subnet-add +, network4-subnet-del +, network6-add +, network6-del +, network6-get +, network6-list +, network6-subnet-add +, network6-subnet-del +, reservation-add +, reservation-del +, reservation-get +, shutdown +, stat-lease4-get +, stat-lease6-get +, statistic-get +, statistic-get-all +, statistic-remove +, statistic-remove-all +, statistic-reset +, statistic-reset-all +, subnet4-add +, subnet4-del +, subnet4-get +, subnet4-list +, subnet6-add +, subnet6-del +, subnet6-get +, subnet6-list +, version-get +. +Commands supported by kea-ctrl-agent: build-report +config-get +. +Commands supported by kea-dhcp4: build-report +cache-clear +cache-get +cache-insert +cache-load +cache-remove +cache-write +config-get +config-reload +config-set +config-test +config-write +dhcp-disable +dhcp-enable +ha-heartbeat +ha-scopes +ha-sync +lease4-add +lease4-del +lease4-get +lease4-get-all +lease4-update +lease4-wipe +lease6-add +lease6-del +lease6-get +lease6-get-all +lease6-update +lease6-wipe +leases-reclaim +libreload +list-commands +network4-add +network4-del +network4-get +network4-list +network4-subnet-add +network4-subnet-del +network6-add +network6-del +network6-get +network6-list +network6-subnet-add +network6-subnet-del +reservation-add +reservation-del +reservation-get +shutdown +stat-lease4-get +stat-lease6-get +statistic-get +statistic-get-all +statistic-remove +statistic-remove-all +statistic-reset +statistic-reset-all +subnet4-add +subnet4-del +subnet4-get +subnet4-list +subnet6-add +subnet6-del +subnet6-get +subnet6-list +version-get +. +Commands supported by kea-dhcp6: build-report +cache-clear +cache-get +cache-insert +cache-load +cache-remove +cache-write +config-get +config-reload +config-set +config-test +config-write +dhcp-disable +dhcp-enable +ha-heartbeat +ha-scopes +ha-sync +lease4-add +lease4-del +lease4-get +lease4-get-all +lease4-update +lease4-wipe +lease6-add +lease6-del +lease6-get +lease6-get-all +lease6-update +lease6-wipe +leases-reclaim +libreload +list-commands +network4-add +network4-del +network4-get +network4-list +network4-subnet-add +network4-subnet-del +network6-add +network6-del +network6-get +network6-list +network6-subnet-add +network6-subnet-del +reservation-add +reservation-del +reservation-get +shutdown +stat-lease4-get +stat-lease6-get +statistic-get +statistic-get-all +statistic-remove +statistic-remove-all +statistic-reset +statistic-reset-all +subnet4-add +subnet4-del +subnet4-get +subnet4-list +subnet6-add +subnet6-del +subnet6-get +subnet6-list +version-get +. + +
+build-report reference +build-report - returns a list of compilition options that this particular binary was built with + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 + +Description and examples: See + +Command syntax: + { + "command": "build-report" +} + + +Response syntax: + { + "result": 0, + "text": <string with build details> +} + + +
+ + + +
+cache-clear reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+cache-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+cache-insert reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+cache-load reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+cache-remove reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+cache-write reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+config-get reference +config-get - retrieves the current configurationa used by the server. The configuration + is roughtly equal to the configuration file, but includes additional + changes made by other commands and due to parameters inheritance. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 + +Description and examples: See + +Command syntax: + { + "command": "config-get" +} +config-get takes no parameters. + +Response syntax: + { + "result": <integer>, + "arguments": { + <JSON configuration here, starting with Dhcp4, Dhcp6, or Control-agent object> + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-reload reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+config-set reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+config-test reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+config-write reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+dhcp-disable reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+dhcp-enable reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+ha-heartbeat reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+ha-scopes reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+ha-sync reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-get-all reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-update reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease4-wipe reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-get-all reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-update reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+lease6-wipe reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+leases-reclaim reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+libreload reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+list-commands reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-list reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-subnet-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network4-subnet-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-list reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-subnet-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+network6-subnet-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+reservation-add reference +reservation-add - adds a new host reservation. The reservation may include IPv4 address, + IPv6 addresses, IPv6 prefixes, various identifiers, a class + the client will be assigned to, DHCPv4 and DHCPv6 options and + more. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0, host_cmds library (premium) + +Description and examples: See + +Command syntax: + { + "command": "reservation-add", + "arguments": { + "reservation": { + "boot-file-name": <string>, + "comment": <string> + "client-id": <string>, + "circuit-id": <string>, + "duid": <string>, + "flex-id": <string>, + "ip-address": <string (IPv4 address)>, + "ip-addresses": [ <comma separated strings> ], + "hw-address": <string>, + "hostname": <string>, + "next-server": <string (IPv4 address)>, + "option-data-list": [ <comma separated structures defining options> ], + "prefixes": [ <comma separated IPv6 prefixes> ], + "reservation-client-classes": [ <comma separated strings> ], + "server-hostname": <string>, + "subnet-id": <integer>, + "user-context": <any valid JSON>, + } + } +} +Note the ip-address, client-id, next-server, server-hostname and +boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are +IPv6 specific. + +Response syntax: + +{ + "result": <integer>, + "text": <string> +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+reservation-del reference +reservation-del - Deletes an existing host reservation. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0, host_cmds library (premium) + +Description and examples: See + +Command syntax: + { + "command": "reservation-del", + "arguments": { + "subnet-id": <integer>, + "ip-address": <string>, + "identifier-type": <one of "hw-address", "duid", "circuit-id", "client-id" and "flex-id">, + "identifier": <string> + } +} +The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+reservation-get reference +reservation-get - attempts to retrieve an existing host reservation + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0, host_cmds library (premium) + +Description and examples: See + +Command syntax: + { + "command": "reservation-get", + "arguments": { + "subnet-id": <integer>, + "identifier-type": <string with one value out of: hw-address|duid|circuit-id|client-id|flex-id>, + "identifier": <string>; + } +} +The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). + +Response syntax: + { + "result": <integer>, + "text": <string>, + "arguments": { + "boot-file-name": <string>, + "comment": <string> + "client-id": <string>, + "circuit-id": <string>, + "duid": <string>, + "flex-id": <string>, + "ip-address": <string (IPv4 address)>, + "ip-addresses": [ <comma separated strings> ], + "hw-address": <string>, + "hostname": <string>, + "next-server": <string (IPv4 address)>, + "option-data-list": [ <comma separated structures defining options> ], + "prefixes": [ <comma separated IPv6 prefixes> ], + "reservation-client-classes": [ <comma separated strings> ], + "server-hostname": <string>, + "subnet-id": <integer>, + "user-context": <any valid JSON>, + } +} +Arguments object appear only if a host is found. Many fields in the arguments +object appear only if specific field is set. + +
+ + + +
+shutdown reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+stat-lease4-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+stat-lease6-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-get-all reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-remove reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-remove-all reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-reset reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+statistic-reset-all reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet4-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet4-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet4-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet4-list reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet6-add reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet6-del reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet6-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+subnet6-list reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + + +
+version-get reference +template-command - a sentence or two explaining what it is + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: first version, possible a hook library name and (premium) if applicable + +Description and examples: See + +Command syntax: + Syntax of the command +Possibly some extra comments after the syntax. + +Response syntax: + Syntax of the response +Optional extra comments after the respone syntax. + +
+ + +
-- GitLab From 057eb2815949ce1449af70179c25e17cf15421e7 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 2 Oct 2018 15:53:13 +0200 Subject: [PATCH 024/169] [#10,!3] Template updated. --- doc/api/_template.json | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/api/_template.json b/doc/api/_template.json index 7c53c32b8d..008db1113f 100644 --- a/doc/api/_template.json +++ b/doc/api/_template.json @@ -1,12 +1,40 @@ { + // This specifies the name of the command. Must be the same as the filename. "name": "template-command", + + // This provides a short description. "brief": "a sentence or two explaining what it is", - "support": [ "kea-dhcp4", "kea-dhcp6" ], - "avail": "first version, possible a hook library name and (premium) if applicable", + // This provides a full description. Since we have most (all?) commands + // already documented, we don't want to copy over the text. Instead, + // we provide links to specific section. + "description": "See ", + + // This enumerates the daemons that are able to handle specific command. + // Usually this will be a subset of those specifeid below as there are very + // few commands that are supported by every daemon. + "support": [ "kea-dhcp4", "kea-dhcp6", "dhcp-ddns", "ca", "netconf" ], + + // Historical information. May need a bit of digging, but this info can + // be extracted by looking at older Kea user guides. We have them published + // on FTP. + "avail": "first version the command appeared in", + + // Many commands are provided by a hook. Specify the name of the hook here. + // If this hook is provided by the deamons natively (without needing to load + // a hook), remove the whole "hook" entry. + "hook": "name of the hook that provides this command. remove if provided by + the core code", + + // This defines a syntax of the command "cmd-syntax": "Syntax of the command", + + // This defines a description printed immediately below the command syntax. "cmd-comment": "Possibly some extra comments after the syntax.", + // This defines a syntax of the response "resp-syntax": "Syntax of the response", + + // This defines a description printed immediately below th response syntax. "resp-comment": "Optional extra comments after the respone syntax." } -- GitLab From b0c2c6896645f95501cc47ba2a3fd845e361e2ca Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 12:22:49 -0400 Subject: [PATCH 025/169] Add new file --- doc/api/config-reload.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/api/config-reload.json diff --git a/doc/api/config-reload.json b/doc/api/config-reload.json new file mode 100644 index 0000000000..e875b87020 --- /dev/null +++ b/doc/api/config-reload.json @@ -0,0 +1,10 @@ +{ + "name": "config-reload", + "brief": "The config-reload command instructs Kea to load again the configuration file that was used previously.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "first version the command appeared in", + "cmd-syntax": "{ + \"command\": \"config-reload\" +}", +} -- GitLab From 3393bc5767af58c1344f5a0546364662305c4b70 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 13:45:39 -0400 Subject: [PATCH 026/169] Update config-reload.json --- doc/api/config-reload.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/config-reload.json b/doc/api/config-reload.json index e875b87020..74898effdb 100644 --- a/doc/api/config-reload.json +++ b/doc/api/config-reload.json @@ -3,7 +3,7 @@ "brief": "The config-reload command instructs Kea to load again the configuration file that was used previously.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], - "avail": "first version the command appeared in", + "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"config-reload\" }", -- GitLab From 5d6ca8ababb85c1c9c2d7dd9eb206a64c735630a Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 14:32:02 -0400 Subject: [PATCH 027/169] Update _template.json --- doc/api/_template.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/_template.json b/doc/api/_template.json index 008db1113f..0433bb8e7a 100644 --- a/doc/api/_template.json +++ b/doc/api/_template.json @@ -21,20 +21,20 @@ "avail": "first version the command appeared in", // Many commands are provided by a hook. Specify the name of the hook here. - // If this hook is provided by the deamons natively (without needing to load + // If this hook is provided by the daemons natively (without needing to load // a hook), remove the whole "hook" entry. "hook": "name of the hook that provides this command. remove if provided by the core code", - // This defines a syntax of the command + // This defines a syntax of the command. "cmd-syntax": "Syntax of the command", // This defines a description printed immediately below the command syntax. "cmd-comment": "Possibly some extra comments after the syntax.", - // This defines a syntax of the response + // This defines a syntax of the response. "resp-syntax": "Syntax of the response", - // This defines a description printed immediately below th response syntax. - "resp-comment": "Optional extra comments after the respone syntax." + // This defines a description printed immediately below the response syntax. + "resp-comment": "Optional extra comments after the response syntax." } -- GitLab From dd280c641685f56bf4c38379a680c2efead21b23 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 14:33:52 -0400 Subject: [PATCH 028/169] Add new file --- doc/api/cache-insert.json | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/api/cache-insert.json diff --git a/doc/api/cache-insert.json b/doc/api/cache-insert.json new file mode 100644 index 0000000000..3daa0cd840 --- /dev/null +++ b/doc/api/cache-insert.json @@ -0,0 +1,45 @@ +{ + "name": "cache-insert", + "brief": "This command may be used to manually insert a host into the cache.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + "cmd-syntax": "{ + \"command\": \"cache-insert\", + \"arguments\": { + \"hw-address\": \"01:02:03:04:05:06\", + \"subnet-id4\": 4, + \"subnet-id6\": 0, + \"ip-address\": \"192.0.2.100\", + \"hostname\": \"somehost.example.org\", + \"client-classes4\": [ ], + \"client-classes6\": [ ], + \"option-data4\": [ ], + \"option-data6\": [ ], + \"next-server\": "192.0.0.2", + \"server-hostname\": \"server-hostname.example.org\", + \"boot-file-name\": \"bootfile.efi\", + \"host-id\": 0 + } +}, +{ + \"command\": \"cache-insert\", + \"arguments\": { + \"hw-address\": \"01:02:03:04:05:06\", + \"subnet-id4\": 0, + \"subnet-id6\": 6, + \"ip-addresses\": [ \"2001:db8::cafe:babe\" ], + \"prefixes\": [ \"2001:db8:dead:beef::/64\" ], + \"hostname\": \"\", + \"client-classes4\": [ ], + \"client-classes6\": [ ], + \"option-data4\": [ ], + \"option-data6\": [ ], + \"next-server\": "0.0.0.0", + \"server-hostname\": \"\", + \"boot-file-name\": \"\", + \"host-id\": 0 + } +}", +} \ No newline at end of file -- GitLab From b54d861872a224ed802bda94d56940ac84579de5 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 14:36:15 -0400 Subject: [PATCH 029/169] Update config-get.json --- doc/api/config-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/config-get.json b/doc/api/config-get.json index 30233b5e8b..568160ab10 100644 --- a/doc/api/config-get.json +++ b/doc/api/config-get.json @@ -1,6 +1,6 @@ { "name": "config-get", - "brief": "retrieves the current configurationa used by the server. The configuration + "brief": "retrieves the current configuration used by the server. The configuration is roughtly equal to the configuration file, but includes additional changes made by other commands and due to parameters inheritance.", "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], -- GitLab From 2f9c30203ef5c9f1a2873103ab7b2737a20999a0 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 14:42:45 -0400 Subject: [PATCH 030/169] Add new file --- doc/api/cache-load.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/cache-load.json diff --git a/doc/api/cache-load.json b/doc/api/cache-load.json new file mode 100644 index 0000000000..2ccfca29c3 --- /dev/null +++ b/doc/api/cache-load.json @@ -0,0 +1,12 @@ +{ + "name": "cache-load", + "brief": "This command allows load the contents of a file on disk into an in-memory cache.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + "cmd-syntax": "{ + \"command\": \"cache-load\", + \"arguments\": \"/tmp/kea-host-cache.json\" +}", +} -- GitLab From c119ba582580e7876050284f44d91454bac57980 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 14:43:31 -0400 Subject: [PATCH 031/169] Update _template.json --- doc/api/_template.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/_template.json b/doc/api/_template.json index 0433bb8e7a..1e419825f2 100644 --- a/doc/api/_template.json +++ b/doc/api/_template.json @@ -10,8 +10,8 @@ // we provide links to specific section. "description": "See ", - // This enumerates the daemons that are able to handle specific command. - // Usually this will be a subset of those specifeid below as there are very + // This enumerates the daemons that are able to handle specific commands. + // Usually this will be a subset of those specified below as there are very // few commands that are supported by every daemon. "support": [ "kea-dhcp4", "kea-dhcp6", "dhcp-ddns", "ca", "netconf" ], -- GitLab From 840a96f63a972d43ac5805fba980fc9fb85bbf0c Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:04:39 -0400 Subject: [PATCH 032/169] Add new file --- doc/api/cache-remove.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/api/cache-remove.json diff --git a/doc/api/cache-remove.json b/doc/api/cache-remove.json new file mode 100644 index 0000000000..c52490b74d --- /dev/null +++ b/doc/api/cache-remove.json @@ -0,0 +1,22 @@ +{ + "name": "cache-remove", + "brief": "The cache-remove command works similarly to reservation-get command.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "host_cache", + "cmd-syntax": "{ + \"command\": \"cache-remove\", + \"arguments\": { + \"ip-address\": \"192.0.2.1\", + \"subnet-id\": 123 + } +} +{ + \"command\": \"cache-remove\", + \"arguments\": { + \"duid\": \"00:01:ab:cd:f0:a1:c2:d3:e4\", + \"subnet-id\": 123 + } +}", +} \ No newline at end of file -- GitLab From 1c89d414a8ec2ad1bbed81ec662ba022b6ae3f61 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:20:45 -0400 Subject: [PATCH 033/169] Add new file --- doc/api/config-set.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/api/config-set.json diff --git a/doc/api/config-set.json b/doc/api/config-set.json new file mode 100644 index 0000000000..45284737f1 --- /dev/null +++ b/doc/api/config-set.json @@ -0,0 +1,22 @@ +{ + "name": "config-set", + "brief": "The config-set command instructs the server to replace its current configuration with the new configuration supplied in the command's arguments.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0", + "cmd-syntax": "{ + \"command\": \"config-set\", + \"arguments\": { + \"\": { + }, + \"Logging\": { + } + } +}", + "cmd-comment": "where is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", + "resp-syntax": " {\"result\": 0, \"text\": \"Configuration successful.\" } + + or + + {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }", +} \ No newline at end of file -- GitLab From 23318edbfa287d3a27682ab87a786552e85c7b0e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:22:17 -0400 Subject: [PATCH 034/169] Update _template.json --- doc/api/_template.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/_template.json b/doc/api/_template.json index 1e419825f2..c0cd378687 100644 --- a/doc/api/_template.json +++ b/doc/api/_template.json @@ -26,13 +26,13 @@ "hook": "name of the hook that provides this command. remove if provided by the core code", - // This defines a syntax of the command. + // This defines the syntax of the command. "cmd-syntax": "Syntax of the command", // This defines a description printed immediately below the command syntax. "cmd-comment": "Possibly some extra comments after the syntax.", - // This defines a syntax of the response. + // This defines the syntax of the response. "resp-syntax": "Syntax of the response", // This defines a description printed immediately below the response syntax. -- GitLab From 3d3d7d26a20a8362922aa4dce2fb2118769726a4 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:27:42 -0400 Subject: [PATCH 035/169] Add new file --- doc/api/config-test.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/api/config-test.json diff --git a/doc/api/config-test.json b/doc/api/config-test.json new file mode 100644 index 0000000000..dd4632b9cf --- /dev/null +++ b/doc/api/config-test.json @@ -0,0 +1,22 @@ +{ + "name": "config-test", + "brief": "The config-test command instructs the server to check whether the new configuration supplied in the command's arguments can be loaded.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0", + "cmd-syntax": "{ + \"command\": \"config-test\", + \"arguments\": { + \"\": { + }, + \"Logging\": { + } + } +}", + "cmd-comment": "where is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", + "resp-syntax": "{\"result\": 0, \"text\": \"Configuration seems sane...\" } + + or + + {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }", +} \ No newline at end of file -- GitLab From 769a317cea8cb0c79fc7d79baca454c67926cd0a Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:32:58 -0400 Subject: [PATCH 036/169] Add new file --- doc/api/config-write.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/api/config-write.json diff --git a/doc/api/config-write.json b/doc/api/config-write.json new file mode 100644 index 0000000000..d15cfb997d --- /dev/null +++ b/doc/api/config-write.json @@ -0,0 +1,13 @@ +{ + "name": "config-write", + "brief": "The config-write command instructs the Kea server to write its current configuration to a file on disk.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0", + "cmd-syntax": "{ + \"command\": \"config-write\", + \"arguments\": { + \"filename": \"config-modified-2017-03-15.json\" + } +}", +} \ No newline at end of file -- GitLab From 93a4498dac91e73bb54069d3804162d548297881 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:37:15 -0400 Subject: [PATCH 037/169] Add new file --- doc/api/dhcp-disable.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/api/dhcp-disable.json diff --git a/doc/api/dhcp-disable.json b/doc/api/dhcp-disable.json new file mode 100644 index 0000000000..44b028cf3c --- /dev/null +++ b/doc/api/dhcp-disable.json @@ -0,0 +1,13 @@ +{ + "name": "dhcp-disable", + "brief": "The dhcp-disable command globally disables the DHCP service.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "cmd-syntax": "{ + \"command\": \"dhcp-disable\", + \"arguments\": { + \"max-period\": 20 + } +}", +} \ No newline at end of file -- GitLab From 22a513db4594f8d4c6d2302f2ec481d6a4602ec3 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 15:41:05 -0400 Subject: [PATCH 038/169] Add new file --- doc/api/dhcp-enable.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/api/dhcp-enable.json diff --git a/doc/api/dhcp-enable.json b/doc/api/dhcp-enable.json new file mode 100644 index 0000000000..6b90c397b0 --- /dev/null +++ b/doc/api/dhcp-enable.json @@ -0,0 +1,10 @@ +{ + "name": "dhcp-enable", + "brief": "The dhcp-enable command globally enables the DHCP service.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "cmd-syntax": "{ + \"command\": \"dhcp-enable\" +}", +} \ No newline at end of file -- GitLab From c8154515f7fdcfaae8912e03d00d55b843dad2dd Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 16:02:05 -0400 Subject: [PATCH 039/169] Add new file --- doc/api/lease4-add.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease4-add.json diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json new file mode 100644 index 0000000000..f198fc3721 --- /dev/null +++ b/doc/api/lease4-add.json @@ -0,0 +1,15 @@ +{ + "name": "lease4-add", + "brief": "The lease4-add command allows for the creation of a new lease.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-add\", + \"arguments\": { + \"ip-address\": \"192.0.2.202\", + \"hw-address\": \"1a:1b:1c:1d:1e:1f\" + } +}", +} -- GitLab From b721df05ade775eddab09ca2f28d779339ee03f0 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 16:09:22 -0400 Subject: [PATCH 040/169] Add new file --- doc/api/lease4-del.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease4-del.json diff --git a/doc/api/lease4-del.json b/doc/api/lease4-del.json new file mode 100644 index 0000000000..b58ab7eefc --- /dev/null +++ b/doc/api/lease4-del.json @@ -0,0 +1,15 @@ +{ + "name": "lease4-del", + "brief": "lease4-del can be used to delete a lease from the lease database.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-del\", + \"arguments\": { + \"ip-address\": \"192.0.2.202\" + } +}", + "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found.", +} \ No newline at end of file -- GitLab From 4821bde81b055539eec9c05d2750ad6bd211716e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 16:17:10 -0400 Subject: [PATCH 041/169] Add new file --- doc/api/lease4-get.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/api/lease4-get.json diff --git a/doc/api/lease4-get.json b/doc/api/lease4-get.json new file mode 100644 index 0000000000..a5b0892786 --- /dev/null +++ b/doc/api/lease4-get.json @@ -0,0 +1,31 @@ +{ + "name": "lease4-get", + "brief": "lease4-get can be used to query the lease database and retrieve existing leases.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-get\", + \"arguments\": { + \"ip-address\": \"192.0.2.1\" + } +}", + "resp-syntax": "{ + \"arguments\": { + \"client-id\": \"42:42:42:42:42:42:42:42\", + \"cltt\": 12345678, + \"fqdn-fwd\": false, + \"fqdn-rev\": true, + \"hostname\": \"myhost.example.com.\", + \"hw-address\": \"08:08:08:08:08:08\", + \"ip-address\": \"192.0.2.1\", + \"state\": 0, + \"subnet-id\": 44, + \"valid-lft\": 3600 + }, + \"result\": 0, + \"text\": \"IPv4 lease found.\" +}", + "resp-comment": "lease4-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty)." +} \ No newline at end of file -- GitLab From 549ee7568c43493c48ac01faef649d6f1a2e8353 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 16:25:52 -0400 Subject: [PATCH 042/169] Add new file --- doc/api/lease4-get-all.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/lease4-get-all.json diff --git a/doc/api/lease4-get-all.json b/doc/api/lease4-get-all.json new file mode 100644 index 0000000000..e048e5c747 --- /dev/null +++ b/doc/api/lease4-get-all.json @@ -0,0 +1,12 @@ +{ + "name": "lease4-get-all", + "brief": "lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-get-all\" +}", + "cmd-comment": "The lease4-get-all command may result in very large responses.", +} \ No newline at end of file -- GitLab From 3c3a8ec1207b43e166c6239aae8fd8f285ee1298 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:00:59 -0400 Subject: [PATCH 043/169] Add new file --- doc/api/lease4-update.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/api/lease4-update.json diff --git a/doc/api/lease4-update.json b/doc/api/lease4-update.json new file mode 100644 index 0000000000..d44703befc --- /dev/null +++ b/doc/api/lease4-update.json @@ -0,0 +1,18 @@ +{ + "name": "lease4-update", + "brief": "The lease4-update command can be used to update existing leases.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-update\", + \"arguments\": { + \"ip-address\": \"192.0.2.1\", + \"hostname\": \"newhostname.example.org\", + \"hw-address\": \"1a:1b:1c:1d:1e:1f\", + \"subnet-id\": 44, + \"force-create\": true + } +}", +} \ No newline at end of file -- GitLab From f291fd60b1de2c59c0cfa64cf3f9d86f2058d86e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:06:20 -0400 Subject: [PATCH 044/169] Add new file --- doc/api/lease4-wipe.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease4-wipe.json diff --git a/doc/api/lease4-wipe.json b/doc/api/lease4-wipe.json new file mode 100644 index 0000000000..cd8ef15440 --- /dev/null +++ b/doc/api/lease4-wipe.json @@ -0,0 +1,15 @@ +{ + "name": "lease4-wipe", + "brief": "lease4-wipe is designed to remove all leases associated with a given subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-wipe\", + \"arguments\": { + \"subnet-id\": 44 + } +} +", +} \ No newline at end of file -- GitLab From bf224a4a6ce01e4c407ee7676d627a8d6e2220b2 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:15:15 -0400 Subject: [PATCH 045/169] Add new file --- doc/api/lease6-add.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/api/lease6-add.json diff --git a/doc/api/lease6-add.json b/doc/api/lease6-add.json new file mode 100644 index 0000000000..7038dcc6b5 --- /dev/null +++ b/doc/api/lease6-add.json @@ -0,0 +1,20 @@ +{ + "name": "lease6-add", + "brief": "The lease6-add command allows for the creation of a new lease.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease6-add\", + \"arguments\": { + \"subnet-id\": 66, + \"ip-address\": \"2001:db8::3\", + \"duid\": \"1a:1b:1c:1d:1e:1f:20:21:22:23:24\", + \"iaid\": 1234 + } +}", + "cmd-comment": "lease6-add can be also used to add leases for IPv6 prefixes..", + "resp-syntax": "{ \"result\": 0, \"text\": \"Lease added.\" } + { \"result\": 1, \"text\": \"missing parameter 'ip-address' (:3:19)\" }", +} \ No newline at end of file -- GitLab From 3e909c26e3096cf8a5e47c306a078914a17b0fd7 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:23:46 -0400 Subject: [PATCH 046/169] Add new file --- doc/api/lease6-del.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease6-del.json diff --git a/doc/api/lease6-del.json b/doc/api/lease6-del.json new file mode 100644 index 0000000000..f8ccfc5cc8 --- /dev/null +++ b/doc/api/lease6-del.json @@ -0,0 +1,15 @@ +{ + "name": "lease6-del", + "brief": "lease6-del can be used to delete a lease from the lease database.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6"" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease4-del\", + \"arguments\": { + \"ip-address\": \"192.0.2.202\" + } +}", + "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty).", +} \ No newline at end of file -- GitLab From a45439f5d7beb7bf2d276b8425c47238ed4ff3fb Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:24:00 -0400 Subject: [PATCH 047/169] Update lease6-del.json --- doc/api/lease6-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-del.json b/doc/api/lease6-del.json index f8ccfc5cc8..dbac14040f 100644 --- a/doc/api/lease6-del.json +++ b/doc/api/lease6-del.json @@ -11,5 +11,5 @@ \"ip-address\": \"192.0.2.202\" } }", - "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty).", + "cmd-comment": "lease6-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty).", } \ No newline at end of file -- GitLab From 0a9e839bb1f7e12cef64c0de5ec6d2aa72cb0cc7 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:49:43 -0400 Subject: [PATCH 048/169] Add new file --- doc/api/lease6-get.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease6-get.json diff --git a/doc/api/lease6-get.json b/doc/api/lease6-get.json new file mode 100644 index 0000000000..f6edb5a9fa --- /dev/null +++ b/doc/api/lease6-get.json @@ -0,0 +1,15 @@ +{ + "name": "lease6-get", + "brief": "lease6-get can be used to query the lease database and retrieve existing leases.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease6-get\", + \"arguments\": { + \"ip-address\": \"2001:db8:1234:ab::\", + \"type\": \"IA_PD\" + } +}", +} \ No newline at end of file -- GitLab From a96382a1066ff4e355ccdc0b3e4509366c1b20fd Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 17:53:13 -0400 Subject: [PATCH 049/169] Update lease6-get.json --- doc/api/lease6-get.json | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/lease6-get.json b/doc/api/lease6-get.json index f6edb5a9fa..66f94adf55 100644 --- a/doc/api/lease6-get.json +++ b/doc/api/lease6-get.json @@ -12,4 +12,5 @@ \"type\": \"IA_PD\" } }", + "cmd-comment": "lease6-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty)." } \ No newline at end of file -- GitLab From 26e8c04f52075cca6192e6145e7b5a3f7bbb6a22 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 18:02:47 -0400 Subject: [PATCH 050/169] Add new file --- doc/api/lease6-get-all.json | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 doc/api/lease6-get-all.json diff --git a/doc/api/lease6-get-all.json b/doc/api/lease6-get-all.json new file mode 100644 index 0000000000..006a1cdf34 --- /dev/null +++ b/doc/api/lease6-get-all.json @@ -0,0 +1,53 @@ +{ + "name": "lease6-get-all", + "brief": "lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease6-get-all\", + \"arguments\": { + \"subnets\": [ 1, 2, 3, 4 ] + } +}", + "resp-syntax": "{ + \"arguments\": { + \"leases\": [ + { + \"cltt\": 12345678, + \"duid\": \"42:42:42:42:42:42:42:42\", + \"fqdn-fwd\": false, + \"fqdn-rev\": true, + \"hostname\": \"myhost.example.com.\", + \"hw-address\": \"08:08:08:08:08:08\", + \"iaid\": 1, + \"ip-address\": \"2001:db8:2::1\", + \"preferred-lft\": 500, + \"state\": 0, + \"subnet-id\": 44, + \"type\": \"IA_NA\", + \"valid-lft\": 3600 + }, + { + \"cltt\": 12345678, + \"duid\": \"21:21:21:21:21:21:21:21\", + \"fqdn-fwd\": false, + \"fqdn-rev\": true, + \"hostname\": \"\", + \"iaid\": 1, + \"ip-address\": \"2001:db8:0:0:2::\", + \"preferred-lft\": 500, + \"prefix-len\": 80, + \"state\": 0, + \"subnet-id\": 44, + \"type\": \"IA_PD\", + \"valid-lft\": 3600 + } + ] + }, + \"result\": 0, + \"text\": \"2 IPv6 lease(s) found.\" +}", + "resp-comment": "The lease6-get-all command may result in very large responses." +} \ No newline at end of file -- GitLab From a800461661c1233a1da839f7ae33609c639fa7a0 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 18:07:36 -0400 Subject: [PATCH 051/169] Add new file --- doc/api/lease6-update.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/api/lease6-update.json diff --git a/doc/api/lease6-update.json b/doc/api/lease6-update.json new file mode 100644 index 0000000000..8c0fc54a53 --- /dev/null +++ b/doc/api/lease6-update.json @@ -0,0 +1,20 @@ +{ + "name": "lease6-update", + "brief": "The lease6-update command can be used to update existing leases.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease6-update\", + \"arguments\": { + \"ip-address\": \"2001:db8::1\", + \"duid\": \"88:88:88:88:88:88:88:88\", + \"iaid\": 7654321, + \"hostname\": \"newhostname.example.org\", + \"subnet-id\": 66, + \"force-create\": false + } +} +", +} \ No newline at end of file -- GitLab From 3a52fc19ba6d8dc3237f291f264f301fc421156f Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Wed, 3 Oct 2018 18:12:06 -0400 Subject: [PATCH 052/169] Add new file --- doc/api/lease6-wipe.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/api/lease6-wipe.json diff --git a/doc/api/lease6-wipe.json b/doc/api/lease6-wipe.json new file mode 100644 index 0000000000..3e3ae3e165 --- /dev/null +++ b/doc/api/lease6-wipe.json @@ -0,0 +1,15 @@ +{ + "name": "lease6-wipe", + "brief": "lease6-wipe is designed to remove all leases associated with a given subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "lease_cmds", + "cmd-syntax": "{ + \"command\": \"lease6-wipe\", + \"arguments\": { + \"subnet-id\": 66 + } +}", + "cmd-comment": "Note: not all backends support this command.", +} \ No newline at end of file -- GitLab From 7470d623b929ddc70357370bb412aa05dcfe676f Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 09:30:52 -0400 Subject: [PATCH 053/169] Add new file --- doc/api/leases-reclaim.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/api/leases-reclaim.json diff --git a/doc/api/leases-reclaim.json b/doc/api/leases-reclaim.json new file mode 100644 index 0000000000..ad1124cc79 --- /dev/null +++ b/doc/api/leases-reclaim.json @@ -0,0 +1,13 @@ +{ + "name": "leases-reclaim", + "brief": "The leases-reclaim command instructs the server to reclaim all expired leases immediately.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"leases-reclaim\", + \"arguments\": { + \"remove\": true + } +}", +} \ No newline at end of file -- GitLab From 9ed3d7cba7b1ebc3a5360b9e1e4788a01414b80e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 09:32:01 -0400 Subject: [PATCH 054/169] Update leases-reclaim.json --- doc/api/leases-reclaim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/leases-reclaim.json b/doc/api/leases-reclaim.json index ad1124cc79..45fba07933 100644 --- a/doc/api/leases-reclaim.json +++ b/doc/api/leases-reclaim.json @@ -1,7 +1,7 @@ { "name": "leases-reclaim", "brief": "The leases-reclaim command instructs the server to reclaim all expired leases immediately.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.0.0", "cmd-syntax": "{ -- GitLab From 37156bc035eaeb8b2d3f7a1cc2c9c8be37f70418 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 09:36:08 -0400 Subject: [PATCH 055/169] Add new file --- doc/api/libreload.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/libreload.json diff --git a/doc/api/libreload.json b/doc/api/libreload.json new file mode 100644 index 0000000000..81ab60fd96 --- /dev/null +++ b/doc/api/libreload.json @@ -0,0 +1,12 @@ +{ + "name": "libreload", + "brief": "The libreload command will first unload and then load all currently loaded hook libraries.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0", + "cmd-syntax": "{ + \"command\": \"libreload\", + \"arguments\": { } +}", + "cmd-comment": "The server will respond with a result of 0 indicating success, or 1 indicating a failure.", +} \ No newline at end of file -- GitLab From 7a09bc67de95fc55b999c972d6eb225d639363f4 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 09:40:03 -0400 Subject: [PATCH 056/169] Add new file --- doc/api/list-commands.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/list-commands.json diff --git a/doc/api/list-commands.json b/doc/api/list-commands.json new file mode 100644 index 0000000000..fb36bc05d8 --- /dev/null +++ b/doc/api/list-commands.json @@ -0,0 +1,12 @@ +{ + "name": "list-commands", + "brief": "The list-commands command retrieves a list of all commands supported by the server.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"list-commands\", + \"arguments\": { } +}", + "cmd-comment": "The server will respond with a list of all supported commands.", +} \ No newline at end of file -- GitLab From 474af3ae396b18ff4e13fe49d8f29a2eadd509c3 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 09:59:54 -0400 Subject: [PATCH 057/169] Add new file --- doc/api/network4-add.json | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 doc/api/network4-add.json diff --git a/doc/api/network4-add.json b/doc/api/network4-add.json new file mode 100644 index 0000000000..663660a044 --- /dev/null +++ b/doc/api/network4-add.json @@ -0,0 +1,46 @@ +{ + "name": "network4-add", + "brief": "The network4-add command is used to add a new shared network.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-add\", + \"arguments\": { + \"shared-networks\": [ { + \"name\": \"floor13\", + \"subnet4\": [ + { + \"id\": 100, + \"pools\": [ { \"pool\": \"192.0.2.2-192.0.2.99\" } ], + \"subnet\": \"192.0.2.0/24\", + \"option-data\": [ + { + \"name\": \"routers\", + \"data\": \"192.0.2.1\" + } + ] + }, + { + \"id\": 101, + \"pools\": [ { \"pool\": \"192.0.3.2-192.0.3.99\" } ], + \"subnet\": \"192.0.3.0/24\", + \"option-data\": [ + { + \"name\": \"routers\", + \"data\": \"192.0.3.1\" + } + ] + } ] + } ] + } +}", + "resp-syntax": "{ + \"arguments\": { + \"shared-networks\": [ { \"name\": \"floor13\" } ] + }, + \"result\": 0, + \"text\": \"A new IPv4 shared network \'floor13\' added\" +}", +} \ No newline at end of file -- GitLab From 895fd4a8ccdcf2e24de4c08413c47100bcedeb59 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:09:52 -0400 Subject: [PATCH 058/169] Update build-report.json --- doc/api/build-report.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/build-report.json b/doc/api/build-report.json index 4abc5fb374..9313835879 100644 --- a/doc/api/build-report.json +++ b/doc/api/build-report.json @@ -1,6 +1,6 @@ { "name": "build-report", - "brief": "returns a list of compilition options that this particular binary was built with", + "brief": "returns a list of compilation options that this particular binary was built with", "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", -- GitLab From 0c27cc18b9aacd6f9a7b331754b749c8c6d65a84 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:15:51 -0400 Subject: [PATCH 059/169] Update lease4-add.json --- doc/api/lease4-add.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index f198fc3721..35757f6541 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -1,7 +1,7 @@ { "name": "lease4-add", "brief": "The lease4-add command allows for the creation of a new lease.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", @@ -12,4 +12,4 @@ \"hw-address\": \"1a:1b:1c:1d:1e:1f\" } }", -} +} \ No newline at end of file -- GitLab From 94cb9588df222a8c67a88054bfab77c9ba74e8b6 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:16:59 -0400 Subject: [PATCH 060/169] Update lease4-del.json --- doc/api/lease4-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-del.json b/doc/api/lease4-del.json index b58ab7eefc..f1799533ce 100644 --- a/doc/api/lease4-del.json +++ b/doc/api/lease4-del.json @@ -1,7 +1,7 @@ { "name": "lease4-del", "brief": "lease4-del can be used to delete a lease from the lease database.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From ff00a34cda6a4398c45490c245d74e78d8c87fe9 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:17:50 -0400 Subject: [PATCH 061/169] Update lease4-get-all.json --- doc/api/lease4-get-all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-get-all.json b/doc/api/lease4-get-all.json index e048e5c747..a52b765a7b 100644 --- a/doc/api/lease4-get-all.json +++ b/doc/api/lease4-get-all.json @@ -1,7 +1,7 @@ { "name": "lease4-get-all", "brief": "lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", "hook": "lease_cmds", -- GitLab From dfb537d1c2a00496816837f7bda62630e4f7f879 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:19:59 -0400 Subject: [PATCH 062/169] Update lease4-get.json --- doc/api/lease4-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-get.json b/doc/api/lease4-get.json index a5b0892786..9051621077 100644 --- a/doc/api/lease4-get.json +++ b/doc/api/lease4-get.json @@ -1,7 +1,7 @@ { "name": "lease4-get", "brief": "lease4-get can be used to query the lease database and retrieve existing leases.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From c48aadb156d569c617785a19ea67e72fd9ba2451 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:20:53 -0400 Subject: [PATCH 063/169] Update lease4-update.json --- doc/api/lease4-update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-update.json b/doc/api/lease4-update.json index d44703befc..c8f6c2ef9c 100644 --- a/doc/api/lease4-update.json +++ b/doc/api/lease4-update.json @@ -1,7 +1,7 @@ { "name": "lease4-update", "brief": "The lease4-update command can be used to update existing leases.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From f4870c8b6f4080de5a071f9ca552678b06b0f049 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:21:41 -0400 Subject: [PATCH 064/169] Update lease4-wipe.json --- doc/api/lease4-wipe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-wipe.json b/doc/api/lease4-wipe.json index cd8ef15440..94b7daea52 100644 --- a/doc/api/lease4-wipe.json +++ b/doc/api/lease4-wipe.json @@ -1,7 +1,7 @@ { "name": "lease4-wipe", "brief": "lease4-wipe is designed to remove all leases associated with a given subnet.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From c78ab4db15b791ce0e5055c18f0bef90edd818dd Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:22:48 -0400 Subject: [PATCH 065/169] Update lease6-add.json --- doc/api/lease6-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-add.json b/doc/api/lease6-add.json index 7038dcc6b5..b77a24ca2f 100644 --- a/doc/api/lease6-add.json +++ b/doc/api/lease6-add.json @@ -1,7 +1,7 @@ { "name": "lease6-add", "brief": "The lease6-add command allows for the creation of a new lease.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 19eb59d18d5ccfa752804e79d6ec6a375e9e7b0e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:23:28 -0400 Subject: [PATCH 066/169] Update lease6-del.json --- doc/api/lease6-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-del.json b/doc/api/lease6-del.json index dbac14040f..5275393adc 100644 --- a/doc/api/lease6-del.json +++ b/doc/api/lease6-del.json @@ -1,7 +1,7 @@ { "name": "lease6-del", "brief": "lease6-del can be used to delete a lease from the lease database.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6"" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 624042dec785f1ce7a1ef623478e7af81fb6e230 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:24:13 -0400 Subject: [PATCH 067/169] Update lease6-get-all.json --- doc/api/lease6-get-all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-get-all.json b/doc/api/lease6-get-all.json index 006a1cdf34..3a23b2a02f 100644 --- a/doc/api/lease6-get-all.json +++ b/doc/api/lease6-get-all.json @@ -1,7 +1,7 @@ { "name": "lease6-get-all", "brief": "lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 12c6af070a2f07033223ed9ae6bccf04b50a56a6 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:26:21 -0400 Subject: [PATCH 068/169] Update lease6-get.json --- doc/api/lease6-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-get.json b/doc/api/lease6-get.json index 66f94adf55..3b2fd3fd72 100644 --- a/doc/api/lease6-get.json +++ b/doc/api/lease6-get.json @@ -1,7 +1,7 @@ { "name": "lease6-get", "brief": "lease6-get can be used to query the lease database and retrieve existing leases.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From b85603c359b85e58d7196c87175f19e868a3b19e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:28:08 -0400 Subject: [PATCH 069/169] Update lease6-update.json --- doc/api/lease6-update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-update.json b/doc/api/lease6-update.json index 8c0fc54a53..7add848694 100644 --- a/doc/api/lease6-update.json +++ b/doc/api/lease6-update.json @@ -1,7 +1,7 @@ { "name": "lease6-update", "brief": "The lease6-update command can be used to update existing leases.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 20ab5d9c17c7954ac6027f6b500cbd123311632b Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 10:28:51 -0400 Subject: [PATCH 070/169] Update lease6-wipe.json --- doc/api/lease6-wipe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-wipe.json b/doc/api/lease6-wipe.json index 3e3ae3e165..c50bcd2332 100644 --- a/doc/api/lease6-wipe.json +++ b/doc/api/lease6-wipe.json @@ -1,7 +1,7 @@ { "name": "lease6-wipe", "brief": "lease6-wipe is designed to remove all leases associated with a given subnet.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From ebce40fc4d358a480e3cf8dcc1d9705123c05dc0 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 11:13:00 -0400 Subject: [PATCH 071/169] Add new file --- doc/api/network4-del.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/api/network4-del.json diff --git a/doc/api/network4-del.json b/doc/api/network4-del.json new file mode 100644 index 0000000000..8aa783969f --- /dev/null +++ b/doc/api/network4-del.json @@ -0,0 +1,25 @@ +{ + "name": "network4-del", + "brief": "The network4-del command is used to delete existing shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-del\", + \"arguments\": { + \"name\": \"floor13\" + } +}", + "resp-syntax": "{ + \"arguments\": { + \"shared-networks\": [ + { + \"name\": \"floor13\" + } + ] + }, + \"result\": 0, + \"text\": \"IPv4 shared network \'floor13\' deleted\" +}", +} \ No newline at end of file -- GitLab From 36a6fd878d39892196b4a93f2c85c0268300ab42 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 11:22:09 -0400 Subject: [PATCH 072/169] Add new file --- doc/api/network4-get.json | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 doc/api/network4-get.json diff --git a/doc/api/network4-get.json b/doc/api/network4-get.json new file mode 100644 index 0000000000..caecb1a1fd --- /dev/null +++ b/doc/api/network4-get.json @@ -0,0 +1,47 @@ +{ + "name": "network4-get", + "brief": "The network4-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-get\", + \"arguments\": { + \"name\": \"floor13\" + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"Info about IPv4 shared network \'floor13\' returned\", + \"arguments\": { + \"shared-networks\": [ + { + \"match-client-id\": true, + \"name\": \"floor13\", + \"option-data\": [ ], + \"rebind-timer\": 90, + \"relay\": { + \"ip-address\": \"0.0.0.0\" + }, + \"renew-timer\": 60, + \"reservation-mode\": \"all\", + \"subnet4\": [ + { + \"subnet\": \"192.0.2.0/24\", + \"id\": 5, + // many other subnet specific details here + }, + { + \"id\": 6, + \"subnet\": \"192.0.3.0/31\", + // many other subnet specific details here + } + ], + \"valid-lifetime\": 120 + } + ] + } +}", + "resp-comment": "Note that the actual response contains many additional fields that are omitted here for clarity." +} \ No newline at end of file -- GitLab From f8d59a0d90d751eb1d1a03ba579fb8fa38d7b4af Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 11:34:14 -0400 Subject: [PATCH 073/169] Add new file --- doc/api/network4-list.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/api/network4-list.json diff --git a/doc/api/network4-list.json b/doc/api/network4-list.json new file mode 100644 index 0000000000..b1554ca7e0 --- /dev/null +++ b/doc/api/network4-list.json @@ -0,0 +1,21 @@ +{ + "name": "network4-list", + "brief": "The network4-list command is used to retrieve full list of currently configured shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-list\" +}d", + "resp-syntax": "{ + \"arguments\": { + \"shared-networks\": [ + { \"name\": \"floor1\" }, + { \"name\": \"office\" } + ] + }, + \"result\": 0, + \"text\": \"2 IPv4 network(s) found\" +}", +} \ No newline at end of file -- GitLab From bd777e263c35e1a66754beffdb4a1ca1e41199d6 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 11:40:45 -0400 Subject: [PATCH 074/169] Add new file --- doc/api/network4-subnet-add.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/api/network4-subnet-add.json diff --git a/doc/api/network4-subnet-add.json b/doc/api/network4-subnet-add.json new file mode 100644 index 0000000000..5840c942ad --- /dev/null +++ b/doc/api/network4-subnet-add.json @@ -0,0 +1,19 @@ +{ + "name": "network4-subnet-add", + "brief": "The network4-subnet-add command is used to add existing subnets to existing shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-subnet-add\", + \"arguments\": { + \"name\": \"floor13\", + \"id\": 5 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network \'floor1\'\" +}", +} \ No newline at end of file -- GitLab From 118b398490c725794b492026b5b80f9ea0f816fa Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 11:45:59 -0400 Subject: [PATCH 075/169] Add new file --- doc/api/network4-subnet-del.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/api/network4-subnet-del.json diff --git a/doc/api/network4-subnet-del.json b/doc/api/network4-subnet-del.json new file mode 100644 index 0000000000..e8ab0a70d0 --- /dev/null +++ b/doc/api/network4-subnet-del.json @@ -0,0 +1,19 @@ +{ + "name": "network4-subnet-del", + "brief": "The network4-subnet-del command is used to remove a subnet that is part of an existing shared network and demote it to a plain, stand-alone subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-subnet-del\", + \"arguments\": { + \"name\": \"floor13\", + \"id\": 5 + } + }", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network \'floor13\'\" +}", +} \ No newline at end of file -- GitLab From 9e405aace7a99c1039a65b0c1c526a3d34404217 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 12:10:12 -0400 Subject: [PATCH 076/169] Add new file --- doc/api/network6-add.json | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 doc/api/network6-add.json diff --git a/doc/api/network6-add.json b/doc/api/network6-add.json new file mode 100644 index 0000000000..d3804f42f3 --- /dev/null +++ b/doc/api/network6-add.json @@ -0,0 +1,47 @@ +{ + "name": "network6-add", + "brief": "The network6-add command is used to add a new shared network.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-add\", + \"arguments\": { + \"shared-networks\": [ { + \"name\": \"floor13\", + \"subnet4\": [ + { + \"id\": 100, + \"pools\": [ { \"pool\": \"192.0.2.2-192.0.2.99\" } ], + \"subnet\": \"192.0.2.0/24\", + \"option-data\": [ + { + \"name\": \"routers\", + \"data\": \"192.0.2.1\" + } + ] + }, + { + \"id\": 101, + \"pools\": [ { \"pool\": \"192.0.3.2-192.0.3.99\" } ], + \"subnet\": \"192.0.3.0/24\", + \"option-data\": [ + { + \"name\": \"routers\", + \"data\": \"192.0.3.1\" + } + ] + } ] + } ] + } +}", + "cmd-comment": "The network6-add uses the same syntax for both the query and the response. However, there are some parameters that are IPv4-only (e.g. match-client-id) and some are IPv6-only (e.g. interface-id).", + "resp-syntax": "{ + \"arguments\": { + \"shared-networks\": [ { \"name\": \"floor13\" } ] + }, + \"result\": 0, + \"text\": \"A new IPv4 shared network \'floor13\' added\" +}", +} \ No newline at end of file -- GitLab From 2828217c129514f2a190faa818c07178ba16d8bd Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 12:55:59 -0400 Subject: [PATCH 077/169] Add new file --- doc/api/network6-del.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/api/network6-del.json diff --git a/doc/api/network6-del.json b/doc/api/network6-del.json new file mode 100644 index 0000000000..f78aa60d02 --- /dev/null +++ b/doc/api/network6-del.json @@ -0,0 +1,22 @@ +{ + "name": "network6-del", + "brief": "The network6-del command is used to delete existing shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-del\", + \"arguments\": { + \"name\": \"floor13\" + } +}", + "cmd-comment": "The network6-del command uses exactly the same syntax for both the command and the response.", + "resp-syntax": "{ + \"command\": \"network4-del\", + \"arguments\": { + \"name\": \"floor13\", + \"subnets-action\": \"delete\" + } +}", +} \ No newline at end of file -- GitLab From beaab2727a01c68d84acad5eacb298eeecd38c58 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 13:03:47 -0400 Subject: [PATCH 078/169] Add new file --- doc/api/network6-get.json | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 doc/api/network6-get.json diff --git a/doc/api/network6-get.json b/doc/api/network6-get.json new file mode 100644 index 0000000000..2f48d204eb --- /dev/null +++ b/doc/api/network6-get.json @@ -0,0 +1,47 @@ +{ + "name": "network6-get", + "brief": "The network6-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-get\", + \"arguments\": { + \"name\": \"floor13\" + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"Info about IPv4 shared network \'floor13\' returned\", + \"arguments\": { + \"shared-networks\": [ + { + \"match-client-id\": true, + \"name\": \"floor13\", + \"option-data\": [ ], + \"rebind-timer\": 90, + \"relay\": { + \"ip-address\": \"0.0.0.0\" + }, + \"renew-timer\": 60, + \"reservation-mode\": \"all\", + \"subnet4\": [ + { + \"subnet\": \"192.0.2.0/24\", + \"id\": 5, + // many other subnet specific details here + }, + { + \"id\": 6, + \"subnet\": \"192.0.3.0/31\", + // many other subnet specific details here + } + ], + \"valid-lifetime\": 120 + } + ] + } +}", + "resp-comment": "Note that the actual response contains many additional fields that are omitted here for clarity." +} \ No newline at end of file -- GitLab From fd7449692380fe8b749971d2e8a3fc24f7d97c69 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 14:27:27 -0400 Subject: [PATCH 079/169] Add new file --- doc/api/network6-list.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/api/network6-list.json diff --git a/doc/api/network6-list.json b/doc/api/network6-list.json new file mode 100644 index 0000000000..c9e5447a95 --- /dev/null +++ b/doc/api/network6-list.json @@ -0,0 +1,22 @@ +{ + "name": "network6-list", + "brief": "The network6-list command is used to retrieve full list of currently configured shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-list\" +}", + "cmd-comment": "network6-list follows exactly the same syntax for both the query and the response.", + "resp-syntax": "{ + \"arguments\": { + \"shared-networks\": [ + { \"name\": \"floor1\" }, + { \"name\": \"office\" } + ] + }, + "result": 0, + "text": "2 IPv4 network(s) found" +}", +} \ No newline at end of file -- GitLab From 72a94cd732f3973237269b05726c533caa99214b Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 14:33:28 -0400 Subject: [PATCH 080/169] Add new file --- doc/api/network6-subnet-add.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/api/network6-subnet-add.json diff --git a/doc/api/network6-subnet-add.json b/doc/api/network6-subnet-add.json new file mode 100644 index 0000000000..bc406d7883 --- /dev/null +++ b/doc/api/network6-subnet-add.json @@ -0,0 +1,20 @@ +{ + "name": "network6-subnet-add", + "brief": "The network6-subnet-add command is used to add existing subnets to existing shared networks.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-subnet-add\", + \"arguments\": { + \"name\": \"floor13\", + \"id\": 5 + } +}", + "cmd-comment": "The network6-subnet-add command uses exactly the same syntax for both the command and the response.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network \'floor1\'\" +}", +} \ No newline at end of file -- GitLab From fc2919c79ce4df31669436c0669684a9861adeeb Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 14:43:31 -0400 Subject: [PATCH 081/169] Add new file --- doc/api/network6-subnet-del.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/api/network6-subnet-del.json diff --git a/doc/api/network6-subnet-del.json b/doc/api/network6-subnet-del.json new file mode 100644 index 0000000000..f6d8fc91f1 --- /dev/null +++ b/doc/api/network6-subnet-del.json @@ -0,0 +1,20 @@ +{ + "name": "network6-subnet-del", + "brief": "The network6-subnet-del command is used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"network4-subnet-del\", + \"arguments\": { + \"name\": \"floor13\", + \"id\": 5 + } + }", + "cmd-comment": "The network6-subnet-del command uses exactly the same syntax for both the command and the response.", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network \'floor13\'\" +}", +} \ No newline at end of file -- GitLab From 93c7d3d43a53c433d90c4501a41c2e6a627e66a9 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 14:50:31 -0400 Subject: [PATCH 082/169] Add new file --- doc/api/shutdown.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/api/shutdown.json diff --git a/doc/api/shutdown.json b/doc/api/shutdown.json new file mode 100644 index 0000000000..593154b041 --- /dev/null +++ b/doc/api/shutdown.json @@ -0,0 +1,11 @@ +{ + "name": "shutdown", + "brief": "The shutdown command instructs the server to initiate its shutdown procedure.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"shutdown\" +}", + "cmd-comment": "The server will respond with a confirmation that the shutdown procedure has been initiated.", +} \ No newline at end of file -- GitLab From bc87da6f542acc90729be146d59570bbd82b54f2 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:02:41 -0400 Subject: [PATCH 083/169] Add new file --- doc/api/stat-lease4-get.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/api/stat-lease4-get.json diff --git a/doc/api/stat-lease4-get.json b/doc/api/stat-lease4-get.json new file mode 100644 index 0000000000..3aac547227 --- /dev/null +++ b/doc/api/stat-lease4-get.json @@ -0,0 +1,25 @@ +{ + "name": "stat-lease4-get", + "brief": "The stat-lease4-get command fetches lease statistics for a range of known subnets.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "stat_cmds", + "cmd-syntax": "{ + \"command\": \"stat-lease4-get\" +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"stat-lease4-get: 2 rows found\", + \"arguments\": { + \"result-set\": { + \"columns\": [ \"subnet-id\", \"total-addresses\", \"assigned-addresses\", \"declined-addresses\" ] + \"rows\": [ + [ 10, 256, 111, 0 ], + [ 20, 4098, 2034, 4 ] + ], + \"timestamp\": \"2018-05-04 15:03:37.000000\" + } + } + }", +} \ No newline at end of file -- GitLab From d822ffde857a633b3f0a51c37ae34cca9671cac4 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:15:51 -0400 Subject: [PATCH 084/169] Add new file --- doc/api/stat-lease6-get.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/api/stat-lease6-get.json diff --git a/doc/api/stat-lease6-get.json b/doc/api/stat-lease6-get.json new file mode 100644 index 0000000000..6967f4b275 --- /dev/null +++ b/doc/api/stat-lease6-get.json @@ -0,0 +1,29 @@ +{ + "name": "stat-lease6-get", + "brief": "The stat-lease6-get command fetches lease statistics for a range of known subnets.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "stat_cmds", + "cmd-syntax": "{ + \"command\": \"stat-lease6-get\", + \"arguments\": { + \"subnet-id\" : 10 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"stat-lease6-get: 2 rows found\", + \"arguments\": { + \"result-set\": { + \"columns\": [ \"subnet-id\", \"total-nas\", \"assigned-nas\", \"declined-nas\", \"total-pds\", \"assigned-pds\" ] + \"rows\": [ + [ 10, 4096, 2400, 3, 0, 0], + [ 20, 0, 0, 0, 1048, 233 ] + [ 30, 256, 60, 0, 1048, 15 ] + ], + \"timestamp\": \"2018-05-04 15:03:37.000000\" + } + } + }", +} \ No newline at end of file -- GitLab From 15aebd1f1b79f168029afc6e0e610751233db74e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:23:12 -0400 Subject: [PATCH 085/169] Add new file --- doc/api/statistic-get.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/api/statistic-get.json diff --git a/doc/api/statistic-get.json b/doc/api/statistic-get.json new file mode 100644 index 0000000000..70dcb92618 --- /dev/null +++ b/doc/api/statistic-get.json @@ -0,0 +1,14 @@ +{ + "name": "statistic-get", + "brief": "The statistic-get command retrieves a single statistic. It takes a single string parameter called name that specifies the statistic name.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"statistic-get\", + \"arguments\": { + \"name\": \"pkt4-received\" + } +}", + "cmd-comment": "The server will respond with details of the requested statistic, with a result set to 0 indicating success and the specified statistic as the value of the "arguments" parameter.", +} \ No newline at end of file -- GitLab From 34b58afe229846c0ed260db25d8e55bb3ed2a00f Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:33:20 -0400 Subject: [PATCH 086/169] Add new file --- doc/api/statistic-get-all.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/statistic-get-all.json diff --git a/doc/api/statistic-get-all.json b/doc/api/statistic-get-all.json new file mode 100644 index 0000000000..03bd4a2bf9 --- /dev/null +++ b/doc/api/statistic-get-all.json @@ -0,0 +1,12 @@ +{ + "name": "statistic-get-all", + "brief": "The statistic-get-all command retrieves all statistics recorded.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + '"command\": \"statistic-get-all\", + \"arguments\": { } +}", + "cmd-comment": "The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero).", +} \ No newline at end of file -- GitLab From 043e670e98b0cc28b4db36cb8740498941edaac9 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:33:45 -0400 Subject: [PATCH 087/169] Update statistic-get-all.json --- doc/api/statistic-get-all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/statistic-get-all.json b/doc/api/statistic-get-all.json index 03bd4a2bf9..6c6d63654f 100644 --- a/doc/api/statistic-get-all.json +++ b/doc/api/statistic-get-all.json @@ -5,7 +5,7 @@ "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.0.0", "cmd-syntax": "{ - '"command\": \"statistic-get-all\", + \"command\": \"statistic-get-all\", \"arguments\": { } }", "cmd-comment": "The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero).", -- GitLab From 9b44846ffc86f9d7bf4992517fbae39919137a32 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:42:01 -0400 Subject: [PATCH 088/169] Add new file --- doc/api/statistic-remove.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/api/statistic-remove.json diff --git a/doc/api/statistic-remove.json b/doc/api/statistic-remove.json new file mode 100644 index 0000000000..a2bfb4ff28 --- /dev/null +++ b/doc/api/statistic-remove.json @@ -0,0 +1,14 @@ +{ + "name": "statistic-remove", + "brief": "The statistic-remove command attempts to delete a single statistic. It takes a single string parameter called name that specifies the statistic name.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"statistic-remove\", + \"arguments\": { + \"name\": \"pkt4-received\" + } +}", + "cmd-comment": "If the specific statistic is found and its removal was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.", +} \ No newline at end of file -- GitLab From c8687a646dc1075ec2c4828c09ac295989a32dc6 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 15:53:50 -0400 Subject: [PATCH 089/169] Add new file --- doc/api/statistic-remove-all.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/statistic-remove-all.json diff --git a/doc/api/statistic-remove-all.json b/doc/api/statistic-remove-all.json new file mode 100644 index 0000000000..821992ac28 --- /dev/null +++ b/doc/api/statistic-remove-all.json @@ -0,0 +1,12 @@ +{ + "name": "statistic-remove-all", + "brief": "The statistic-remove-all command attempts to delete all statistics.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"statistic-remove-all\", + \"arguments\": { } +}", + "cmd-comment": "If the removal of all statistics was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.", +} \ No newline at end of file -- GitLab From 678edacf2dd13f4f414013f418136013399bd07a Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 16:38:32 -0400 Subject: [PATCH 090/169] Add new file --- doc/api/statistic-reset.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/api/statistic-reset.json diff --git a/doc/api/statistic-reset.json b/doc/api/statistic-reset.json new file mode 100644 index 0000000000..32b9d1a22c --- /dev/null +++ b/doc/api/statistic-reset.json @@ -0,0 +1,14 @@ +{ + "name": "statistic-reset", + "brief": "The statistic-reset command sets the specified statistic to its neutral value: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and \"\" for string type. It takes a single string parameter called name that specifies the statistic name.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"statistic-reset\", + \"arguments\": { + \"name\": \"pkt4-received\" + } +}", + "cmd-comment": "If the specific statistic is found and reset was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.", +} \ No newline at end of file -- GitLab From 0ba801f54777516b00e10835a109584fc6e5408e Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 16:43:54 -0400 Subject: [PATCH 091/169] Add new file --- doc/api/statistic-reset-all.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/api/statistic-reset-all.json diff --git a/doc/api/statistic-reset-all.json b/doc/api/statistic-reset-all.json new file mode 100644 index 0000000000..deb136aa11 --- /dev/null +++ b/doc/api/statistic-reset-all.json @@ -0,0 +1,12 @@ +{ + "name": "statistic-reset-all", + "brief": "The statistic-reset command sets all statistics to their neutral values: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and \"\" for string type.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.0.0", + "cmd-syntax": "{ + \"command\": \"statistic-reset-all\", + \"arguments\": { } +}", + "cmd-comment": "If the operation is successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.", +} \ No newline at end of file -- GitLab From 44681f67159a0fea25f838c7852142b7d1676f86 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 16:49:55 -0400 Subject: [PATCH 092/169] Add new file --- doc/api/subnet4-add.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/api/subnet4-add.json diff --git a/doc/api/subnet4-add.json b/doc/api/subnet4-add.json new file mode 100644 index 0000000000..580e72b0be --- /dev/null +++ b/doc/api/subnet4-add.json @@ -0,0 +1,30 @@ +{ + "name": "subnet4-add", + "brief": "This command is used to create and add a new subnet to the existing server configuration.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet4-add\", + \"arguments\": { + \"subnets\": [ { + \"id\": 123, + \"subnet\": \"10.20.30.0/24\", + ... + } ] + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet added\", + \"arguments\": { + \"subnets\": [ + { + \"id\": 123, + \"subnet\": \"10.20.30.0/24\" + } + ] + } +}", +} \ No newline at end of file -- GitLab From b03227ed1680a9e246abe610c5e72636ab30af4f Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Thu, 4 Oct 2018 22:54:33 +0200 Subject: [PATCH 093/169] [#10,!3] Generator updated --- doc/docgen/kea_docgen.cc | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index 28b2ebb52d..bd22cb6641 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -38,6 +38,8 @@ public: int cnt = 0; + int errors = 0; // number of errors encountered + try { for (auto f : files) { string cmd = f; @@ -52,14 +54,24 @@ public: continue; } - cout << "Loading description of command " << cmd << "... "; - ElementPtr x = Element::fromJSONFile(f, false); - cout << "loaded, sanity check..."; + try { + cout << "Loading description of command " << cmd << "... "; + ElementPtr x = Element::fromJSONFile(f, false); + cout << "loaded, sanity check..."; + + sanityCheck(f, x); - sanityCheck(f, x); + cmds_.insert(make_pair(cmd, x)); + cout << " looks ok." << endl; - cmds_.insert(make_pair(cmd, x)); - cout << " looks ok." << endl; + } catch (const exception& e) { + cout << "ERROR: " << e.what() << endl; + errors++; + } + + if (errors) { + continue; + } cnt++; } @@ -69,7 +81,10 @@ public: } cout << "Loaded " << cmds_.size() << " commands out of " << files.size() - << " file(s)" << endl; + << " file(s), " << errors << " error(s) detected." << endl; + if (errors) { + isc_throw(Unexpected, errors << " error(s) detected while loading JSON files"); + } } /// @brief checks if mandatory string parameter is specified @@ -412,7 +427,7 @@ public: << "}" << endl; } if (cmd->contains("cmd-comment")) { - f << cmd->get("cmd-comment")->stringValue(); + f << escapeString(cmd->get("cmd-comment")->stringValue()); } f << "
" << endl << endl; -- GitLab From c7bf14bb408fc65d403d28fa0bef2fb562514da9 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Thu, 4 Oct 2018 22:56:08 +0200 Subject: [PATCH 094/169] [#10,!3] Fixing minor mistakes - 80% were simple trailing commas - one or two typos - our parser doesn't like escaped single quote. it's a bug in our parser code, but until it is fixed, I've removed the escapes. \' => ' --- doc/api/cache-insert.json | 8 ++++---- doc/api/cache-load.json | 2 +- doc/api/cache-remove.json | 4 ++-- doc/api/config-reload.json | 2 +- doc/api/config-set.json | 4 ++-- doc/api/config-test.json | 4 ++-- doc/api/config-write.json | 6 +++--- doc/api/dhcp-disable.json | 4 ++-- doc/api/dhcp-enable.json | 4 ++-- doc/api/lease4-add.json | 4 ++-- doc/api/lease4-del.json | 4 ++-- doc/api/lease4-get-all.json | 4 ++-- doc/api/lease4-get.json | 2 +- doc/api/lease4-update.json | 4 ++-- doc/api/lease4-wipe.json | 3 +-- doc/api/lease6-add.json | 4 ++-- doc/api/lease6-del.json | 6 +++--- doc/api/lease6-update.json | 4 ++-- doc/api/lease6-wipe.json | 4 ++-- doc/api/leases-reclaim.json | 4 ++-- doc/api/libreload.json | 4 ++-- doc/api/list-commands.json | 6 +++--- doc/api/network4-add.json | 6 +++--- doc/api/network4-del.json | 6 +++--- doc/api/network4-get.json | 4 ++-- doc/api/network4-list.json | 6 +++--- doc/api/network4-subnet-add.json | 6 +++--- doc/api/network4-subnet-del.json | 6 +++--- doc/api/network6-add.json | 6 +++--- doc/api/network6-del.json | 4 ++-- doc/api/network6-get.json | 4 ++-- doc/api/network6-list.json | 8 ++++---- doc/api/network6-subnet-add.json | 6 +++--- doc/api/network6-subnet-del.json | 6 +++--- doc/api/shutdown.json | 4 ++-- doc/api/stat-lease4-get.json | 4 ++-- doc/api/stat-lease6-get.json | 4 ++-- doc/api/statistic-get-all.json | 4 ++-- doc/api/statistic-get.json | 4 ++-- doc/api/statistic-remove-all.json | 4 ++-- doc/api/statistic-remove.json | 4 ++-- 41 files changed, 93 insertions(+), 94 deletions(-) diff --git a/doc/api/cache-insert.json b/doc/api/cache-insert.json index 3daa0cd840..e872c9ae04 100644 --- a/doc/api/cache-insert.json +++ b/doc/api/cache-insert.json @@ -17,7 +17,7 @@ \"client-classes6\": [ ], \"option-data4\": [ ], \"option-data6\": [ ], - \"next-server\": "192.0.0.2", + \"next-server\": \"192.0.0.2\", \"server-hostname\": \"server-hostname.example.org\", \"boot-file-name\": \"bootfile.efi\", \"host-id\": 0 @@ -36,10 +36,10 @@ \"client-classes6\": [ ], \"option-data4\": [ ], \"option-data6\": [ ], - \"next-server\": "0.0.0.0", + \"next-server\": \"0.0.0.0\", \"server-hostname\": \"\", \"boot-file-name\": \"\", \"host-id\": 0 } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/cache-load.json b/doc/api/cache-load.json index 2ccfca29c3..582dc11b86 100644 --- a/doc/api/cache-load.json +++ b/doc/api/cache-load.json @@ -8,5 +8,5 @@ "cmd-syntax": "{ \"command\": \"cache-load\", \"arguments\": \"/tmp/kea-host-cache.json\" -}", +}" } diff --git a/doc/api/cache-remove.json b/doc/api/cache-remove.json index c52490b74d..cde6b4d89d 100644 --- a/doc/api/cache-remove.json +++ b/doc/api/cache-remove.json @@ -18,5 +18,5 @@ \"duid\": \"00:01:ab:cd:f0:a1:c2:d3:e4\", \"subnet-id\": 123 } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/config-reload.json b/doc/api/config-reload.json index 74898effdb..8104db373e 100644 --- a/doc/api/config-reload.json +++ b/doc/api/config-reload.json @@ -6,5 +6,5 @@ "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"config-reload\" -}", +}" } diff --git a/doc/api/config-set.json b/doc/api/config-set.json index 45284737f1..dd39e94132 100644 --- a/doc/api/config-set.json +++ b/doc/api/config-set.json @@ -18,5 +18,5 @@ or - {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }", -} \ No newline at end of file + {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }" +} diff --git a/doc/api/config-test.json b/doc/api/config-test.json index dd4632b9cf..079c6d942e 100644 --- a/doc/api/config-test.json +++ b/doc/api/config-test.json @@ -18,5 +18,5 @@ or - {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }", -} \ No newline at end of file + {\"result\": 1, \"text\": \"unsupported parameter: BOGUS (:16:26)\" }" +} diff --git a/doc/api/config-write.json b/doc/api/config-write.json index d15cfb997d..b998e866c6 100644 --- a/doc/api/config-write.json +++ b/doc/api/config-write.json @@ -7,7 +7,7 @@ "cmd-syntax": "{ \"command\": \"config-write\", \"arguments\": { - \"filename": \"config-modified-2017-03-15.json\" + \"filename\": \"config-modified-2017-03-15.json\" } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/dhcp-disable.json b/doc/api/dhcp-disable.json index 44b028cf3c..80baa6b2b9 100644 --- a/doc/api/dhcp-disable.json +++ b/doc/api/dhcp-disable.json @@ -9,5 +9,5 @@ \"arguments\": { \"max-period\": 20 } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/dhcp-enable.json b/doc/api/dhcp-enable.json index 6b90c397b0..a945b931f4 100644 --- a/doc/api/dhcp-enable.json +++ b/doc/api/dhcp-enable.json @@ -6,5 +6,5 @@ "avail": "1.4.0", "cmd-syntax": "{ \"command\": \"dhcp-enable\" -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index 35757f6541..1a2b21280e 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -11,5 +11,5 @@ \"ip-address\": \"192.0.2.202\", \"hw-address\": \"1a:1b:1c:1d:1e:1f\" } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/lease4-del.json b/doc/api/lease4-del.json index f1799533ce..274f5664fb 100644 --- a/doc/api/lease4-del.json +++ b/doc/api/lease4-del.json @@ -11,5 +11,5 @@ \"ip-address\": \"192.0.2.202\" } }", - "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found.", -} \ No newline at end of file + "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found." +} diff --git a/doc/api/lease4-get-all.json b/doc/api/lease4-get-all.json index a52b765a7b..f8a60b8dd0 100644 --- a/doc/api/lease4-get-all.json +++ b/doc/api/lease4-get-all.json @@ -8,5 +8,5 @@ "cmd-syntax": "{ \"command\": \"lease4-get-all\" }", - "cmd-comment": "The lease4-get-all command may result in very large responses.", -} \ No newline at end of file + "cmd-comment": "The lease4-get-all command may result in very large responses." +} diff --git a/doc/api/lease4-get.json b/doc/api/lease4-get.json index 9051621077..5512e84474 100644 --- a/doc/api/lease4-get.json +++ b/doc/api/lease4-get.json @@ -28,4 +28,4 @@ \"text\": \"IPv4 lease found.\" }", "resp-comment": "lease4-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty)." -} \ No newline at end of file +} diff --git a/doc/api/lease4-update.json b/doc/api/lease4-update.json index c8f6c2ef9c..416a3263d8 100644 --- a/doc/api/lease4-update.json +++ b/doc/api/lease4-update.json @@ -14,5 +14,5 @@ \"subnet-id\": 44, \"force-create\": true } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/lease4-wipe.json b/doc/api/lease4-wipe.json index 94b7daea52..8b357ac46c 100644 --- a/doc/api/lease4-wipe.json +++ b/doc/api/lease4-wipe.json @@ -10,6 +10,5 @@ \"arguments\": { \"subnet-id\": 44 } +}" } -", -} \ No newline at end of file diff --git a/doc/api/lease6-add.json b/doc/api/lease6-add.json index b77a24ca2f..ac361b110f 100644 --- a/doc/api/lease6-add.json +++ b/doc/api/lease6-add.json @@ -16,5 +16,5 @@ }", "cmd-comment": "lease6-add can be also used to add leases for IPv6 prefixes..", "resp-syntax": "{ \"result\": 0, \"text\": \"Lease added.\" } - { \"result\": 1, \"text\": \"missing parameter 'ip-address' (:3:19)\" }", -} \ No newline at end of file + { \"result\": 1, \"text\": \"missing parameter 'ip-address' (:3:19)\" }" +} diff --git a/doc/api/lease6-del.json b/doc/api/lease6-del.json index 5275393adc..0f5ab56b1c 100644 --- a/doc/api/lease6-del.json +++ b/doc/api/lease6-del.json @@ -2,7 +2,7 @@ "name": "lease6-del", "brief": "lease6-del can be used to delete a lease from the lease database.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6"" ], + "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ @@ -11,5 +11,5 @@ \"ip-address\": \"192.0.2.202\" } }", - "cmd-comment": "lease6-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty).", -} \ No newline at end of file + "cmd-comment": "lease6-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty)." +} diff --git a/doc/api/lease6-update.json b/doc/api/lease6-update.json index 7add848694..adfafc3d3b 100644 --- a/doc/api/lease6-update.json +++ b/doc/api/lease6-update.json @@ -16,5 +16,5 @@ \"force-create\": false } } -", -} \ No newline at end of file +" +} diff --git a/doc/api/lease6-wipe.json b/doc/api/lease6-wipe.json index c50bcd2332..cffbf1d501 100644 --- a/doc/api/lease6-wipe.json +++ b/doc/api/lease6-wipe.json @@ -11,5 +11,5 @@ \"subnet-id\": 66 } }", - "cmd-comment": "Note: not all backends support this command.", -} \ No newline at end of file + "cmd-comment": "Note: not all backends support this command." +} diff --git a/doc/api/leases-reclaim.json b/doc/api/leases-reclaim.json index 45fba07933..c6d9b8f2bc 100644 --- a/doc/api/leases-reclaim.json +++ b/doc/api/leases-reclaim.json @@ -9,5 +9,5 @@ \"arguments\": { \"remove\": true } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/libreload.json b/doc/api/libreload.json index 81ab60fd96..3b881a990a 100644 --- a/doc/api/libreload.json +++ b/doc/api/libreload.json @@ -8,5 +8,5 @@ \"command\": \"libreload\", \"arguments\": { } }", - "cmd-comment": "The server will respond with a result of 0 indicating success, or 1 indicating a failure.", -} \ No newline at end of file + "cmd-comment": "The server will respond with a result of 0 indicating success, or 1 indicating a failure." +} diff --git a/doc/api/list-commands.json b/doc/api/list-commands.json index fb36bc05d8..e7a58962f3 100644 --- a/doc/api/list-commands.json +++ b/doc/api/list-commands.json @@ -2,11 +2,11 @@ "name": "list-commands", "brief": "The list-commands command retrieves a list of all commands supported by the server.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6" , "ca" ], "avail": "1.0.0", "cmd-syntax": "{ \"command\": \"list-commands\", \"arguments\": { } }", - "cmd-comment": "The server will respond with a list of all supported commands.", -} \ No newline at end of file + "cmd-comment": "The server will respond with a list of all supported commands." +} diff --git a/doc/api/network4-add.json b/doc/api/network4-add.json index 663660a044..79d94222b1 100644 --- a/doc/api/network4-add.json +++ b/doc/api/network4-add.json @@ -41,6 +41,6 @@ \"shared-networks\": [ { \"name\": \"floor13\" } ] }, \"result\": 0, - \"text\": \"A new IPv4 shared network \'floor13\' added\" -}", -} \ No newline at end of file + \"text\": \"A new IPv4 shared network 'floor13' added\" +}" +} diff --git a/doc/api/network4-del.json b/doc/api/network4-del.json index 8aa783969f..ec5727eae6 100644 --- a/doc/api/network4-del.json +++ b/doc/api/network4-del.json @@ -20,6 +20,6 @@ ] }, \"result\": 0, - \"text\": \"IPv4 shared network \'floor13\' deleted\" -}", -} \ No newline at end of file + \"text\": \"IPv4 shared network 'floor13' deleted\" +}" +} diff --git a/doc/api/network4-get.json b/doc/api/network4-get.json index caecb1a1fd..bef4a308d3 100644 --- a/doc/api/network4-get.json +++ b/doc/api/network4-get.json @@ -13,7 +13,7 @@ }", "resp-syntax": "{ \"result\": 0, - \"text\": \"Info about IPv4 shared network \'floor13\' returned\", + \"text\": \"Info about IPv4 shared network 'floor13' returned\", \"arguments\": { \"shared-networks\": [ { @@ -44,4 +44,4 @@ } }", "resp-comment": "Note that the actual response contains many additional fields that are omitted here for clarity." -} \ No newline at end of file +} diff --git a/doc/api/network4-list.json b/doc/api/network4-list.json index b1554ca7e0..a1ec62a6ff 100644 --- a/doc/api/network4-list.json +++ b/doc/api/network4-list.json @@ -7,7 +7,7 @@ "hook": "subnet_cmds", "cmd-syntax": "{ \"command\": \"network4-list\" -}d", +}", "resp-syntax": "{ \"arguments\": { \"shared-networks\": [ @@ -17,5 +17,5 @@ }, \"result\": 0, \"text\": \"2 IPv4 network(s) found\" -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/network4-subnet-add.json b/doc/api/network4-subnet-add.json index 5840c942ad..4eb8080e33 100644 --- a/doc/api/network4-subnet-add.json +++ b/doc/api/network4-subnet-add.json @@ -14,6 +14,6 @@ }", "resp-syntax": "{ \"result\": 0, - \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network \'floor1\'\" -}", -} \ No newline at end of file + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'\" +}" +} diff --git a/doc/api/network4-subnet-del.json b/doc/api/network4-subnet-del.json index e8ab0a70d0..1fb9ed7b05 100644 --- a/doc/api/network4-subnet-del.json +++ b/doc/api/network4-subnet-del.json @@ -14,6 +14,6 @@ }", "resp-syntax": "{ \"result\": 0, - \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network \'floor13\'\" -}", -} \ No newline at end of file + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'\" +}" +} diff --git a/doc/api/network6-add.json b/doc/api/network6-add.json index d3804f42f3..d3b56c944a 100644 --- a/doc/api/network6-add.json +++ b/doc/api/network6-add.json @@ -42,6 +42,6 @@ \"shared-networks\": [ { \"name\": \"floor13\" } ] }, \"result\": 0, - \"text\": \"A new IPv4 shared network \'floor13\' added\" -}", -} \ No newline at end of file + \"text\": \"A new IPv4 shared network 'floor13' added\" +}" +} diff --git a/doc/api/network6-del.json b/doc/api/network6-del.json index f78aa60d02..84e509f49b 100644 --- a/doc/api/network6-del.json +++ b/doc/api/network6-del.json @@ -18,5 +18,5 @@ \"name\": \"floor13\", \"subnets-action\": \"delete\" } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/network6-get.json b/doc/api/network6-get.json index 2f48d204eb..69e8b35257 100644 --- a/doc/api/network6-get.json +++ b/doc/api/network6-get.json @@ -13,7 +13,7 @@ }", "resp-syntax": "{ \"result\": 0, - \"text\": \"Info about IPv4 shared network \'floor13\' returned\", + \"text\": \"Info about IPv4 shared network 'floor13' returned\", \"arguments\": { \"shared-networks\": [ { @@ -44,4 +44,4 @@ } }", "resp-comment": "Note that the actual response contains many additional fields that are omitted here for clarity." -} \ No newline at end of file +} diff --git a/doc/api/network6-list.json b/doc/api/network6-list.json index c9e5447a95..64cd2089ca 100644 --- a/doc/api/network6-list.json +++ b/doc/api/network6-list.json @@ -16,7 +16,7 @@ { \"name\": \"office\" } ] }, - "result": 0, - "text": "2 IPv4 network(s) found" -}", -} \ No newline at end of file + \"result\": 0, + \"text\": \"2 IPv4 network(s) found\" +}" +} diff --git a/doc/api/network6-subnet-add.json b/doc/api/network6-subnet-add.json index bc406d7883..0864d353eb 100644 --- a/doc/api/network6-subnet-add.json +++ b/doc/api/network6-subnet-add.json @@ -15,6 +15,6 @@ "cmd-comment": "The network6-subnet-add command uses exactly the same syntax for both the command and the response.", "resp-syntax": "{ \"result\": 0, - \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network \'floor1\'\" -}", -} \ No newline at end of file + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'\" +}" +} diff --git a/doc/api/network6-subnet-del.json b/doc/api/network6-subnet-del.json index f6d8fc91f1..f0e12e123f 100644 --- a/doc/api/network6-subnet-del.json +++ b/doc/api/network6-subnet-del.json @@ -15,6 +15,6 @@ "cmd-comment": "The network6-subnet-del command uses exactly the same syntax for both the command and the response.", "resp-syntax": "{ \"result\": 0, - \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network \'floor13\'\" -}", -} \ No newline at end of file + \"text\": \"IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'\" +}" +} diff --git a/doc/api/shutdown.json b/doc/api/shutdown.json index 593154b041..137418ecf2 100644 --- a/doc/api/shutdown.json +++ b/doc/api/shutdown.json @@ -7,5 +7,5 @@ "cmd-syntax": "{ \"command\": \"shutdown\" }", - "cmd-comment": "The server will respond with a confirmation that the shutdown procedure has been initiated.", -} \ No newline at end of file + "cmd-comment": "The server will respond with a confirmation that the shutdown procedure has been initiated." +} diff --git a/doc/api/stat-lease4-get.json b/doc/api/stat-lease4-get.json index 3aac547227..d8f16452b7 100644 --- a/doc/api/stat-lease4-get.json +++ b/doc/api/stat-lease4-get.json @@ -21,5 +21,5 @@ \"timestamp\": \"2018-05-04 15:03:37.000000\" } } - }", -} \ No newline at end of file + }" +} diff --git a/doc/api/stat-lease6-get.json b/doc/api/stat-lease6-get.json index 6967f4b275..29b96e8704 100644 --- a/doc/api/stat-lease6-get.json +++ b/doc/api/stat-lease6-get.json @@ -25,5 +25,5 @@ \"timestamp\": \"2018-05-04 15:03:37.000000\" } } - }", -} \ No newline at end of file + }" +} diff --git a/doc/api/statistic-get-all.json b/doc/api/statistic-get-all.json index 6c6d63654f..fcfdce1161 100644 --- a/doc/api/statistic-get-all.json +++ b/doc/api/statistic-get-all.json @@ -8,5 +8,5 @@ \"command\": \"statistic-get-all\", \"arguments\": { } }", - "cmd-comment": "The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero).", -} \ No newline at end of file + "cmd-comment": "The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero)." +} diff --git a/doc/api/statistic-get.json b/doc/api/statistic-get.json index 70dcb92618..97cf96ef87 100644 --- a/doc/api/statistic-get.json +++ b/doc/api/statistic-get.json @@ -10,5 +10,5 @@ \"name\": \"pkt4-received\" } }", - "cmd-comment": "The server will respond with details of the requested statistic, with a result set to 0 indicating success and the specified statistic as the value of the "arguments" parameter.", -} \ No newline at end of file + "cmd-comment": "The server will respond with details of the requested statistic, with a result set to 0 indicating success and the specified statistic as the value of the \"arguments\" parameter." +} diff --git a/doc/api/statistic-remove-all.json b/doc/api/statistic-remove-all.json index 821992ac28..b1cae435b3 100644 --- a/doc/api/statistic-remove-all.json +++ b/doc/api/statistic-remove-all.json @@ -8,5 +8,5 @@ \"command\": \"statistic-remove-all\", \"arguments\": { } }", - "cmd-comment": "If the removal of all statistics was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.", -} \ No newline at end of file + "cmd-comment": "If the removal of all statistics was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description." +} diff --git a/doc/api/statistic-remove.json b/doc/api/statistic-remove.json index a2bfb4ff28..8e3eaa6874 100644 --- a/doc/api/statistic-remove.json +++ b/doc/api/statistic-remove.json @@ -10,5 +10,5 @@ \"name\": \"pkt4-received\" } }", - "cmd-comment": "If the specific statistic is found and its removal was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.", -} \ No newline at end of file + "cmd-comment": "If the specific statistic is found and its removal was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description." +} -- GitLab From f4f012cd92194966d7b567095753ba327e639ce6 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 16:59:00 -0400 Subject: [PATCH 095/169] Add new file --- doc/api/subnet4-del.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/api/subnet4-del.json diff --git a/doc/api/subnet4-del.json b/doc/api/subnet4-del.json new file mode 100644 index 0000000000..19c6999442 --- /dev/null +++ b/doc/api/subnet4-del.json @@ -0,0 +1,26 @@ +{ + "name": "subnet4-del", + "brief": "This command is used to remove a subnet from the server\'s configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server\'s administrator should be aware of.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet4-del\", + \"arguments\": { + \"id\": 123 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv4 subnet 192.0.2.0/24 (id 123) deleted\", + \"arguments\": { + \"subnets\": [ + { + \"id\": 123, + \"subnet\": \"192.0.2.0/24\" + } + ] + } +}", +} \ No newline at end of file -- GitLab From 4f98405fd28e467c1b347e73868f260c9d0f7aef Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:20:53 -0400 Subject: [PATCH 096/169] Add new file --- doc/api/subnet4-get.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/api/subnet4-get.json diff --git a/doc/api/subnet4-get.json b/doc/api/subnet4-get.json new file mode 100644 index 0000000000..79ba6f927b --- /dev/null +++ b/doc/api/subnet4-get.json @@ -0,0 +1,30 @@ +{ + "name": "subnet4-get", + "brief": "This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet4-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet4-get\", + \"arguments\": { + \"id\": 10 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"Info about IPv4 subnet 10.0.0.0/8 (id 10) returned\", + \"arguments\": { + \"subnets\": [ + { + \"subnet\": \"10.0.0.0/8\", + \"id\": 1, + \"option-data\": [ + .... + ] + ... + } + ] + } +}", +} \ No newline at end of file -- GitLab From 4ff43d103cf75688b034b8066269e274669f6d4b Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:32:06 -0400 Subject: [PATCH 097/169] Add new file --- doc/api/subnet4-list.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/api/subnet4-list.json diff --git a/doc/api/subnet4-list.json b/doc/api/subnet4-list.json new file mode 100644 index 0000000000..9166a3a1b2 --- /dev/null +++ b/doc/api/subnet4-list.json @@ -0,0 +1,27 @@ +{ + "name": "subnet4-list", + "brief": "This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet4-list\" +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"2 IPv4 subnets found\", + \"arguments\": { + \"subnets\": [ + { + \"id\": 10, + \"subnet\": \"10.0.0.0/8\" + }, + { + \"id\": 100, + \"subnet\": \"192.0.2.0/24\" + } + ] +}", + "resp-comment": "If no IPv4 subnets are found, an error code is returned along with the error description." +} \ No newline at end of file -- GitLab From df1c3b21baaa9fd9350db372aae4773bbaa86e49 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:37:08 -0400 Subject: [PATCH 098/169] Add new file --- doc/api/subnet6-add.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/api/subnet6-add.json diff --git a/doc/api/subnet6-add.json b/doc/api/subnet6-add.json new file mode 100644 index 0000000000..ece6ece43f --- /dev/null +++ b/doc/api/subnet6-add.json @@ -0,0 +1,30 @@ +{ + "name": "subnet6-add", + "brief": "This command is used to create and add new subnet to the existing server configuration. This operation has no impact on other subnets.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet6-add\", + \"arguments\": { + \"subnet6\": [ { + \"id\": 234, + \"subnet\": \"2001:db8:1::/64\", + ... + } ] + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv6 subnet added\", + \"arguments\": { + \"subnet6\": [ + { + \"id\": 234, + \"subnet\": \"2001:db8:1::/64\" + } + ] + } +}", +} \ No newline at end of file -- GitLab From a20bdbd14f65993ad340dd9df8b07714c3b1be49 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:41:55 -0400 Subject: [PATCH 099/169] Add new file --- doc/api/subnet6-del.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/api/subnet6-del.json diff --git a/doc/api/subnet6-del.json b/doc/api/subnet6-del.json new file mode 100644 index 0000000000..636f8c2a0a --- /dev/null +++ b/doc/api/subnet6-del.json @@ -0,0 +1,24 @@ +{ + "name": "subnet6-del", + "brief": "This command is used to remove a subnet from the server\'s configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server\'s administrator should be aware of.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet6-del\", + \"arguments\": { + \"id\": 234 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"IPv6 subnet 2001:db8:1::/64 (id 234) deleted\", + \"subnets\": [ + { + \"id\": 234, + \"subnet\": \"2001:db8:1::/64\" + } + ] +}", +} \ No newline at end of file -- GitLab From bc57c37c6ea22fde5e8ede5abe56c0e287e2bec0 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:46:52 -0400 Subject: [PATCH 100/169] Add new file --- doc/api/subnet6-get.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/api/subnet6-get.json diff --git a/doc/api/subnet6-get.json b/doc/api/subnet6-get.json new file mode 100644 index 0000000000..7541db6d13 --- /dev/null +++ b/doc/api/subnet6-get.json @@ -0,0 +1,30 @@ +{ + "name": "subnet6-get", + "brief": "This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet6-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet6-get\", + \"arguments\": { + \"id\": 11 + } +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"Info about IPv6 subnet 2001:db8:1::/64 (id 11) returned\", + \"arguments\": { + \"subnets\": [ + { + \"subnet\": \"2001:db8:1::/64\", + \"id\": 1, + \"option-data\": [ + ... + ] + .... + } + ] + } +}", +} \ No newline at end of file -- GitLab From 384567fdae82de44664267f36c786b3d267e8649 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:51:54 -0400 Subject: [PATCH 101/169] Add new file --- doc/api/subnet6-list.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/api/subnet6-list.json diff --git a/doc/api/subnet6-list.json b/doc/api/subnet6-list.json new file mode 100644 index 0000000000..98a2530a0f --- /dev/null +++ b/doc/api/subnet6-list.json @@ -0,0 +1,27 @@ +{ + "name": "subnet6-list", + "brief": "This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.3.0", + "hook": "subnet_cmds", + "cmd-syntax": "{ + \"command\": \"subnet6-list\" +}", + "resp-syntax": "{ + \"result\": 0, + \"text\": \"2 IPv6 subnets found\", + \"arguments\": { + \"subnets\": [ + { + \"id\": 11, + \"subnet\": \"2001:db8:1::/64\" + }, + { + \"id\": 233, + \"subnet\": \"3000::/16\" + } + ] +}", + "resp-comment": "If no IPv6 subnets are found, an error code is returned along with the error description." +} \ No newline at end of file -- GitLab From 538f7e51622af883d0b98260eba2b6ac8dde6545 Mon Sep 17 00:00:00 2001 From: Suzanne Goldlust Date: Thu, 4 Oct 2018 17:59:05 -0400 Subject: [PATCH 102/169] Add new file --- doc/api/version-get.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/api/version-get.json diff --git a/doc/api/version-get.json b/doc/api/version-get.json new file mode 100644 index 0000000000..46b8880a10 --- /dev/null +++ b/doc/api/version-get.json @@ -0,0 +1,10 @@ +{ + "name": "version-get", + "brief": "The version-get command returns on the control channel what the command line -v argument displays with in arguments the extended version, i.e., what the command line -V argument displays.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.2.0", + "cmd-syntax": "{ + \"command\": \"version-get\" +}", +} \ No newline at end of file -- GitLab From 191194ff784fff31275d605a8842cddc1e2ad711 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:26:49 +0200 Subject: [PATCH 103/169] [#10,!3] Various small corrections in the json files --- doc/api/config-test.json | 2 +- doc/api/config-write.json | 5 ++-- doc/api/list-commands.json | 2 +- doc/api/network4-list.json | 2 +- doc/api/network6-del.json | 5 ++-- doc/api/network6-list.json | 2 +- doc/api/shutdown.json | 5 ++-- doc/api/stat-lease4-get.json | 10 +++++--- doc/api/stat-lease6-get.json | 5 ++-- doc/api/statistic-reset-all.json | 4 +-- doc/api/statistic-reset.json | 4 +-- doc/api/subnet4-add.json | 4 +-- doc/api/subnet4-del.json | 6 ++--- doc/api/subnet4-get.json | 4 +-- doc/api/subnet6-add.json | 4 +-- doc/api/subnet6-del.json | 6 ++--- doc/api/subnet6-get.json | 4 +-- doc/api/version-get.json | 10 +++++--- doc/docgen/cmds-list | 1 + doc/guide/hooks-ha.xml | 11 +++++---- doc/guide/hooks-lease-cmds.xml | 26 +++++++++++--------- doc/guide/hooks-stat-cmds.xml | 4 +-- doc/guide/hooks.xml | 42 ++++++++++++++++---------------- 23 files changed, 91 insertions(+), 77 deletions(-) diff --git a/doc/api/config-test.json b/doc/api/config-test.json index 079c6d942e..9f5daac5be 100644 --- a/doc/api/config-test.json +++ b/doc/api/config-test.json @@ -2,7 +2,7 @@ "name": "config-test", "brief": "The config-test command instructs the server to check whether the new configuration supplied in the command's arguments can be loaded.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"config-test\", diff --git a/doc/api/config-write.json b/doc/api/config-write.json index b998e866c6..bce80a9007 100644 --- a/doc/api/config-write.json +++ b/doc/api/config-write.json @@ -1,8 +1,9 @@ { "name": "config-write", - "brief": "The config-write command instructs the Kea server to write its current configuration to a file on disk.", + "brief": "The config-write command instructs the Kea server to write its + current configuration to a file on disk.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"config-write\", diff --git a/doc/api/list-commands.json b/doc/api/list-commands.json index e7a58962f3..0e3928895c 100644 --- a/doc/api/list-commands.json +++ b/doc/api/list-commands.json @@ -2,7 +2,7 @@ "name": "list-commands", "brief": "The list-commands command retrieves a list of all commands supported by the server.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" , "ca" ], + "support": [ "kea-dhcp4", "kea-dhcp6" , "kea-ctrl-agent" ], "avail": "1.0.0", "cmd-syntax": "{ \"command\": \"list-commands\", diff --git a/doc/api/network4-list.json b/doc/api/network4-list.json index a1ec62a6ff..865a7c5011 100644 --- a/doc/api/network4-list.json +++ b/doc/api/network4-list.json @@ -1,7 +1,7 @@ { "name": "network4-list", "brief": "The network4-list command is used to retrieve full list of currently configured shared networks.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", diff --git a/doc/api/network6-del.json b/doc/api/network6-del.json index 84e509f49b..5339f2a7aa 100644 --- a/doc/api/network6-del.json +++ b/doc/api/network6-del.json @@ -1,7 +1,7 @@ { "name": "network6-del", "brief": "The network6-del command is used to delete existing shared networks.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", @@ -11,7 +11,8 @@ \"name\": \"floor13\" } }", - "cmd-comment": "The network6-del command uses exactly the same syntax for both the command and the response.", + "cmd-comment": "The network6-del command uses exactly the same syntax for + both the command and the response.", "resp-syntax": "{ \"command\": \"network4-del\", \"arguments\": { diff --git a/doc/api/network6-list.json b/doc/api/network6-list.json index 64cd2089ca..61d731b313 100644 --- a/doc/api/network6-list.json +++ b/doc/api/network6-list.json @@ -1,7 +1,7 @@ { "name": "network6-list", "brief": "The network6-list command is used to retrieve full list of currently configured shared networks.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", diff --git a/doc/api/shutdown.json b/doc/api/shutdown.json index 137418ecf2..5d2c387ad6 100644 --- a/doc/api/shutdown.json +++ b/doc/api/shutdown.json @@ -2,10 +2,11 @@ "name": "shutdown", "brief": "The shutdown command instructs the server to initiate its shutdown procedure.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.0.0", "cmd-syntax": "{ \"command\": \"shutdown\" }", - "cmd-comment": "The server will respond with a confirmation that the shutdown procedure has been initiated." + "cmd-comment": "The server will respond with a confirmation that the shutdown + procedure has been initiated." } diff --git a/doc/api/stat-lease4-get.json b/doc/api/stat-lease4-get.json index d8f16452b7..4ab8f9aaf6 100644 --- a/doc/api/stat-lease4-get.json +++ b/doc/api/stat-lease4-get.json @@ -1,7 +1,8 @@ { "name": "stat-lease4-get", - "brief": "The stat-lease4-get command fetches lease statistics for a range of known subnets.", - "description": "See ", + "brief": "The stat-lease4-get command fetches lease statistics for a range + of known IPv4 subnets.", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", "hook": "stat_cmds", @@ -13,7 +14,10 @@ \"text\": \"stat-lease4-get: 2 rows found\", \"arguments\": { \"result-set\": { - \"columns\": [ \"subnet-id\", \"total-addresses\", \"assigned-addresses\", \"declined-addresses\" ] + \"columns\": [ \"subnet-id\", + \"total-addresses\", + \"assigned-addresses\", + \"declined-addresses\" ] \"rows\": [ [ 10, 256, 111, 0 ], [ 20, 4098, 2034, 4 ] diff --git a/doc/api/stat-lease6-get.json b/doc/api/stat-lease6-get.json index 29b96e8704..4221b0a8a3 100644 --- a/doc/api/stat-lease6-get.json +++ b/doc/api/stat-lease6-get.json @@ -1,7 +1,8 @@ { "name": "stat-lease6-get", - "brief": "The stat-lease6-get command fetches lease statistics for a range of known subnets.", - "description": "See ", + "brief": "The stat-lease6-get command fetches lease statistics for a range + of known IPv6 subnets.", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", "hook": "stat_cmds", diff --git a/doc/api/statistic-reset-all.json b/doc/api/statistic-reset-all.json index deb136aa11..e87ab26c68 100644 --- a/doc/api/statistic-reset-all.json +++ b/doc/api/statistic-reset-all.json @@ -8,5 +8,5 @@ \"command\": \"statistic-reset-all\", \"arguments\": { } }", - "cmd-comment": "If the operation is successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description.", -} \ No newline at end of file + "cmd-comment": "If the operation is successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description." +} diff --git a/doc/api/statistic-reset.json b/doc/api/statistic-reset.json index 32b9d1a22c..c06162aef4 100644 --- a/doc/api/statistic-reset.json +++ b/doc/api/statistic-reset.json @@ -10,5 +10,5 @@ \"name\": \"pkt4-received\" } }", - "cmd-comment": "If the specific statistic is found and reset was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description.", -} \ No newline at end of file + "cmd-comment": "If the specific statistic is found and reset was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description." +} diff --git a/doc/api/subnet4-add.json b/doc/api/subnet4-add.json index 580e72b0be..5256c36b73 100644 --- a/doc/api/subnet4-add.json +++ b/doc/api/subnet4-add.json @@ -26,5 +26,5 @@ } ] } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/subnet4-del.json b/doc/api/subnet4-del.json index 19c6999442..cf3475bf61 100644 --- a/doc/api/subnet4-del.json +++ b/doc/api/subnet4-del.json @@ -1,6 +1,6 @@ { "name": "subnet4-del", - "brief": "This command is used to remove a subnet from the server\'s configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server\'s administrator should be aware of.", + "brief": "This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", @@ -22,5 +22,5 @@ } ] } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/subnet4-get.json b/doc/api/subnet4-get.json index 79ba6f927b..2bef76adc5 100644 --- a/doc/api/subnet4-get.json +++ b/doc/api/subnet4-get.json @@ -26,5 +26,5 @@ } ] } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/subnet6-add.json b/doc/api/subnet6-add.json index ece6ece43f..bd477eb1f3 100644 --- a/doc/api/subnet6-add.json +++ b/doc/api/subnet6-add.json @@ -26,5 +26,5 @@ } ] } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/subnet6-del.json b/doc/api/subnet6-del.json index 636f8c2a0a..3ce5e70096 100644 --- a/doc/api/subnet6-del.json +++ b/doc/api/subnet6-del.json @@ -1,6 +1,6 @@ { "name": "subnet6-del", - "brief": "This command is used to remove a subnet from the server\'s configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server\'s administrator should be aware of.", + "brief": "This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", @@ -20,5 +20,5 @@ \"subnet\": \"2001:db8:1::/64\" } ] -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/subnet6-get.json b/doc/api/subnet6-get.json index 7541db6d13..dde5a00aa2 100644 --- a/doc/api/subnet6-get.json +++ b/doc/api/subnet6-get.json @@ -26,5 +26,5 @@ } ] } -}", -} \ No newline at end of file +}" +} diff --git a/doc/api/version-get.json b/doc/api/version-get.json index 46b8880a10..8daf8639aa 100644 --- a/doc/api/version-get.json +++ b/doc/api/version-get.json @@ -1,10 +1,12 @@ { "name": "version-get", - "brief": "The version-get command returns on the control channel what the command line -v argument displays with in arguments the extended version, i.e., what the command line -V argument displays.", + "brief": "The version-get command returns on the control channel what the + command line -v argument displays with in arguments the extended + version, i.e., what the command line -V argument displays.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", "cmd-syntax": "{ \"command\": \"version-get\" -}", -} \ No newline at end of file +}" +} diff --git a/doc/docgen/cmds-list b/doc/docgen/cmds-list index 6a6bb62a9a..be78abba5f 100644 --- a/doc/docgen/cmds-list +++ b/doc/docgen/cmds-list @@ -12,6 +12,7 @@ config-test config-write dhcp-disable dhcp-enable +ha-continue ha-heartbeat ha-scopes ha-sync diff --git a/doc/guide/hooks-ha.xml b/doc/guide/hooks-ha.xml index a7af55c78a..164483a634 100644 --- a/doc/guide/hooks-ha.xml +++ b/doc/guide/hooks-ha.xml @@ -139,7 +139,8 @@
Server States - The DHCP server operating within an HA setup runs a state machine + The DHCP server operating + within an HA setup runs a state machine and the state of the server can be retrieved by its peers using the ha-heartbeat command sent over the RESTful API. If the partner server doesn't respond to the ha-heartbeat @@ -1292,7 +1293,7 @@ HA hook library which are available for the administrator. -
+
ha-sync command The ha-sync is issued to instruct the server to synchronize its local lease database with the @@ -1346,7 +1347,7 @@
-
+
ha-scopes command This command allows for modifying the HA scopes that the server is serving. Consult @@ -1357,7 +1358,7 @@ { "command": "ha-scopes", - "service": [ "dhcp4 "], + "service": [ "dhcp4" ], "arguments": { "scopes": [ "HA_server1", "HA_server2" ] } @@ -1381,7 +1382,7 @@
-
+
ha-continue command This command is used to resume the operation of the paused HA state machine as described in the . diff --git a/doc/guide/hooks-lease-cmds.xml b/doc/guide/hooks-lease-cmds.xml index 557ada805c..fefa024915 100644 --- a/doc/guide/hooks-lease-cmds.xml +++ b/doc/guide/hooks-lease-cmds.xml @@ -124,9 +124,9 @@ -
+
lease4-add, lease6-add commands - + lease4-add and lease6-add commands allow for the creation of a new lease. Typically Kea creates a lease on its own, when it first sees a new device. However, @@ -284,9 +284,10 @@ The commands can take a number of additional optional parameters: -
+
lease4-get, lease6-get commands - lease4-get or lease6-get + + lease4-get or lease6-get can be used to query the lease database and retrieve existing leases. There are two types of parameters the lease4-get supports: (address) or (subnet-id, @@ -401,9 +402,9 @@ An example result returned when the host was found:
-
+
lease4-get-all, lease6-get-all commands - lease4-get-all and + lease4-get-all and lease6-get-all are used to retrieve all IPv4 or IPv6 leases or all leases for the specified set of subnets. All leases are returned when there are no arguments @@ -610,9 +611,10 @@ An example result returned when the host was found:
-
+
lease4-del, lease6-del commands - leaseX-del can be used to delete a lease from + + leaseX-del can be used to delete a lease from the lease database. There are two types of parameters this command supports, similar to leaseX-get commands: (address) for both v4 and v6, (subnet-id, identifier-type, identifier) for v4 and (subnet-id, @@ -658,9 +660,9 @@ An example IPv4 lease deletion by "hw-address" looks as follows:
-
+
lease4-update, lease6-update commands - lease4-update and + lease4-update and lease6-update commands can be used to update existing leases. Since all lease database backends are indexed by IP addresses, it is not possible to update an address. All other fields @@ -713,9 +715,9 @@ An example IPv4 lease deletion by "hw-address" looks as follows:
-
+
lease4-wipe, lease6-wipe commands - lease4-wipe and + lease4-wipe and lease6-wipe are designed to remove all leases associated with a given subnet. This administrative task is expected to be used when existing subnet is being diff --git a/doc/guide/hooks-stat-cmds.xml b/doc/guide/hooks-stat-cmds.xml index 549f6f1b98..d4604c4737 100644 --- a/doc/guide/hooks-stat-cmds.xml +++ b/doc/guide/hooks-stat-cmds.xml @@ -74,9 +74,9 @@ will not retrieve statistics for it. -
+
stat-lease4-get, stat-lease6-get commands - + The stat-lease4-get and stat-lease6-get commands fetch lease statistics for a range of known subnets. The range of subnets is determined through the use of optional command diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 68c959f004..7f739930d8 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1432,7 +1432,7 @@ Requirements document.
-
+
reservation-add command reservation-add allows for the insertion of a new host. It @@ -1766,7 +1766,7 @@ An example deletion by (subnet-id, identifier-type, identifier) looks as follows -
+
subnet4-list command This command is used to list all currently configured subnets. The @@ -1810,7 +1810,7 @@ An example deletion by (subnet-id, identifier-type, identifier) looks as follows
-
+
subnet6-list command This command is used to list all currently configured subnets. The @@ -1854,7 +1854,7 @@ An example deletion by (subnet-id, identifier-type, identifier) looks as follows
-
+
subnet4-get command This command is used to retrieve detailed information about the specified subnet. This command usually follows the @@ -1906,7 +1906,7 @@ or
-
+
subnet6-get command This command is used to retrieve detailed information about the specified subnet. This command usually follows the @@ -1955,7 +1955,7 @@ If the subnet exists the response will be similar to this:
-
+
subnet4-add This command is used to create and add new subnet to the existing @@ -2004,7 +2004,7 @@ If the subnet exists the response will be similar to this:
-
+
subnet6-add This command is used to create and add new subnet to the existing @@ -2083,7 +2083,7 @@ If the subnet exists the response will be similar to this:
-
+
subnet4-del command This command is used to remove a subnet from the server's configuration. @@ -2143,7 +2143,7 @@ If the subnet exists the response will be similar to this:
-
+
subnet6-del command This command is used to remove a subnet from the server's configuration. @@ -2201,9 +2201,9 @@ If the subnet exists the response will be similar to this:
-
+
network4-list, network6-list commands - + These commands are used to retrieve full list of currently configured shared networks. The list contains only very basic information about each shared network. If more details are needed, please use @@ -2232,9 +2232,9 @@ both the query and the response.
-
+
network4-get, network6-get commands - + These commands are used to retrieve detailed information about shared networks, including subnets currently being part of a given network. Both commands take one @@ -2291,9 +2291,9 @@ shared networks information.
-
+
network4-add, network6-add commands - + These commands are used to add a new shared network. New network has to have unique name. This command requires one parameter shared-networks, which is a list and @@ -2366,9 +2366,9 @@ the response. However, there are some parameters that are IPv4-only applies to subnets within the network.
-
+
network4-del, network6-del commands - + These commands are used to delete existing shared networks. Both commands take exactly one parameter 'name' that specifies the name of the network to be removed. An example invocation @@ -2424,9 +2424,9 @@ both the command and the response. subnet6-del commands.
-
+
network4-subnet-add, network6-subnet-add commands - + These commands are used to add existing subnets to existing shared networks. There are several ways to add new shared network. System administrator can add the whole shared network at once, either by @@ -2483,9 +2483,9 @@ both the command and the response. filled with default values, rather than inherited from global scope or from the shared network.
-
+
network4-subnet-del, network6-subnet-del commands - + These commands are used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet. If you want to remove a subnet completely, use subnet4-del or -- GitLab From 86e4884c389c9b404700894d931f85a36c832da2 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:27:16 +0200 Subject: [PATCH 104/169] [#10,!3] Minor tweak in the docgen tool. --- doc/Makefile.am | 2 +- doc/docgen/kea_docgen.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 611e12f14b..805d5c0454 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -82,7 +82,7 @@ templates: docgen # This will generate the api.xml file using docgen generator. It will # read the JSON files from api/ directory. Make sure they're up to date. -api: templates docgen +api: docgen docgen/kea-docgen api/*.json # This convenience target makes sure the docgen tool is built properly diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index bd22cb6641..a0d665e2e1 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -246,6 +246,7 @@ public: f << "." << endl; } + for (auto hook : all_hooks) { f << "" << "Commands supported by " << hook << " hook library: "; @@ -405,7 +406,7 @@ public: auto hook = cmd->get("hook"); if (hook) { f << " (stringValue() << "-lib\">" - << hook->stringValue() << ")"; + << hook->stringValue() << " hook)"; } else { f << " (built-in)"; } -- GitLab From e568b58f1b569f6083429c6b412bbd290e7a3697 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:32:50 +0200 Subject: [PATCH 105/169] [#10,!3] New JSON docs added to EXTRA_DIST --- doc/Makefile.am | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/Makefile.am b/doc/Makefile.am index 805d5c0454..a4634fa714 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -63,6 +63,41 @@ nobase_dist_doc_DATA += examples/netconf/comments.json nobase_dist_doc_DATA += examples/netconf/simple.json nobase_dist_doc_DATA += examples/netconf/simple-dhcp4.json +EXTRA_DIST += api/build-report.json +EXTRA_DIST += api/cache-clear.json api/cache-get.json +EXTRA_DIST += api/cache-insert.json api/cache-load.json +EXTRA_DIST += api/cache-remove.json api/cache-write.json +EXTRA_DIST += api/config-get.json api/config-reload.json +EXTRA_DIST += api/config-set.json api/config-test.json +EXTRA_DIST += api/config-write.json api/dhcp-disable.json +EXTRA_DIST += api/dhcp-enable.json api/ha-continue.json +EXTRA_DIST += api/ha-heartbeat.json api/ha-scopes.json +EXTRA_DIST += api/ha-sync.json api/lease4-add.json +EXTRA_DIST += api/lease4-del.json api/lease4-get-all.json +EXTRA_DIST += api/lease4-get.json api/lease4-update.json +EXTRA_DIST += api/lease4-wipe.json api/lease6-add.json +EXTRA_DIST += api/lease6-del.json api/lease6-get-all.json +EXTRA_DIST += api/lease6-get.json api/lease6-update.json +EXTRA_DIST += api/lease6-wipe.json api/leases-reclaim.json +EXTRA_DIST += api/libreload.json api/list-commands.json +EXTRA_DIST += api/network4-add.json api/network4-del.json +EXTRA_DIST += api/network4-get.json api/network4-list.json +EXTRA_DIST += api/network4-subnet-add.json api/network4-subnet-del.json +EXTRA_DIST += api/network6-add.json api/network6-del.json +EXTRA_DIST += api/network6-get.json api/network6-list.json +EXTRA_DIST += api/network6-subnet-add.json api/network6-subnet-del.json +EXTRA_DIST += api/reservation-add.json api/reservation-del.json +EXTRA_DIST += api/reservation-get.json api/shutdown.json +EXTRA_DIST += api/statistic-get-all.json api/statistic-get.json +EXTRA_DIST += api/statistic-remove-all.json api/statistic-remove.json +EXTRA_DIST += api/statistic-reset-all.json api/statistic-reset.json +EXTRA_DIST += api/stat-lease4-get.json api/stat-lease6-get.json +EXTRA_DIST += api/subnet4-add.json api/subnet4-del.json +EXTRA_DIST += api/subnet4-get.json api/subnet4-list.json +EXTRA_DIST += api/subnet6-add.json api/subnet6-del.json +EXTRA_DIST += api/subnet6-get.json api/subnet6-list.json +EXTRA_DIST += api/_template.json api/version-get.json + devel: mkdir -p html (cat Doxyfile; echo PROJECT_NUMBER=$(PACKAGE_VERSION)) | doxygen - > html/doxygen.log 2> html/doxygen-error.log -- GitLab From 3a53d6b4e4603eda87fbdeb33dc1a97077b74daf Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:33:30 +0200 Subject: [PATCH 106/169] [#10,!3] Added generated api.xml --- doc/guide/api.xml | 3048 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3048 insertions(+) create mode 100644 doc/guide/api.xml diff --git a/doc/guide/api.xml b/doc/guide/api.xml new file mode 100644 index 0000000000..98e4fd6dd0 --- /dev/null +++ b/doc/guide/api.xml @@ -0,0 +1,3048 @@ + + + + + API Reference + Kea currently supports 66 commands: +build-report +, cache-clear +, cache-get +, cache-insert +, cache-load +, cache-remove +, cache-write +, config-get +, config-reload +, config-set +, config-test +, config-write +, dhcp-disable +, dhcp-enable +, ha-continue +, ha-heartbeat +, ha-scopes +, ha-sync +, lease4-add +, lease4-del +, lease4-get +, lease4-get-all +, lease4-update +, lease4-wipe +, lease6-add +, lease6-del +, lease6-get +, lease6-get-all +, lease6-update +, lease6-wipe +, leases-reclaim +, libreload +, list-commands +, network4-add +, network4-del +, network4-get +, network4-list +, network4-subnet-add +, network4-subnet-del +, network6-add +, network6-del +, network6-get +, network6-list +, network6-subnet-add +, network6-subnet-del +, reservation-add +, reservation-del +, reservation-get +, shutdown +, stat-lease4-get +, stat-lease6-get +, statistic-get +, statistic-get-all +, statistic-remove +, statistic-remove-all +, statistic-reset +, statistic-reset-all +, subnet4-add +, subnet4-del +, subnet4-get +, subnet4-list +, subnet6-add +, subnet6-del +, subnet6-get +, subnet6-list +, version-get +. +Commands supported by kea-ctrl-agent daemon: build-report +, config-get +, config-test +, config-write +, list-commands +, shutdown +, version-get +. +Commands supported by kea-dhcp4 daemon: build-report +, cache-clear +, cache-get +, cache-insert +, cache-load +, cache-remove +, cache-write +, config-get +, config-reload +, config-set +, config-test +, config-write +, dhcp-disable +, dhcp-enable +, ha-continue +, ha-heartbeat +, ha-scopes +, ha-sync +, lease4-add +, lease4-del +, lease4-get +, lease4-get-all +, lease4-update +, lease4-wipe +, lease6-add +, lease6-del +, lease6-get +, lease6-get-all +, lease6-update +, lease6-wipe +, leases-reclaim +, libreload +, list-commands +, network4-add +, network4-del +, network4-get +, network4-list +, network4-subnet-add +, network4-subnet-del +, network6-add +, network6-del +, network6-get +, network6-list +, network6-subnet-add +, network6-subnet-del +, reservation-add +, reservation-del +, reservation-get +, shutdown +, stat-lease4-get +, stat-lease6-get +, statistic-get +, statistic-get-all +, statistic-remove +, statistic-remove-all +, statistic-reset +, statistic-reset-all +, subnet4-add +, subnet4-del +, subnet4-get +, subnet4-list +, subnet6-add +, subnet6-del +, subnet6-get +, subnet6-list +, version-get +. +Commands supported by kea-dhcp6 daemon: build-report +, cache-clear +, cache-get +, cache-insert +, cache-load +, cache-remove +, cache-write +, config-get +, config-reload +, config-set +, config-test +, config-write +, dhcp-disable +, dhcp-enable +, ha-continue +, ha-heartbeat +, ha-scopes +, ha-sync +, lease4-add +, lease4-del +, lease4-get +, lease4-get-all +, lease4-update +, lease4-wipe +, lease6-add +, lease6-del +, lease6-get +, lease6-get-all +, lease6-update +, lease6-wipe +, leases-reclaim +, libreload +, list-commands +, network4-add +, network4-del +, network4-get +, network4-list +, network4-subnet-add +, network4-subnet-del +, network6-add +, network6-del +, network6-get +, network6-list +, network6-subnet-add +, network6-subnet-del +, reservation-add +, reservation-del +, reservation-get +, shutdown +, stat-lease4-get +, stat-lease6-get +, statistic-get +, statistic-get-all +, statistic-remove +, statistic-remove-all +, statistic-reset +, statistic-reset-all +, subnet4-add +, subnet4-del +, subnet4-get +, subnet4-list +, subnet6-add +, subnet6-del +, subnet6-get +, subnet6-list +, version-get +. +Commands supported by high_availability hook library: ha-continue +, ha-heartbeat +, ha-scopes +, ha-sync +. +Commands supported by host_cache hook library: cache-clear +, cache-get +, cache-insert +, cache-load +, cache-remove +, cache-write +. +Commands supported by host_cmds hook library: reservation-add +, reservation-del +, reservation-get +. +Commands supported by lease_cmds hook library: lease4-add +, lease4-del +, lease4-get +, lease4-get-all +, lease4-update +, lease4-wipe +, lease6-add +, lease6-del +, lease6-get +, lease6-get-all +, lease6-update +, lease6-wipe +. +Commands supported by stat_cmds hook library: stat-lease4-get +, stat-lease6-get +. +Commands supported by subnet_cmds hook library: network4-add +, network4-del +, network4-get +, network4-list +, network4-subnet-add +, network4-subnet-del +, network6-add +, network6-del +, network6-get +, network6-list +, network6-subnet-add +, network6-subnet-del +, subnet4-add +, subnet4-del +, subnet4-get +, subnet4-list +, subnet6-add +, subnet6-del +, subnet6-get +, subnet6-list +. + +
+build-report reference +build-report - returns a list of compilation options that this particular binary was built with + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "build-report" +} + + +Response syntax: + { + "result": 0, + "text": <string with build details> +} + + +
+ + + +
+cache-clear reference +cache-clear - This command removes all cached host reservations. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-clear" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+cache-get reference +cache-get - Returns full content of the host cache. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-get" +} + + +Response syntax: + { + "result": 0 + "text": "123 entries returned." + "arguments": <list of host reservations> +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+cache-insert reference +cache-insert - This command may be used to manually insert a host into the cache. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-insert", + "arguments": { + "hw-address": "01:02:03:04:05:06", + "subnet-id4": 4, + "subnet-id6": 0, + "ip-address": "192.0.2.100", + "hostname": "somehost.example.org", + "client-classes4": [ ], + "client-classes6": [ ], + "option-data4": [ ], + "option-data6": [ ], + "next-server": "192.0.0.2", + "server-hostname": "server-hostname.example.org", + "boot-file-name": "bootfile.efi", + "host-id": 0 + } +}, +{ + "command": "cache-insert", + "arguments": { + "hw-address": "01:02:03:04:05:06", + "subnet-id4": 0, + "subnet-id6": 6, + "ip-addresses": [ "2001:db8::cafe:babe" ], + "prefixes": [ "2001:db8:dead:beef::/64" ], + "hostname": "", + "client-classes4": [ ], + "client-classes6": [ ], + "option-data4": [ ], + "option-data6": [ ], + "next-server": "0.0.0.0", + "server-hostname": "", + "boot-file-name": "", + "host-id": 0 + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+cache-load reference +cache-load - This command allows load the contents of a file on disk into an in-memory cache. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-load", + "arguments": "/tmp/kea-host-cache.json" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+cache-remove reference +cache-remove - The cache-remove command works similarly to reservation-get command. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-remove", + "arguments": { + "ip-address": "192.0.2.1", + "subnet-id": 123 + } +} +{ + "command": "cache-remove", + "arguments": { + "duid": "00:01:ab:cd:f0:a1:c2:d3:e4", + "subnet-id": 123 + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+cache-write reference +cache-write - Instructs Kea to write its host cache content to disk. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (host_cache hook) + +Description and examples: See + +Command syntax: + { + "command": "cache-write", + "arguments": "/path/to/the/file.json" +} +The command takes one mandatory argument that specifies a filename path of a file to be written. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-get reference +config-get - retrieves the current configuration used by the server. The configuration + is roughtly equal to the configuration file, but includes additional + changes made by other commands and due to parameters inheritance. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "config-get" +} +<command>config-get</command> takes no parameters. + +Response syntax: + { + "result": <integer>, + "arguments": { + <JSON configuration here, starting with Dhcp4, Dhcp6, or Control-agent object> + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-reload reference +config-reload - The config-reload command instructs Kea to load again the configuration file that was used previously. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "config-reload" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-set reference +config-set - The config-set command instructs the server to replace its current configuration with the new configuration supplied in the command's arguments. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "config-set", + "arguments": { + "<server>": { + }, + "Logging": { + } + } +} +where <server> is the configuration element name for a given server such as "Dhcp4" or "Dhcp6" + +Response syntax: + {"result": 0, "text": "Configuration successful." } + + or + + {"result": 1, "text": "unsupported parameter: BOGUS (<string>:16:26)" } +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-test reference +config-test - The config-test command instructs the server to check whether the new configuration supplied in the command's arguments can be loaded. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "config-test", + "arguments": { + "<server>": { + }, + "Logging": { + } + } +} +where <server> is the configuration element name for a given server such as "Dhcp4" or "Dhcp6" + +Response syntax: + {"result": 0, "text": "Configuration seems sane..." } + + or + + {"result": 1, "text": "unsupported parameter: BOGUS (<string>:16:26)" } +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+config-write reference +config-write - The config-write command instructs the Kea server to write its + current configuration to a file on disk. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "config-write", + "arguments": { + "filename": "config-modified-2017-03-15.json" + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+dhcp-disable reference +dhcp-disable - The dhcp-disable command globally disables the DHCP service. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "dhcp-disable", + "arguments": { + "max-period": 20 + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+dhcp-enable reference +dhcp-enable - The dhcp-enable command globally enables the DHCP service. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "dhcp-enable" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+ha-continue reference +ha-continue - This command is used to resume the operation of the paused HA state machine. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (high_availability hook) + +Description and examples: See + +Command syntax: + { + "command": "ha-continue" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+ha-heartbeat reference +ha-heartbeat - This command is sent internally by Kea partner when operating + in High Availability (HA) mode. It should not be used by users, + unless you want to implement complete HA replacement. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (high_availability hook) + +Description and examples: See + +Command syntax: + tbd + + +Response syntax: + tbd +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+ha-scopes reference +ha-scopes - This command allows for modifying the High Availability (HA) scopes + that the server is serving.a sentence or two explaining what this command does + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (high_availability hook) + +Description and examples: See + +Command syntax: + { + "command": "ha-scopes", + "service": [ <service, typically "dhcp4" or "dhcp6"> ], + "arguments": { + "scopes": [ "HA_server1", "HA_server2" ] + } +} + + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+ha-sync reference +ha-sync - The command is issued to instruct the server running in HA mode to + synchronize its local lease database with the selected peer. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (high_availability hook) + +Description and examples: See + +Command syntax: + { + "command": "ha-sync", + "service": [ <service affected: "dhcp4" or "dhcp6" ], + "arguments": { + "server-name": <name of the partner server>, + "max-period": <integer, in seconds> + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease4-add reference +lease4-add - The lease4-add command allows for the creation of a new lease. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-add", + "arguments": { + "ip-address": "192.0.2.202", + "hw-address": "1a:1b:1c:1d:1e:1f" + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease4-del reference +lease4-del - lease4-del can be used to delete a lease from the lease database. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-del", + "arguments": { + "ip-address": "192.0.2.202" + } +} +leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease4-get reference +lease4-get - lease4-get can be used to query the lease database and retrieve existing leases. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-get", + "arguments": { + "ip-address": "192.0.2.1" + } +} + + +Response syntax: + { + "arguments": { + "client-id": "42:42:42:42:42:42:42:42", + "cltt": 12345678, + "fqdn-fwd": false, + "fqdn-rev": true, + "hostname": "myhost.example.com.", + "hw-address": "08:08:08:08:08:08", + "ip-address": "192.0.2.1", + "state": 0, + "subnet-id": 44, + "valid-lft": 3600 + }, + "result": 0, + "text": "IPv4 lease found." +} +lease4-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty). + +
+ + + +
+lease4-get-all reference +lease4-get-all - lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-get-all" +} +The lease4-get-all command may result in very large responses. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease4-update reference +lease4-update - The lease4-update command can be used to update existing leases. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-update", + "arguments": { + "ip-address": "192.0.2.1", + "hostname": "newhostname.example.org", + "hw-address": "1a:1b:1c:1d:1e:1f", + "subnet-id": 44, + "force-create": true + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease4-wipe reference +lease4-wipe - lease4-wipe is designed to remove all leases associated with a given subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-wipe", + "arguments": { + "subnet-id": 44 + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease6-add reference +lease6-add - The lease6-add command allows for the creation of a new lease. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease6-add", + "arguments": { + "subnet-id": 66, + "ip-address": "2001:db8::3", + "duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24", + "iaid": 1234 + } +} +lease6-add can be also used to add leases for IPv6 prefixes.. + +Response syntax: + { "result": 0, "text": "Lease added." } + { "result": 1, "text": "missing parameter 'ip-address' (<string>:3:19)" } +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease6-del reference +lease6-del - lease6-del can be used to delete a lease from the lease database. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease4-del", + "arguments": { + "ip-address": "192.0.2.202" + } +} +lease6-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease6-get reference +lease6-get - lease6-get can be used to query the lease database and retrieve existing leases. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease6-get", + "arguments": { + "ip-address": "2001:db8:1234:ab::", + "type": "IA_PD" + } +} +lease6-get returns a result that indicates a result of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error) or 2 (empty). + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease6-get-all reference +lease6-get-all - lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease6-get-all", + "arguments": { + "subnets": [ 1, 2, 3, 4 ] + } +} + + +Response syntax: + { + "arguments": { + "leases": [ + { + "cltt": 12345678, + "duid": "42:42:42:42:42:42:42:42", + "fqdn-fwd": false, + "fqdn-rev": true, + "hostname": "myhost.example.com.", + "hw-address": "08:08:08:08:08:08", + "iaid": 1, + "ip-address": "2001:db8:2::1", + "preferred-lft": 500, + "state": 0, + "subnet-id": 44, + "type": "IA_NA", + "valid-lft": 3600 + }, + { + "cltt": 12345678, + "duid": "21:21:21:21:21:21:21:21", + "fqdn-fwd": false, + "fqdn-rev": true, + "hostname": "", + "iaid": 1, + "ip-address": "2001:db8:0:0:2::", + "preferred-lft": 500, + "prefix-len": 80, + "state": 0, + "subnet-id": 44, + "type": "IA_PD", + "valid-lft": 3600 + } + ] + }, + "result": 0, + "text": "2 IPv6 lease(s) found." +} +The lease6-get-all command may result in very large responses. + +
+ + + +
+lease6-update reference +lease6-update - The lease6-update command can be used to update existing leases. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease6-update", + "arguments": { + "ip-address": "2001:db8::1", + "duid": "88:88:88:88:88:88:88:88", + "iaid": 7654321, + "hostname": "newhostname.example.org", + "subnet-id": 66, + "force-create": false + } +} + + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+lease6-wipe reference +lease6-wipe - lease6-wipe is designed to remove all leases associated with a given subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (lease_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "lease6-wipe", + "arguments": { + "subnet-id": 66 + } +} +Note: not all backends support this command. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+leases-reclaim reference +leases-reclaim - The leases-reclaim command instructs the server to reclaim all expired leases immediately. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "leases-reclaim", + "arguments": { + "remove": true + } +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+libreload reference +libreload - The libreload command will first unload and then load all currently loaded hook libraries. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "libreload", + "arguments": { } +} +The server will respond with a result of 0 indicating success, or 1 indicating a failure. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+list-commands reference +list-commands - The list-commands command retrieves a list of all commands supported by the server. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "list-commands", + "arguments": { } +} +The server will respond with a list of all supported commands. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network4-add reference +network4-add - The network4-add command is used to add a new shared network. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-add", + "arguments": { + "shared-networks": [ { + "name": "floor13", + "subnet4": [ + { + "id": 100, + "pools": [ { "pool": "192.0.2.2-192.0.2.99" } ], + "subnet": "192.0.2.0/24", + "option-data": [ + { + "name": "routers", + "data": "192.0.2.1" + } + ] + }, + { + "id": 101, + "pools": [ { "pool": "192.0.3.2-192.0.3.99" } ], + "subnet": "192.0.3.0/24", + "option-data": [ + { + "name": "routers", + "data": "192.0.3.1" + } + ] + } ] + } ] + } +} + + +Response syntax: + { + "arguments": { + "shared-networks": [ { "name": "floor13" } ] + }, + "result": 0, + "text": "A new IPv4 shared network 'floor13' added" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network4-del reference +network4-del - The network4-del command is used to delete existing shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-del", + "arguments": { + "name": "floor13" + } +} + + +Response syntax: + { + "arguments": { + "shared-networks": [ + { + "name": "floor13" + } + ] + }, + "result": 0, + "text": "IPv4 shared network 'floor13' deleted" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network4-get reference +network4-get - The network4-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-get", + "arguments": { + "name": "floor13" + } +} + + +Response syntax: + { + "result": 0, + "text": "Info about IPv4 shared network 'floor13' returned", + "arguments": { + "shared-networks": [ + { + "match-client-id": true, + "name": "floor13", + "option-data": [ ], + "rebind-timer": 90, + "relay": { + "ip-address": "0.0.0.0" + }, + "renew-timer": 60, + "reservation-mode": "all", + "subnet4": [ + { + "subnet": "192.0.2.0/24", + "id": 5, + // many other subnet specific details here + }, + { + "id": 6, + "subnet": "192.0.3.0/31", + // many other subnet specific details here + } + ], + "valid-lifetime": 120 + } + ] + } +} +Note that the actual response contains many additional fields that are omitted here for clarity. + +
+ + + +
+network4-list reference +network4-list - The network4-list command is used to retrieve full list of currently configured shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-list" +} + + +Response syntax: + { + "arguments": { + "shared-networks": [ + { "name": "floor1" }, + { "name": "office" } + ] + }, + "result": 0, + "text": "2 IPv4 network(s) found" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network4-subnet-add reference +network4-subnet-add - The network4-subnet-add command is used to add existing subnets to existing shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-subnet-add", + "arguments": { + "name": "floor13", + "id": 5 + } +} + + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network4-subnet-del reference +network4-subnet-del - The network4-subnet-del command is used to remove a subnet that is part of an existing shared network and demote it to a plain, stand-alone subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-subnet-del", + "arguments": { + "name": "floor13", + "id": 5 + } + } + + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network6-add reference +network6-add - The network6-add command is used to add a new shared network. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-add", + "arguments": { + "shared-networks": [ { + "name": "floor13", + "subnet4": [ + { + "id": 100, + "pools": [ { "pool": "192.0.2.2-192.0.2.99" } ], + "subnet": "192.0.2.0/24", + "option-data": [ + { + "name": "routers", + "data": "192.0.2.1" + } + ] + }, + { + "id": 101, + "pools": [ { "pool": "192.0.3.2-192.0.3.99" } ], + "subnet": "192.0.3.0/24", + "option-data": [ + { + "name": "routers", + "data": "192.0.3.1" + } + ] + } ] + } ] + } +} +The network6-add uses the same syntax for both the query and the response. However, there are some parameters that are IPv4-only (e.g. match-client-id) and some are IPv6-only (e.g. interface-id). + +Response syntax: + { + "arguments": { + "shared-networks": [ { "name": "floor13" } ] + }, + "result": 0, + "text": "A new IPv4 shared network 'floor13' added" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network6-del reference +network6-del - The network6-del command is used to delete existing shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-del", + "arguments": { + "name": "floor13" + } +} +The network6-del command uses exactly the same syntax for + both the command and the response. + +Response syntax: + { + "command": "network4-del", + "arguments": { + "name": "floor13", + "subnets-action": "delete" + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network6-get reference +network6-get - The network6-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-get", + "arguments": { + "name": "floor13" + } +} + + +Response syntax: + { + "result": 0, + "text": "Info about IPv4 shared network 'floor13' returned", + "arguments": { + "shared-networks": [ + { + "match-client-id": true, + "name": "floor13", + "option-data": [ ], + "rebind-timer": 90, + "relay": { + "ip-address": "0.0.0.0" + }, + "renew-timer": 60, + "reservation-mode": "all", + "subnet4": [ + { + "subnet": "192.0.2.0/24", + "id": 5, + // many other subnet specific details here + }, + { + "id": 6, + "subnet": "192.0.3.0/31", + // many other subnet specific details here + } + ], + "valid-lifetime": 120 + } + ] + } +} +Note that the actual response contains many additional fields that are omitted here for clarity. + +
+ + + +
+network6-list reference +network6-list - The network6-list command is used to retrieve full list of currently configured shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-list" +} +network6-list follows exactly the same syntax for both the query and the response. + +Response syntax: + { + "arguments": { + "shared-networks": [ + { "name": "floor1" }, + { "name": "office" } + ] + }, + "result": 0, + "text": "2 IPv4 network(s) found" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network6-subnet-add reference +network6-subnet-add - The network6-subnet-add command is used to add existing subnets to existing shared networks. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-subnet-add", + "arguments": { + "name": "floor13", + "id": 5 + } +} +The network6-subnet-add command uses exactly the same syntax for both the command and the response. + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+network6-subnet-del reference +network6-subnet-del - The network6-subnet-del command is used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "network4-subnet-del", + "arguments": { + "name": "floor13", + "id": 5 + } + } +The network6-subnet-del command uses exactly the same syntax for both the command and the response. + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'" +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+reservation-add reference +reservation-add - adds a new host reservation. The reservation may include IPv4 address, + IPv6 addresses, IPv6 prefixes, various identifiers, a class + the client will be assigned to, DHCPv4 and DHCPv6 options and + more. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (host_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "reservation-add", + "arguments": { + "reservation": { + "boot-file-name": <string>, + "comment": <string> + "client-id": <string>, + "circuit-id": <string>, + "duid": <string>, + "flex-id": <string>, + "ip-address": <string (IPv4 address)>, + "ip-addresses": [ <comma separated strings> ], + "hw-address": <string>, + "hostname": <string>, + "next-server": <string (IPv4 address)>, + "option-data-list": [ <comma separated structures defining options> ], + "prefixes": [ <comma separated IPv6 prefixes> ], + "reservation-client-classes": [ <comma separated strings> ], + "server-hostname": <string>, + "subnet-id": <integer>, + "user-context": <any valid JSON>, + } + } +} +Note the ip-address, client-id, next-server, server-hostname and +boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are +IPv6 specific. + +Response syntax: + +{ + "result": <integer>, + "text": <string> +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+reservation-del reference +reservation-del - Deletes an existing host reservation. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (host_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "reservation-del", + "arguments": { + "subnet-id": <integer>, + "ip-address": <string>, + "identifier-type": <one of "hw-address", "duid", "circuit-id", "client-id" and "flex-id">, + "identifier": <string> + } +} +The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+reservation-get reference +reservation-get - attempts to retrieve an existing host reservation + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.2.0 (host_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "reservation-get", + "arguments": { + "subnet-id": <integer>, + "identifier-type": <string with one value out of: hw-address|duid|circuit-id|client-id|flex-id>, + "identifier": <string>; + } +} +The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). + +Response syntax: + { + "result": <integer>, + "text": <string>, + "arguments": { + "boot-file-name": <string>, + "comment": <string> + "client-id": <string>, + "circuit-id": <string>, + "duid": <string>, + "flex-id": <string>, + "ip-address": <string (IPv4 address)>, + "ip-addresses": [ <comma separated strings> ], + "hw-address": <string>, + "hostname": <string>, + "next-server": <string (IPv4 address)>, + "option-data-list": [ <comma separated structures defining options> ], + "prefixes": [ <comma separated IPv6 prefixes> ], + "reservation-client-classes": [ <comma separated strings> ], + "server-hostname": <string>, + "subnet-id": <integer>, + "user-context": <any valid JSON>, + } +} +Arguments object appear only if a host is found. Many fields in the arguments +object appear only if specific field is set. + +
+ + + +
+shutdown reference +shutdown - The shutdown command instructs the server to initiate its shutdown procedure. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "shutdown" +} +The server will respond with a confirmation that the shutdown + procedure has been initiated. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+stat-lease4-get reference +stat-lease4-get - The stat-lease4-get command fetches lease statistics for a range + of known IPv4 subnets. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (stat_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "stat-lease4-get" +} + + +Response syntax: + { + "result": 0, + "text": "stat-lease4-get: 2 rows found", + "arguments": { + "result-set": { + "columns": [ "subnet-id", + "total-addresses", + "assigned-addresses", + "declined-addresses" ] + "rows": [ + [ 10, 256, 111, 0 ], + [ 20, 4098, 2034, 4 ] + ], + "timestamp": "2018-05-04 15:03:37.000000" + } + } + } +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+stat-lease6-get reference +stat-lease6-get - The stat-lease6-get command fetches lease statistics for a range + of known IPv6 subnets. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.4.0 (stat_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "stat-lease6-get", + "arguments": { + "subnet-id" : 10 + } +} + + +Response syntax: + { + "result": 0, + "text": "stat-lease6-get: 2 rows found", + "arguments": { + "result-set": { + "columns": [ "subnet-id", "total-nas", "assigned-nas", "declined-nas", "total-pds", "assigned-pds" ] + "rows": [ + [ 10, 4096, 2400, 3, 0, 0], + [ 20, 0, 0, 0, 1048, 233 ] + [ 30, 256, 60, 0, 1048, 15 ] + ], + "timestamp": "2018-05-04 15:03:37.000000" + } + } + } +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-get reference +statistic-get - The statistic-get command retrieves a single statistic. It takes a single string parameter called name that specifies the statistic name. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-get", + "arguments": { + "name": "pkt4-received" + } +} +The server will respond with details of the requested statistic, with a result set to 0 indicating success and the specified statistic as the value of the "arguments" parameter. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-get-all reference +statistic-get-all - The statistic-get-all command retrieves all statistics recorded. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-get-all", + "arguments": { } +} +The server will respond with details of all recorded statistics, with result set to 0 indicating that it iterated over all statistics (even when the total number of statistics is zero). + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-remove reference +statistic-remove - The statistic-remove command attempts to delete a single statistic. It takes a single string parameter called name that specifies the statistic name. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-remove", + "arguments": { + "name": "pkt4-received" + } +} +If the specific statistic is found and its removal was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-remove-all reference +statistic-remove-all - The statistic-remove-all command attempts to delete all statistics. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-remove-all", + "arguments": { } +} +If the removal of all statistics was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-reset reference +statistic-reset - The statistic-reset command sets the specified statistic to its neutral value: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and "" for string type. It takes a single string parameter called name that specifies the statistic name. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-reset", + "arguments": { + "name": "pkt4-received" + } +} +If the specific statistic is found and reset was successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered (e.g. requested statistic was not found), the server will return a status code of 1 (error) and the text field will contain the error description. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+statistic-reset-all reference +statistic-reset-all - The statistic-reset command sets all statistics to their neutral values: 0 for integer, 0.0 for float, 0h0m0s0us for time duration and "" for string type. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.0.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "statistic-reset-all", + "arguments": { } +} +If the operation is successful, the server will respond with a status of 0, indicating success and an empty parameters field. If an error is encountered, the server will return a status code of 1 (error) and the text field will contain the error description. + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet4-add reference +subnet4-add - This command is used to create and add a new subnet to the existing server configuration. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet4-add", + "arguments": { + "subnets": [ { + "id": 123, + "subnet": "10.20.30.0/24", + ... + } ] + } +} + + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet added", + "arguments": { + "subnets": [ + { + "id": 123, + "subnet": "10.20.30.0/24" + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet4-del reference +subnet4-del - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet4-del", + "arguments": { + "id": 123 + } +} + + +Response syntax: + { + "result": 0, + "text": "IPv4 subnet 192.0.2.0/24 (id 123) deleted", + "arguments": { + "subnets": [ + { + "id": 123, + "subnet": "192.0.2.0/24" + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet4-get reference +subnet4-get - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet4-list, which is used to discover available subnets with their respective subnet identifiers and prefixes. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet4-get", + "arguments": { + "id": 10 + } +} + + +Response syntax: + { + "result": 0, + "text": "Info about IPv4 subnet 10.0.0.0/8 (id 10) returned", + "arguments": { + "subnets": [ + { + "subnet": "10.0.0.0/8", + "id": 1, + "option-data": [ + .... + ] + ... + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet4-list reference +subnet4-list - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet4-list" +} + + +Response syntax: + { + "result": 0, + "text": "2 IPv4 subnets found", + "arguments": { + "subnets": [ + { + "id": 10, + "subnet": "10.0.0.0/8" + }, + { + "id": 100, + "subnet": "192.0.2.0/24" + } + ] +} +If no IPv4 subnets are found, an error code is returned along with the error description. + +
+ + + +
+subnet6-add reference +subnet6-add - This command is used to create and add new subnet to the existing server configuration. This operation has no impact on other subnets. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet6-add", + "arguments": { + "subnet6": [ { + "id": 234, + "subnet": "2001:db8:1::/64", + ... + } ] + } +} + + +Response syntax: + { + "result": 0, + "text": "IPv6 subnet added", + "arguments": { + "subnet6": [ + { + "id": 234, + "subnet": "2001:db8:1::/64" + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet6-del reference +subnet6-del - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet6-del", + "arguments": { + "id": 234 + } +} + + +Response syntax: + { + "result": 0, + "text": "IPv6 subnet 2001:db8:1::/64 (id 234) deleted", + "subnets": [ + { + "id": 234, + "subnet": "2001:db8:1::/64" + } + ] +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet6-get reference +subnet6-get - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet6-list, which is used to discover available subnets with their respective subnet identifiers and prefixes. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet6-get", + "arguments": { + "id": 11 + } +} + + +Response syntax: + { + "result": 0, + "text": "Info about IPv6 subnet 2001:db8:1::/64 (id 11) returned", + "arguments": { + "subnets": [ + { + "subnet": "2001:db8:1::/64", + "id": 1, + "option-data": [ + ... + ] + .... + } + ] + } +} +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + + +
+subnet6-list reference +subnet6-list - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet. + +Supported by: kea-dhcp4, kea-dhcp6 + +Availability: 1.3.0 (subnet_cmds hook) + +Description and examples: See + +Command syntax: + { + "command": "subnet6-list" +} + + +Response syntax: + { + "result": 0, + "text": "2 IPv6 subnets found", + "arguments": { + "subnets": [ + { + "id": 11, + "subnet": "2001:db8:1::/64" + }, + { + "id": 233, + "subnet": "3000::/16" + } + ] +} +If no IPv6 subnets are found, an error code is returned along with the error description. + +
+ + + +
+version-get reference +version-get - The version-get command returns on the control channel what the + command line -v argument displays with in arguments the extended + version, i.e., what the command line -V argument displays. + +Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent + +Availability: 1.2.0 (built-in) + +Description and examples: See + +Command syntax: + { + "command": "version-get" +} + + +Response syntax: + { + "result": <integer>, + "text": <string> +} + +Result is an integer representation of the status. Currently supported statuses are: + + 0 - success + 1 - error + 2 - unsupported + 3 - empty (command was completed successfully, but no data was affected or returned) + + + +
+ + +
-- GitLab From e9e21b9422ceb24af59cbc7ce521c06d6d5b14bf Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:35:39 +0200 Subject: [PATCH 107/169] [#10,!3] AUTHORS updated. --- AUTHORS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AUTHORS b/AUTHORS index ca397b588b..5a8a7ab3cb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -180,10 +180,14 @@ We have received the following contributions: - Vicky Risk 2018-08: Documentation clean up + 2018-10: API documentation clean ups - Franciszek Gorski 2018-10: Makefile bug fixed + - Suzanne Goldlust + 2018-10: API documentation + Kea uses log4cplus (http://sourceforge.net/projects/log4cplus/) for logging, Boost (http://www.boost.org/) library for almost everything, and can use Botan (http://botan.randombit.net/) or OpenSSL (https://www.openssl.org/) for -- GitLab From 3cae3b5e5d6c61cd9cad48bad83642b2656e7a4f Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:41:08 +0200 Subject: [PATCH 108/169] [#10,!3] version-get description clarified. --- doc/api/version-get.json | 6 +++--- doc/guide/ctrl-channel.xml | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/api/version-get.json b/doc/api/version-get.json index 8daf8639aa..7822eebabf 100644 --- a/doc/api/version-get.json +++ b/doc/api/version-get.json @@ -1,8 +1,8 @@ { "name": "version-get", - "brief": "The version-get command returns on the control channel what the - command line -v argument displays with in arguments the extended - version, i.e., what the command line -V argument displays.", + "brief": "The version-get command returns extended information about + Kea version. The returned string is the same as if Kea would + be run with -V command line option.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", diff --git a/doc/guide/ctrl-channel.xml b/doc/guide/ctrl-channel.xml index 93de5ce2df..7407c5d313 100644 --- a/doc/guide/ctrl-channel.xml +++ b/doc/guide/ctrl-channel.xml @@ -601,11 +601,10 @@ $ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get"
version-get - The version-get command returns on the control - channel what the command line -v argument - displays with in arguments the extended version, i.e., what - the command line -V argument displays. This command - does not take any parameters. + The version-get command returns an + extended information about Kea version. It is the same + information as Kea caled with -V command + line argument. This command does not take any parameters. { -- GitLab From ccfbaf501416b4febfe085629b69b082ea548a7e Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 18:53:06 +0200 Subject: [PATCH 109/169] [#10,!3] doc building process explained. --- doc/Makefile.am | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/Makefile.am b/doc/Makefile.am index a4634fa714..acd0a56ee7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -63,6 +63,9 @@ nobase_dist_doc_DATA += examples/netconf/comments.json nobase_dist_doc_DATA += examples/netconf/simple.json nobase_dist_doc_DATA += examples/netconf/simple-dhcp4.json +# These are files that document our APIs. They're not really needed as the +# content is included in the api.xml, but may be useful for people who +# want to document the API. EXTRA_DIST += api/build-report.json EXTRA_DIST += api/cache-clear.json api/cache-get.json EXTRA_DIST += api/cache-insert.json api/cache-load.json @@ -109,6 +112,29 @@ guide: clean: rm -rf html +# There are several steps needed to document new API command: +# +# 1. edit docgen/cmds-list and add the new command +# 2. ./configure --enable-generate-docs +# 3. make - you need to build the sources first, am afraid. The reason why you +# need to do this is that the tool kea-docgen depends on libkea-cc as it +# loads JSON files. This means that the libs need to be built first. +# 4. (optional) run: make templates +# This will go through the list of commands listed in cmds-list +# and will check if there are corresponding JSON files in api/name.json +# If the file is missing, a new JSON will be created using template. +# If you dislike this generator, you can always use api/_template.json +# and copy it over under the name of a new command. +# 5. Edit api/command-name.json. If the command is provided by the daemon +# out of its own (and not via hook), simply delete the hook entry. +# If you don't want to provide command syntax (cmd-syntax key), +# any comments about the syntax (cmd-comment key) or response syntax +# (resp-syntax) or any comment about response (resp-comment), simply +# remove those unused keys. The generator will attempt to gerate +# boilerplates for it. +# 6. Generate api.xml: make api +# 7. Rebuild User's Guide as usual: make guide + # This target will generate templates. There's no need to run it, unless # new commands have been added or there are existing commands that are # still not documented. -- GitLab From aad75c9a7adfbabf023771dde0b4d985dcfe0940 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Fri, 5 Oct 2018 19:59:41 +0200 Subject: [PATCH 110/169] [#10,!3] Added 4 missing files for ha-* commands. --- doc/api/ha-continue.json | 8 ++++++++ doc/api/ha-heartbeat.json | 12 ++++++++++++ doc/api/ha-scopes.json | 17 +++++++++++++++++ doc/api/ha-sync.json | 17 +++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 doc/api/ha-continue.json create mode 100644 doc/api/ha-heartbeat.json create mode 100644 doc/api/ha-scopes.json create mode 100644 doc/api/ha-sync.json diff --git a/doc/api/ha-continue.json b/doc/api/ha-continue.json new file mode 100644 index 0000000000..c61b3f43cf --- /dev/null +++ b/doc/api/ha-continue.json @@ -0,0 +1,8 @@ +{ + "name": "ha-continue", + "brief": "This command is used to resume the operation of the paused HA state machine.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "high_availability" +} diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json new file mode 100644 index 0000000000..46dd851c17 --- /dev/null +++ b/doc/api/ha-heartbeat.json @@ -0,0 +1,12 @@ +{ + "name": "ha-heartbeat", + "brief": "This command is sent internally by Kea partner when operating + in High Availability (HA) mode. It should not be used by users, + unless you want to implement complete HA replacement.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "high_availability", + "cmd-syntax": "tbd", + "resp-syntax": "tbd" +} diff --git a/doc/api/ha-scopes.json b/doc/api/ha-scopes.json new file mode 100644 index 0000000000..d88eaa7168 --- /dev/null +++ b/doc/api/ha-scopes.json @@ -0,0 +1,17 @@ +{ + "name": "ha-scopes", + "brief": "This command allows for modifying the High Availability (HA) scopes + that the server is serving.a sentence or two explaining what this command does", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "high_availability", + "cmd-syntax": "{ + \"command\": \"ha-scopes\", + \"service\": [ ], + \"arguments\": { + \"scopes\": [ \"HA_server1\", \"HA_server2\" ] + } +} +" +} diff --git a/doc/api/ha-sync.json b/doc/api/ha-sync.json new file mode 100644 index 0000000000..282ca606d8 --- /dev/null +++ b/doc/api/ha-sync.json @@ -0,0 +1,17 @@ +{ + "name": "ha-sync", + "brief": "The command is issued to instruct the server running in HA mode to + synchronize its local lease database with the selected peer.", + "description": "See ", + "support": [ "kea-dhcp4", "kea-dhcp6" ], + "avail": "1.4.0", + "hook": "high_availability", + "cmd-syntax": "{ + \"command\": \"ha-sync\", + \"service\": [ , + \"max-period\": + } +}" +} -- GitLab From 4de21c7749b7df2a4ce103b2afc6b62ed457be1e Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 06:15:22 -0400 Subject: [PATCH 111/169] Update cache-remove.json --- doc/api/cache-remove.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/cache-remove.json b/doc/api/cache-remove.json index cde6b4d89d..60b307196e 100644 --- a/doc/api/cache-remove.json +++ b/doc/api/cache-remove.json @@ -1,3 +1,4 @@ +An example command to remove an IPv4 host with reserved address 192.0.2.1 from subnet with a subnet-id 123 looks as follows: { "name": "cache-remove", "brief": "The cache-remove command works similarly to reservation-get command.", @@ -12,6 +13,8 @@ \"subnet-id\": 123 } } + +Another example that removes IPv6 host identifier by DUID and specific subnet-id is: { \"command\": \"cache-remove\", \"arguments\": { -- GitLab From 694304622fc1903974f2fe97d978ccd26cf145d5 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 06:39:30 -0400 Subject: [PATCH 112/169] Update config-get.json --- doc/api/config-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/config-get.json b/doc/api/config-get.json index 568160ab10..ad46969469 100644 --- a/doc/api/config-get.json +++ b/doc/api/config-get.json @@ -9,7 +9,7 @@ "cmd-syntax": "{ \"command\": \"config-get\" }", - "cmd-comment": "config-get takes no parameters.", + "This command takes no parameters.", "resp-syntax": "{ \"result\": , -- GitLab From 1b03d851bf5592295210f22aba1ab98e3532089f Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 06:47:51 -0400 Subject: [PATCH 113/169] Update lease4-add.json --- doc/api/lease4-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index 1a2b21280e..ee11d8b409 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -1,7 +1,7 @@ { "name": "lease4-add", "brief": "The lease4-add command allows for the creation of a new lease.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 20c44eaddaa329a58dabe4f26274660259c86b2d Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 10 Oct 2018 12:48:00 +0200 Subject: [PATCH 114/169] [#10,!3] Syntax is now copied over correctly from json files to xml - it is now possible to use formatting in comments. --- doc/api/config-set.json | 2 +- doc/api/config-test.json | 2 +- doc/docgen/kea_docgen.cc | 2 +- doc/guide/api.xml | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/api/config-set.json b/doc/api/config-set.json index dd39e94132..b8b7b00927 100644 --- a/doc/api/config-set.json +++ b/doc/api/config-set.json @@ -13,7 +13,7 @@ } } }", - "cmd-comment": "where is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", + "cmd-comment": "where <server> is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", "resp-syntax": " {\"result\": 0, \"text\": \"Configuration successful.\" } or diff --git a/doc/api/config-test.json b/doc/api/config-test.json index 9f5daac5be..aa6ef357db 100644 --- a/doc/api/config-test.json +++ b/doc/api/config-test.json @@ -13,7 +13,7 @@ } } }", - "cmd-comment": "where is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", + "cmd-comment": "where >server< is the configuration element name for a given server such as \"Dhcp4\" or \"Dhcp6\"", "resp-syntax": "{\"result\": 0, \"text\": \"Configuration seems sane...\" } or diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index a0d665e2e1..3a9044e834 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -428,7 +428,7 @@ public: << "}" << endl; } if (cmd->contains("cmd-comment")) { - f << escapeString(cmd->get("cmd-comment")->stringValue()); + f << cmd->get("cmd-comment")->stringValue(); } f << "" << endl << endl; diff --git a/doc/guide/api.xml b/doc/guide/api.xml index 98e4fd6dd0..0383d34761 100644 --- a/doc/guide/api.xml +++ b/doc/guide/api.xml @@ -573,7 +573,7 @@ Result is an integer representation of the status. Currently supported statuses { "command": "config-get" } -<command>config-get</command> takes no parameters. +config-get takes no parameters. Response syntax: { @@ -691,7 +691,7 @@ Result is an integer representation of the status. Currently supported statuses } } } -where <server> is the configuration element name for a given server such as "Dhcp4" or "Dhcp6" +where >server< is the configuration element name for a given server such as "Dhcp4" or "Dhcp6" Response syntax: {"result": 0, "text": "Configuration seems sane..." } @@ -3011,9 +3011,9 @@ If no IPv6 subnets are found, an error code is returned along with the error des
version-get reference -version-get - The version-get command returns on the control channel what the - command line -v argument displays with in arguments the extended - version, i.e., what the command line -V argument displays. +version-get - The version-get command returns extended information about + Kea version. The returned string is the same as if Kea would + be run with -V command line option. Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent -- GitLab From 88882cad9801971272e83b5e9c0feb197a0fa92b Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 10 Oct 2018 12:48:56 +0200 Subject: [PATCH 115/169] [#10,!3] Removed obsolete copy of api.xml --- doc/api.xml | 1752 --------------------------------------------------- 1 file changed, 1752 deletions(-) delete mode 100644 doc/api.xml diff --git a/doc/api.xml b/doc/api.xml deleted file mode 100644 index cc2a09e701..0000000000 --- a/doc/api.xml +++ /dev/null @@ -1,1752 +0,0 @@ - - - - - API Reference - Kea currently supports 65 commands: -, cache-clear -, cache-get -, cache-insert -, cache-load -, cache-remove -, cache-write -, config-get -, config-reload -, config-set -, config-test -, config-write -, dhcp-disable -, dhcp-enable -, ha-heartbeat -, ha-scopes -, ha-sync -, lease4-add -, lease4-del -, lease4-get -, lease4-get-all -, lease4-update -, lease4-wipe -, lease6-add -, lease6-del -, lease6-get -, lease6-get-all -, lease6-update -, lease6-wipe -, leases-reclaim -, libreload -, list-commands -, network4-add -, network4-del -, network4-get -, network4-list -, network4-subnet-add -, network4-subnet-del -, network6-add -, network6-del -, network6-get -, network6-list -, network6-subnet-add -, network6-subnet-del -, reservation-add -, reservation-del -, reservation-get -, shutdown -, stat-lease4-get -, stat-lease6-get -, statistic-get -, statistic-get-all -, statistic-remove -, statistic-remove-all -, statistic-reset -, statistic-reset-all -, subnet4-add -, subnet4-del -, subnet4-get -, subnet4-list -, subnet6-add -, subnet6-del -, subnet6-get -, subnet6-list -, version-get -. -Commands supported by kea-ctrl-agent: build-report -config-get -. -Commands supported by kea-dhcp4: build-report -cache-clear -cache-get -cache-insert -cache-load -cache-remove -cache-write -config-get -config-reload -config-set -config-test -config-write -dhcp-disable -dhcp-enable -ha-heartbeat -ha-scopes -ha-sync -lease4-add -lease4-del -lease4-get -lease4-get-all -lease4-update -lease4-wipe -lease6-add -lease6-del -lease6-get -lease6-get-all -lease6-update -lease6-wipe -leases-reclaim -libreload -list-commands -network4-add -network4-del -network4-get -network4-list -network4-subnet-add -network4-subnet-del -network6-add -network6-del -network6-get -network6-list -network6-subnet-add -network6-subnet-del -reservation-add -reservation-del -reservation-get -shutdown -stat-lease4-get -stat-lease6-get -statistic-get -statistic-get-all -statistic-remove -statistic-remove-all -statistic-reset -statistic-reset-all -subnet4-add -subnet4-del -subnet4-get -subnet4-list -subnet6-add -subnet6-del -subnet6-get -subnet6-list -version-get -. -Commands supported by kea-dhcp6: build-report -cache-clear -cache-get -cache-insert -cache-load -cache-remove -cache-write -config-get -config-reload -config-set -config-test -config-write -dhcp-disable -dhcp-enable -ha-heartbeat -ha-scopes -ha-sync -lease4-add -lease4-del -lease4-get -lease4-get-all -lease4-update -lease4-wipe -lease6-add -lease6-del -lease6-get -lease6-get-all -lease6-update -lease6-wipe -leases-reclaim -libreload -list-commands -network4-add -network4-del -network4-get -network4-list -network4-subnet-add -network4-subnet-del -network6-add -network6-del -network6-get -network6-list -network6-subnet-add -network6-subnet-del -reservation-add -reservation-del -reservation-get -shutdown -stat-lease4-get -stat-lease6-get -statistic-get -statistic-get-all -statistic-remove -statistic-remove-all -statistic-reset -statistic-reset-all -subnet4-add -subnet4-del -subnet4-get -subnet4-list -subnet6-add -subnet6-del -subnet6-get -subnet6-list -version-get -. - -
-build-report reference -build-report - returns a list of compilition options that this particular binary was built with - -Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent - -Availability: 1.2.0 - -Description and examples: See - -Command syntax: - { - "command": "build-report" -} - - -Response syntax: - { - "result": 0, - "text": <string with build details> -} - - -
- - - -
-cache-clear reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-cache-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-cache-insert reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-cache-load reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-cache-remove reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-cache-write reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-config-get reference -config-get - retrieves the current configurationa used by the server. The configuration - is roughtly equal to the configuration file, but includes additional - changes made by other commands and due to parameters inheritance. - -Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent - -Availability: 1.2.0 - -Description and examples: See - -Command syntax: - { - "command": "config-get" -} -config-get takes no parameters. - -Response syntax: - { - "result": <integer>, - "arguments": { - <JSON configuration here, starting with Dhcp4, Dhcp6, or Control-agent object> - } -} -Result is an integer representation of the status. Currently supported statuses are: - - 0 - success - 1 - error - 2 - unsupported - 3 - empty (command was completed successfully, but no data was affected or returned) - - - -
- - - -
-config-reload reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-config-set reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-config-test reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-config-write reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-dhcp-disable reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-dhcp-enable reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-ha-heartbeat reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-ha-scopes reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-ha-sync reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-get-all reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-update reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease4-wipe reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-get-all reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-update reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-lease6-wipe reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-leases-reclaim reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-libreload reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-list-commands reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-list reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-subnet-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network4-subnet-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-list reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-subnet-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-network6-subnet-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-reservation-add reference -reservation-add - adds a new host reservation. The reservation may include IPv4 address, - IPv6 addresses, IPv6 prefixes, various identifiers, a class - the client will be assigned to, DHCPv4 and DHCPv6 options and - more. - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: 1.2.0, host_cmds library (premium) - -Description and examples: See - -Command syntax: - { - "command": "reservation-add", - "arguments": { - "reservation": { - "boot-file-name": <string>, - "comment": <string> - "client-id": <string>, - "circuit-id": <string>, - "duid": <string>, - "flex-id": <string>, - "ip-address": <string (IPv4 address)>, - "ip-addresses": [ <comma separated strings> ], - "hw-address": <string>, - "hostname": <string>, - "next-server": <string (IPv4 address)>, - "option-data-list": [ <comma separated structures defining options> ], - "prefixes": [ <comma separated IPv6 prefixes> ], - "reservation-client-classes": [ <comma separated strings> ], - "server-hostname": <string>, - "subnet-id": <integer>, - "user-context": <any valid JSON>, - } - } -} -Note the ip-address, client-id, next-server, server-hostname and -boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are -IPv6 specific. - -Response syntax: - -{ - "result": <integer>, - "text": <string> -} -Result is an integer representation of the status. Currently supported statuses are: - - 0 - success - 1 - error - 2 - unsupported - 3 - empty (command was completed successfully, but no data was affected or returned) - - - -
- - - -
-reservation-del reference -reservation-del - Deletes an existing host reservation. - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: 1.2.0, host_cmds library (premium) - -Description and examples: See - -Command syntax: - { - "command": "reservation-del", - "arguments": { - "subnet-id": <integer>, - "ip-address": <string>, - "identifier-type": <one of "hw-address", "duid", "circuit-id", "client-id" and "flex-id">, - "identifier": <string> - } -} -The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). - -Response syntax: - { - "result": <integer>, - "text": <string> -} - -Result is an integer representation of the status. Currently supported statuses are: - - 0 - success - 1 - error - 2 - unsupported - 3 - empty (command was completed successfully, but no data was affected or returned) - - - -
- - - -
-reservation-get reference -reservation-get - attempts to retrieve an existing host reservation - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: 1.2.0, host_cmds library (premium) - -Description and examples: See - -Command syntax: - { - "command": "reservation-get", - "arguments": { - "subnet-id": <integer>, - "identifier-type": <string with one value out of: hw-address|duid|circuit-id|client-id|flex-id>, - "identifier": <string>; - } -} -The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). - -Response syntax: - { - "result": <integer>, - "text": <string>, - "arguments": { - "boot-file-name": <string>, - "comment": <string> - "client-id": <string>, - "circuit-id": <string>, - "duid": <string>, - "flex-id": <string>, - "ip-address": <string (IPv4 address)>, - "ip-addresses": [ <comma separated strings> ], - "hw-address": <string>, - "hostname": <string>, - "next-server": <string (IPv4 address)>, - "option-data-list": [ <comma separated structures defining options> ], - "prefixes": [ <comma separated IPv6 prefixes> ], - "reservation-client-classes": [ <comma separated strings> ], - "server-hostname": <string>, - "subnet-id": <integer>, - "user-context": <any valid JSON>, - } -} -Arguments object appear only if a host is found. Many fields in the arguments -object appear only if specific field is set. - -
- - - -
-shutdown reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-stat-lease4-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-stat-lease6-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-get-all reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-remove reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-remove-all reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-reset reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-statistic-reset-all reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet4-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet4-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet4-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet4-list reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet6-add reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet6-del reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet6-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-subnet6-list reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - - -
-version-get reference -template-command - a sentence or two explaining what it is - -Supported by: kea-dhcp4, kea-dhcp6 - -Availability: first version, possible a hook library name and (premium) if applicable - -Description and examples: See - -Command syntax: - Syntax of the command -Possibly some extra comments after the syntax. - -Response syntax: - Syntax of the response -Optional extra comments after the respone syntax. - -
- - -
-- GitLab From aac48b69b5d540b520b21be5b18f6c981cb9e434 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 06:49:15 -0400 Subject: [PATCH 116/169] Update lease4-del.json --- doc/api/lease4-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-del.json b/doc/api/lease4-del.json index 274f5664fb..5c0b166188 100644 --- a/doc/api/lease4-del.json +++ b/doc/api/lease4-del.json @@ -1,7 +1,7 @@ { "name": "lease4-del", "brief": "lease4-del can be used to delete a lease from the lease database.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 4f293acd7043c0f311cabe0a9a9517ff901374d4 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 07:13:20 -0400 Subject: [PATCH 117/169] Update ha-heartbeat.json --- doc/api/ha-heartbeat.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index 46dd851c17..1db61648dc 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -7,6 +7,8 @@ "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", "hook": "high_availability", - "cmd-syntax": "tbd", - "resp-syntax": "tbd" + "cmd-syntax": "{ + \"command\": \"ha-heartbeat\" +, + "resp-syntax": The response to this command is different from the typical command response. The response will include server state (see " plus the current clock value. } -- GitLab From 6aab313a6b02c1f03ce579750dec749417ea8674 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 07:26:18 -0400 Subject: [PATCH 118/169] Update ha-heartbeat.json --- doc/api/ha-heartbeat.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index 1db61648dc..87d0476748 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -1,8 +1,7 @@ { "name": "ha-heartbeat", "brief": "This command is sent internally by Kea partner when operating - in High Availability (HA) mode. It should not be used by users, - unless you want to implement complete HA replacement.", + in High Availability (HA) mode. It will retrieve the server HA state and clock value.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", @@ -10,5 +9,5 @@ "cmd-syntax": "{ \"command\": \"ha-heartbeat\" , - "resp-syntax": The response to this command is different from the typical command response. The response will include server state (see " plus the current clock value. + "resp-syntax": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value.", } -- GitLab From d785f4f91662c4b6de8e366865b8d4f409d7401c Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 07:30:16 -0400 Subject: [PATCH 119/169] the editor is complaining about this one, presumably something is still broken here. --- doc/api/ha-heartbeat.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index 87d0476748..9513d625ac 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -7,7 +7,6 @@ "avail": "1.4.0", "hook": "high_availability", "cmd-syntax": "{ - \"command\": \"ha-heartbeat\" -, + \"command\": \"ha-heartbeat\", "resp-syntax": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value.", } -- GitLab From 586cf9efa1cd6dd89438edfb009f7470d4e0d7ea Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 07:44:05 -0400 Subject: [PATCH 120/169] Update ha-scopes.json --- doc/api/ha-scopes.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/api/ha-scopes.json b/doc/api/ha-scopes.json index d88eaa7168..2d79130d40 100644 --- a/doc/api/ha-scopes.json +++ b/doc/api/ha-scopes.json @@ -1,7 +1,6 @@ { "name": "ha-scopes", - "brief": "This command allows for modifying the High Availability (HA) scopes - that the server is serving.a sentence or two explaining what this command does", + "brief": "This command modifies the scope that the server is responsible for serving when operating in High Availability (HA) mode.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.4.0", @@ -12,6 +11,5 @@ \"arguments\": { \"scopes\": [ \"HA_server1\", \"HA_server2\" ] } -} -" + "cmd-comment": " In the example given, the arguments configure the server to handle traffic from both HA_server1 and HA_server2 scopes.", } -- GitLab From 7044f99b58587c47ac45e35d08095ab71eca6477 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 07:56:56 -0400 Subject: [PATCH 121/169] Update ha-heartbeat.json --- doc/api/ha-heartbeat.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index 9513d625ac..4050997feb 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -8,5 +8,5 @@ "hook": "high_availability", "cmd-syntax": "{ \"command\": \"ha-heartbeat\", - "resp-syntax": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value.", + "resp-comment": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value." } -- GitLab From 144e46c8d4434683addec753bcbc5f3faa0c81a2 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 08:15:54 -0400 Subject: [PATCH 122/169] Update ha-heartbeat.json --- doc/api/ha-heartbeat.json | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index 4050997feb..a1e3efc74d 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -9,4 +9,5 @@ "cmd-syntax": "{ \"command\": \"ha-heartbeat\", "resp-comment": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value." +}" } -- GitLab From 6f43e6fa2b4101eda031000d6c3eab8bbfa21986 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 08:30:56 -0400 Subject: [PATCH 123/169] Update ha-heartbeat.json --- doc/api/ha-heartbeat.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/ha-heartbeat.json b/doc/api/ha-heartbeat.json index a1e3efc74d..0ed6464e19 100644 --- a/doc/api/ha-heartbeat.json +++ b/doc/api/ha-heartbeat.json @@ -8,6 +8,6 @@ "hook": "high_availability", "cmd-syntax": "{ \"command\": \"ha-heartbeat\", + }", "resp-comment": "The response to this command is different from the typical command response. The response will include server state (see plus the current clock value." -}" } -- GitLab From 5a0ac2f3bbbde53ce7fedf4df2d81f2939e22c23 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 08:42:44 -0400 Subject: [PATCH 124/169] Update ha-scopes.json --- doc/api/ha-scopes.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/ha-scopes.json b/doc/api/ha-scopes.json index 2d79130d40..28b48eeb92 100644 --- a/doc/api/ha-scopes.json +++ b/doc/api/ha-scopes.json @@ -10,6 +10,6 @@ \"service\": [ ], \"arguments\": { \"scopes\": [ \"HA_server1\", \"HA_server2\" ] - } - "cmd-comment": " In the example given, the arguments configure the server to handle traffic from both HA_server1 and HA_server2 scopes.", + }", + "cmd-comment": "In the example given, the arguments configure the server to handle traffic from both HA_server1 and HA_server2 scopes." } -- GitLab From 37a51017ebc395bc9cfde98adf2392ff74e90da8 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 10:40:01 -0400 Subject: [PATCH 125/169] Update lease4-add.json --- doc/api/lease4-add.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index ee11d8b409..5768bc270d 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -1,6 +1,6 @@ { "name": "lease4-add", - "brief": "The lease4-add command allows for the creation of a new lease.", + "brief": "The lease4-add command adds a new IPv4 lease administratively.", "description": "See ", "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.3.0", @@ -11,5 +11,6 @@ \"ip-address\": \"192.0.2.202\", \"hw-address\": \"1a:1b:1c:1d:1e:1f\" } -}" +}", + "cmd-comment": "Note that Kea 1.4 requires an additional argument, subnet-ID, which is optional as of Kea 1.5. A number of other more detailed optional arguments are also supported." } -- GitLab From 11be56de0ceef707954299721f7808e2a645145b Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 10:51:13 -0400 Subject: [PATCH 126/169] Update lease4-del.json --- doc/api/lease4-del.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/lease4-del.json b/doc/api/lease4-del.json index 5c0b166188..37ccc6bb9a 100644 --- a/doc/api/lease4-del.json +++ b/doc/api/lease4-del.json @@ -2,7 +2,7 @@ "name": "lease4-del", "brief": "lease4-del can be used to delete a lease from the lease database.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ @@ -11,5 +11,5 @@ \"ip-address\": \"192.0.2.202\" } }", - "cmd-comment": "leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found." -} + "cmd-comment": "Specify the lease to be deleted either by IP address, or by identifier-type and identifier value. Currently supported identifiers are \"hw-address\" and \"client-id\"." +} \ No newline at end of file -- GitLab From 86c6f74ffa7e9111a80a6f81cfe6b226e0e3134b Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 10:51:53 -0400 Subject: [PATCH 127/169] Update lease4-add.json --- doc/api/lease4-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index 5768bc270d..f83c0fb5e4 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -2,7 +2,7 @@ "name": "lease4-add", "brief": "The lease4-add command adds a new IPv4 lease administratively.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From 44e973a125ebc5b164ec4c0ee95501e6a7b5ffd4 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:10:46 -0400 Subject: [PATCH 128/169] Update lease4-get-all.json --- doc/api/lease4-get-all.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/lease4-get-all.json b/doc/api/lease4-get-all.json index f8a60b8dd0..1b03e3abfe 100644 --- a/doc/api/lease4-get-all.json +++ b/doc/api/lease4-get-all.json @@ -2,11 +2,12 @@ "name": "lease4-get-all", "brief": "lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.4.0", "hook": "lease_cmds", "cmd-syntax": "{ \"command\": \"lease4-get-all\" + \"arguments\": \"subnets\" }", "cmd-comment": "The lease4-get-all command may result in very large responses." } -- GitLab From a249a3cfb4ffe23628987bdf0bbc1fccfcd3ac79 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:15:33 -0400 Subject: [PATCH 129/169] Update lease4-get.json --- doc/api/lease4-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-get.json b/doc/api/lease4-get.json index 5512e84474..2fea7c8b49 100644 --- a/doc/api/lease4-get.json +++ b/doc/api/lease4-get.json @@ -2,7 +2,7 @@ "name": "lease4-get", "brief": "lease4-get can be used to query the lease database and retrieve existing leases.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From e009f8b6c15cb5ad203d22970c61501d5c4bc6a9 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:16:18 -0400 Subject: [PATCH 130/169] Update lease4-update.json --- doc/api/lease4-update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-update.json b/doc/api/lease4-update.json index 416a3263d8..8ae92c2386 100644 --- a/doc/api/lease4-update.json +++ b/doc/api/lease4-update.json @@ -2,7 +2,7 @@ "name": "lease4-update", "brief": "The lease4-update command can be used to update existing leases.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From a62bcd2701a61dd27699b8c53056db959a113bd7 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:16:46 -0400 Subject: [PATCH 131/169] Update lease4-wipe.json --- doc/api/lease4-wipe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-wipe.json b/doc/api/lease4-wipe.json index 8b357ac46c..1b6d745dcb 100644 --- a/doc/api/lease4-wipe.json +++ b/doc/api/lease4-wipe.json @@ -2,7 +2,7 @@ "name": "lease4-wipe", "brief": "lease4-wipe is designed to remove all leases associated with a given subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From c31226b87451884098357cc8852eb2e091dd2a26 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:17:28 -0400 Subject: [PATCH 132/169] Update lease6-add.json --- doc/api/lease6-add.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/lease6-add.json b/doc/api/lease6-add.json index ac361b110f..039b11203a 100644 --- a/doc/api/lease6-add.json +++ b/doc/api/lease6-add.json @@ -1,8 +1,8 @@ { "name": "lease6-add", - "brief": "The lease6-add command allows for the creation of a new lease.", + "brief": "The lease6-add command creates a new lease administratively.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From c51dc1dcef9d67ff8f565abb7551147b8fba83c7 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:18:25 -0400 Subject: [PATCH 133/169] Update lease6-del.json --- doc/api/lease6-del.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/lease6-del.json b/doc/api/lease6-del.json index 0f5ab56b1c..c81bb27b83 100644 --- a/doc/api/lease6-del.json +++ b/doc/api/lease6-del.json @@ -1,12 +1,12 @@ { "name": "lease6-del", "brief": "lease6-del can be used to delete a lease from the lease database.", - "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "description": "See ", + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ - \"command\": \"lease4-del\", + \"command\": \"lease6-del\", \"arguments\": { \"ip-address\": \"192.0.2.202\" } -- GitLab From 26e9727d5846d0cf9fa0eae890f8defb70907348 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:23:51 -0400 Subject: [PATCH 134/169] Update lease4-add.json --- doc/api/lease4-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease4-add.json b/doc/api/lease4-add.json index f83c0fb5e4..7e95990ce1 100644 --- a/doc/api/lease4-add.json +++ b/doc/api/lease4-add.json @@ -1,7 +1,7 @@ { "name": "lease4-add", "brief": "The lease4-add command adds a new IPv4 lease administratively.", - "description": "See ", + "description": "See ", "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "lease_cmds", -- GitLab From 8b4fb21d750d86590eabdcacb4448b4cc7dfca79 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:29:09 -0400 Subject: [PATCH 135/169] Update lease6-get-all.json --- doc/api/lease6-get-all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-get-all.json b/doc/api/lease6-get-all.json index 3a23b2a02f..e60bc812b9 100644 --- a/doc/api/lease6-get-all.json +++ b/doc/api/lease6-get-all.json @@ -2,7 +2,7 @@ "name": "lease6-get-all", "brief": "lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From 44c7a76c327908cb82f3c2459ee387d4b0014a3a Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:29:45 -0400 Subject: [PATCH 136/169] Update lease6-get.json --- doc/api/lease6-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-get.json b/doc/api/lease6-get.json index 3b2fd3fd72..646c7eafbc 100644 --- a/doc/api/lease6-get.json +++ b/doc/api/lease6-get.json @@ -2,7 +2,7 @@ "name": "lease6-get", "brief": "lease6-get can be used to query the lease database and retrieve existing leases.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From 59633aa940e0e35387f1d0d90d2fcb6f0d037eb0 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:30:14 -0400 Subject: [PATCH 137/169] Update leases-reclaim.json --- doc/api/leases-reclaim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/leases-reclaim.json b/doc/api/leases-reclaim.json index c6d9b8f2bc..adf3feae96 100644 --- a/doc/api/leases-reclaim.json +++ b/doc/api/leases-reclaim.json @@ -2,7 +2,7 @@ "name": "leases-reclaim", "brief": "The leases-reclaim command instructs the server to reclaim all expired leases immediately.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.0.0", "cmd-syntax": "{ \"command\": \"leases-reclaim\", -- GitLab From 2350800b5d500c8b047ae369e601c52bc16b4fe2 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:30:48 -0400 Subject: [PATCH 138/169] Update lease6-update.json --- doc/api/lease6-update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-update.json b/doc/api/lease6-update.json index adfafc3d3b..26a7bb694d 100644 --- a/doc/api/lease6-update.json +++ b/doc/api/lease6-update.json @@ -2,7 +2,7 @@ "name": "lease6-update", "brief": "The lease6-update command can be used to update existing leases.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From f6457d28e68aef2bd7829d9a72802b84aa6d1e99 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:32:28 -0400 Subject: [PATCH 139/169] Update network4-add.json --- doc/api/network4-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-add.json b/doc/api/network4-add.json index 79d94222b1..c6fc25b814 100644 --- a/doc/api/network4-add.json +++ b/doc/api/network4-add.json @@ -2,7 +2,7 @@ "name": "network4-add", "brief": "The network4-add command is used to add a new shared network.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 86907ca25cc065bb60197a43aa9319da468686f3 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:33:09 -0400 Subject: [PATCH 140/169] Update network4-del.json --- doc/api/network4-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-del.json b/doc/api/network4-del.json index ec5727eae6..df747a05da 100644 --- a/doc/api/network4-del.json +++ b/doc/api/network4-del.json @@ -2,7 +2,7 @@ "name": "network4-del", "brief": "The network4-del command is used to delete existing shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From c717395e44ab4735cd6c9f7199b3f447872e22e9 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:34:07 -0400 Subject: [PATCH 141/169] Update network4-get.json --- doc/api/network4-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-get.json b/doc/api/network4-get.json index bef4a308d3..83c91dd058 100644 --- a/doc/api/network4-get.json +++ b/doc/api/network4-get.json @@ -2,7 +2,7 @@ "name": "network4-get", "brief": "The network4-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From f4e5e9880f6e7da1a96bf9c1db9f53d9df0aa47b Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:35:02 -0400 Subject: [PATCH 142/169] Update network4-list.json --- doc/api/network4-list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-list.json b/doc/api/network4-list.json index 865a7c5011..77e8da9412 100644 --- a/doc/api/network4-list.json +++ b/doc/api/network4-list.json @@ -2,7 +2,7 @@ "name": "network4-list", "brief": "The network4-list command is used to retrieve full list of currently configured shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From efd315c17245e280a1bbf8dc34c85341e08b3bfb Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:35:48 -0400 Subject: [PATCH 143/169] Update network4-subnet-add.json --- doc/api/network4-subnet-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-subnet-add.json b/doc/api/network4-subnet-add.json index 4eb8080e33..f1e3265167 100644 --- a/doc/api/network4-subnet-add.json +++ b/doc/api/network4-subnet-add.json @@ -2,7 +2,7 @@ "name": "network4-subnet-add", "brief": "The network4-subnet-add command is used to add existing subnets to existing shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From f206df5ec1976b30c484d306f043dc1cc24ed3a3 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:38:25 -0400 Subject: [PATCH 144/169] Update network4-subnet-del.json --- doc/api/network4-subnet-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network4-subnet-del.json b/doc/api/network4-subnet-del.json index 1fb9ed7b05..d417f4f663 100644 --- a/doc/api/network4-subnet-del.json +++ b/doc/api/network4-subnet-del.json @@ -2,7 +2,7 @@ "name": "network4-subnet-del", "brief": "The network4-subnet-del command is used to remove a subnet that is part of an existing shared network and demote it to a plain, stand-alone subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 39793f583c4a65ef91e0d3410e7d9c75a494b7e4 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:53:44 -0400 Subject: [PATCH 145/169] Update network6-add.json --- doc/api/network6-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-add.json b/doc/api/network6-add.json index d3b56c944a..b3ddab8e90 100644 --- a/doc/api/network6-add.json +++ b/doc/api/network6-add.json @@ -2,7 +2,7 @@ "name": "network6-add", "brief": "The network6-add command is used to add a new shared network.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From ac4ecb9b73bb8731f0e7582cfae01ed27d8696de Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:54:12 -0400 Subject: [PATCH 146/169] Update network6-del.json --- doc/api/network6-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-del.json b/doc/api/network6-del.json index 5339f2a7aa..7217336f84 100644 --- a/doc/api/network6-del.json +++ b/doc/api/network6-del.json @@ -2,7 +2,7 @@ "name": "network6-del", "brief": "The network6-del command is used to delete existing shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From c0aa3e0d03d3c2f06b5811925d2308e1e3227173 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 11:54:40 -0400 Subject: [PATCH 147/169] Update network6-get.json --- doc/api/network6-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-get.json b/doc/api/network6-get.json index 69e8b35257..99807eaadc 100644 --- a/doc/api/network6-get.json +++ b/doc/api/network6-get.json @@ -2,7 +2,7 @@ "name": "network6-get", "brief": "The network6-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From f8f94d8eed2fd04c30a5137ceeeda78adf1ca7e7 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:09:51 -0400 Subject: [PATCH 148/169] Update network6-list.json --- doc/api/network6-list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-list.json b/doc/api/network6-list.json index 61d731b313..4febd2ce3a 100644 --- a/doc/api/network6-list.json +++ b/doc/api/network6-list.json @@ -2,7 +2,7 @@ "name": "network6-list", "brief": "The network6-list command is used to retrieve full list of currently configured shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 6c0c5c461af4f0660329ebfe351a58af112f0b31 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:10:15 -0400 Subject: [PATCH 149/169] Update network6-subnet-add.json --- doc/api/network6-subnet-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-subnet-add.json b/doc/api/network6-subnet-add.json index 0864d353eb..a23a45e6c2 100644 --- a/doc/api/network6-subnet-add.json +++ b/doc/api/network6-subnet-add.json @@ -2,7 +2,7 @@ "name": "network6-subnet-add", "brief": "The network6-subnet-add command is used to add existing subnets to existing shared networks.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 74e11d74723f1440dfa1bdce1a3a688048d2c538 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:10:41 -0400 Subject: [PATCH 150/169] Update network6-subnet-del.json --- doc/api/network6-subnet-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/network6-subnet-del.json b/doc/api/network6-subnet-del.json index f0e12e123f..4b43e7fce2 100644 --- a/doc/api/network6-subnet-del.json +++ b/doc/api/network6-subnet-del.json @@ -2,7 +2,7 @@ "name": "network6-subnet-del", "brief": "The network6-subnet-del command is used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 7b9ff24b0e851870fa48557f5d1e1c60deec453a Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:11:25 -0400 Subject: [PATCH 151/169] Update stat-lease4-get.json --- doc/api/stat-lease4-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stat-lease4-get.json b/doc/api/stat-lease4-get.json index 4ab8f9aaf6..b155d9c7ff 100644 --- a/doc/api/stat-lease4-get.json +++ b/doc/api/stat-lease4-get.json @@ -3,7 +3,7 @@ "brief": "The stat-lease4-get command fetches lease statistics for a range of known IPv4 subnets.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4" ], "avail": "1.4.0", "hook": "stat_cmds", "cmd-syntax": "{ -- GitLab From 455db43c3872e369eefc13e146929235d75455bb Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:11:51 -0400 Subject: [PATCH 152/169] Update stat-lease6-get.json --- doc/api/stat-lease6-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stat-lease6-get.json b/doc/api/stat-lease6-get.json index 4221b0a8a3..3834d7320c 100644 --- a/doc/api/stat-lease6-get.json +++ b/doc/api/stat-lease6-get.json @@ -3,7 +3,7 @@ "brief": "The stat-lease6-get command fetches lease statistics for a range of known IPv6 subnets.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.4.0", "hook": "stat_cmds", "cmd-syntax": "{ -- GitLab From 4bab508bafe5f585c232f4ca6def6045ed6ef5b9 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:12:23 -0400 Subject: [PATCH 153/169] Update subnet6-list.json --- doc/api/subnet6-list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet6-list.json b/doc/api/subnet6-list.json index 98a2530a0f..fc95177c57 100644 --- a/doc/api/subnet6-list.json +++ b/doc/api/subnet6-list.json @@ -2,7 +2,7 @@ "name": "subnet6-list", "brief": "This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From e8d620d9b27c3134c0a5f18c9e7253582af2a032 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:12:45 -0400 Subject: [PATCH 154/169] Update subnet6-get.json --- doc/api/subnet6-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet6-get.json b/doc/api/subnet6-get.json index dde5a00aa2..cc9e921677 100644 --- a/doc/api/subnet6-get.json +++ b/doc/api/subnet6-get.json @@ -2,7 +2,7 @@ "name": "subnet6-get", "brief": "This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet6-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From ff2feaa497f2fa67b530da5fce970cc7acec3e5d Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:13:18 -0400 Subject: [PATCH 155/169] Update subnet6-del.json --- doc/api/subnet6-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet6-del.json b/doc/api/subnet6-del.json index 3ce5e70096..d95e48828c 100644 --- a/doc/api/subnet6-del.json +++ b/doc/api/subnet6-del.json @@ -2,7 +2,7 @@ "name": "subnet6-del", "brief": "This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 23130a6ba828016782ed2d9234e743688ab6f179 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:13:45 -0400 Subject: [PATCH 156/169] Update subnet6-add.json --- doc/api/subnet6-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet6-add.json b/doc/api/subnet6-add.json index bd477eb1f3..727241f246 100644 --- a/doc/api/subnet6-add.json +++ b/doc/api/subnet6-add.json @@ -2,7 +2,7 @@ "name": "subnet6-add", "brief": "This command is used to create and add new subnet to the existing server configuration. This operation has no impact on other subnets.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From 6dcc03ab9d0b4459e7127f487d78a7a69b526996 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:14:12 -0400 Subject: [PATCH 157/169] Update subnet4-list.json --- doc/api/subnet4-list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet4-list.json b/doc/api/subnet4-list.json index 9166a3a1b2..e514cbfd56 100644 --- a/doc/api/subnet4-list.json +++ b/doc/api/subnet4-list.json @@ -2,7 +2,7 @@ "name": "subnet4-list", "brief": "This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From b1bbf54096c309860ac2d61d2681faf652fb2bb6 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:14:35 -0400 Subject: [PATCH 158/169] Update subnet4-get.json --- doc/api/subnet4-get.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet4-get.json b/doc/api/subnet4-get.json index 2bef76adc5..69d52202dc 100644 --- a/doc/api/subnet4-get.json +++ b/doc/api/subnet4-get.json @@ -2,7 +2,7 @@ "name": "subnet4-get", "brief": "This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet4-list, which is used to discover available subnets with their respective subnet identifiers and prefixes.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4" ], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From d8812c1d6d52989bbcccadd06476d7bf231427e5 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:14:59 -0400 Subject: [PATCH 159/169] Update subnet4-del.json --- doc/api/subnet4-del.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet4-del.json b/doc/api/subnet4-del.json index cf3475bf61..3adf0d59a7 100644 --- a/doc/api/subnet4-del.json +++ b/doc/api/subnet4-del.json @@ -2,7 +2,7 @@ "name": "subnet4-del", "brief": "This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From cc3d6dcc923d6fe0a1c3239422074f155f1eec53 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Wed, 10 Oct 2018 12:35:39 -0400 Subject: [PATCH 160/169] Update subnet4-add.json --- doc/api/subnet4-add.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/subnet4-add.json b/doc/api/subnet4-add.json index 5256c36b73..14daab1bb8 100644 --- a/doc/api/subnet4-add.json +++ b/doc/api/subnet4-add.json @@ -2,7 +2,7 @@ "name": "subnet4-add", "brief": "This command is used to create and add a new subnet to the existing server configuration.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp4"], "avail": "1.3.0", "hook": "subnet_cmds", "cmd-syntax": "{ -- GitLab From a4e7d5443a4e0b7f3e5053056b9043e06696fd3e Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 16 Oct 2018 17:49:40 +0200 Subject: [PATCH 161/169] Fixed cache-remove.json, config-get.json --- doc/api/cache-remove.json | 1 - doc/api/config-get.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/cache-remove.json b/doc/api/cache-remove.json index 60b307196e..564a28ec56 100644 --- a/doc/api/cache-remove.json +++ b/doc/api/cache-remove.json @@ -1,4 +1,3 @@ -An example command to remove an IPv4 host with reserved address 192.0.2.1 from subnet with a subnet-id 123 looks as follows: { "name": "cache-remove", "brief": "The cache-remove command works similarly to reservation-get command.", diff --git a/doc/api/config-get.json b/doc/api/config-get.json index ad46969469..3aed593d13 100644 --- a/doc/api/config-get.json +++ b/doc/api/config-get.json @@ -9,7 +9,7 @@ "cmd-syntax": "{ \"command\": \"config-get\" }", - "This command takes no parameters.", + "cmd-comment": "This command takes no parameters.", "resp-syntax": "{ \"result\": , -- GitLab From 0c936d2549d65a6f4c1449e1309edf84fb9d26b0 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 16 Oct 2018 17:49:50 +0200 Subject: [PATCH 162/169] Regenerated api.xml --- doc/guide/api.xml | 148 ++++++++++++++++++---------------------------- 1 file changed, 56 insertions(+), 92 deletions(-) diff --git a/doc/guide/api.xml b/doc/guide/api.xml index 0383d34761..44edbd3d60 100644 --- a/doc/guide/api.xml +++ b/doc/guide/api.xml @@ -109,13 +109,7 @@ , lease4-get-all , lease4-update , lease4-wipe -, lease6-add -, lease6-del -, lease6-get -, lease6-get-all -, lease6-update , lease6-wipe -, leases-reclaim , libreload , list-commands , network4-add @@ -124,18 +118,11 @@ , network4-list , network4-subnet-add , network4-subnet-del -, network6-add -, network6-del -, network6-get -, network6-list -, network6-subnet-add -, network6-subnet-del , reservation-add , reservation-del , reservation-get , shutdown , stat-lease4-get -, stat-lease6-get , statistic-get , statistic-get-all , statistic-remove @@ -146,10 +133,6 @@ , subnet4-del , subnet4-get , subnet4-list -, subnet6-add -, subnet6-del -, subnet6-get -, subnet6-list , version-get . Commands supported by kea-dhcp6 daemon: build-report @@ -170,12 +153,6 @@ , ha-heartbeat , ha-scopes , ha-sync -, lease4-add -, lease4-del -, lease4-get -, lease4-get-all -, lease4-update -, lease4-wipe , lease6-add , lease6-del , lease6-get @@ -185,12 +162,6 @@ , leases-reclaim , libreload , list-commands -, network4-add -, network4-del -, network4-get -, network4-list -, network4-subnet-add -, network4-subnet-del , network6-add , network6-del , network6-get @@ -201,7 +172,6 @@ , reservation-del , reservation-get , shutdown -, stat-lease4-get , stat-lease6-get , statistic-get , statistic-get-all @@ -209,10 +179,6 @@ , statistic-remove-all , statistic-reset , statistic-reset-all -, subnet4-add -, subnet4-del -, subnet4-get -, subnet4-list , subnet6-add , subnet6-del , subnet6-get @@ -493,6 +459,8 @@ Result is an integer representation of the status. Currently supported statuses "subnet-id": 123 } } + +Another example that removes IPv6 host identifier by DUID and specific subnet-id is: { "command": "cache-remove", "arguments": { @@ -573,7 +541,7 @@ Result is an integer representation of the status. Currently supported statuses { "command": "config-get" } -config-get takes no parameters. +This command takes no parameters. Response syntax: { @@ -862,8 +830,7 @@ Result is an integer representation of the status. Currently supported statuses
ha-heartbeat reference ha-heartbeat - This command is sent internally by Kea partner when operating - in High Availability (HA) mode. It should not be used by users, - unless you want to implement complete HA replacement. + in High Availability (HA) mode. It will retrieve the server HA state and clock value. Supported by: kea-dhcp4, kea-dhcp6 @@ -872,19 +839,18 @@ Result is an integer representation of the status. Currently supported statuses Description and examples: See Command syntax: - tbd + { + "command": "ha-heartbeat", + } Response syntax: - tbd -Result is an integer representation of the status. Currently supported statuses are: - - 0 - success - 1 - error - 2 - unsupported - 3 - empty (command was completed successfully, but no data was affected or returned) - - + { + "result": <integer>, + "text": <string> +} + +The response to this command is different from the typical command response. The response will include server state (see plus the current clock value.
@@ -892,8 +858,7 @@ Result is an integer representation of the status. Currently supported statuses
ha-scopes reference -ha-scopes - This command allows for modifying the High Availability (HA) scopes - that the server is serving.a sentence or two explaining what this command does +ha-scopes - This command modifies the scope that the server is responsible for serving when operating in High Availability (HA) mode. Supported by: kea-dhcp4, kea-dhcp6 @@ -907,10 +872,8 @@ Result is an integer representation of the status. Currently supported statuses "service": [ <service, typically "dhcp4" or "dhcp6"> ], "arguments": { "scopes": [ "HA_server1", "HA_server2" ] - } -} - - + } +In the example given, the arguments configure the server to handle traffic from both HA_server1 and HA_server2 scopes. Response syntax: { @@ -974,9 +937,9 @@ Result is an integer representation of the status. Currently supported statuses
lease4-add reference -lease4-add - The lease4-add command allows for the creation of a new lease. +lease4-add - The lease4-add command adds a new IPv4 lease administratively. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (lease_cmds hook) @@ -990,7 +953,7 @@ Result is an integer representation of the status. Currently supported statuses "hw-address": "1a:1b:1c:1d:1e:1f" } } - +Note that Kea 1.4 requires an additional argument, subnet-ID, which is optional as of Kea 1.5. A number of other more detailed optional arguments are also supported. Response syntax: { @@ -1015,7 +978,7 @@ Result is an integer representation of the status. Currently supported statuses lease4-del reference lease4-del - lease4-del can be used to delete a lease from the lease database. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (lease_cmds hook) @@ -1028,7 +991,7 @@ Result is an integer representation of the status. Currently supported statuses "ip-address": "192.0.2.202" } } -leaseX-del returns a result that indicates a outcome of the operation. It has one of the following values: 0 (success), 1 (error) or 3 (empty). The empty result means that a query has been completed properly, but the object (a lease in this case) has not been found. +Specify the lease to be deleted either by IP address, or by identifier-type and identifier value. Currently supported identifiers are "hw-address" and "client-id". Response syntax: { @@ -1053,7 +1016,7 @@ Result is an integer representation of the status. Currently supported statuses lease4-get reference lease4-get - lease4-get can be used to query the lease database and retrieve existing leases. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (lease_cmds hook) @@ -1095,7 +1058,7 @@ lease4-get returns a result that indicates a result of the operation and lease d lease4-get-all reference lease4-get-all - lease4-get-all is used to retrieve all IPv4 leases or all leases for the specified set of subnets. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.4.0 (lease_cmds hook) @@ -1104,6 +1067,7 @@ lease4-get returns a result that indicates a result of the operation and lease d Command syntax: { "command": "lease4-get-all" + "arguments": "subnets" } The lease4-get-all command may result in very large responses. @@ -1130,7 +1094,7 @@ Result is an integer representation of the status. Currently supported statuses lease4-update reference lease4-update - The lease4-update command can be used to update existing leases. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (lease_cmds hook) @@ -1172,7 +1136,7 @@ Result is an integer representation of the status. Currently supported statuses lease4-wipe reference lease4-wipe - lease4-wipe is designed to remove all leases associated with a given subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (lease_cmds hook) @@ -1208,9 +1172,9 @@ Result is an integer representation of the status. Currently supported statuses
lease6-add reference -lease6-add - The lease6-add command allows for the creation of a new lease. +lease6-add - The lease6-add command creates a new lease administratively. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1248,7 +1212,7 @@ Result is an integer representation of the status. Currently supported statuses lease6-del reference lease6-del - lease6-del can be used to delete a lease from the lease database. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1256,7 +1220,7 @@ Result is an integer representation of the status. Currently supported statuses Command syntax: { - "command": "lease4-del", + "command": "lease6-del", "arguments": { "ip-address": "192.0.2.202" } @@ -1286,7 +1250,7 @@ Result is an integer representation of the status. Currently supported statuses lease6-get reference lease6-get - lease6-get can be used to query the lease database and retrieve existing leases. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1325,7 +1289,7 @@ Result is an integer representation of the status. Currently supported statuses lease6-get-all reference lease6-get-all - lease6-get-all is used to retrieve all IPv6 leases or all leases for the specified set of subnets. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1389,7 +1353,7 @@ The lease6-get-all command may result in very large responses. lease6-update reference lease6-update - The lease6-update command can be used to update existing leases. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1471,7 +1435,7 @@ Result is an integer representation of the status. Currently supported statuses leases-reclaim reference leases-reclaim - The leases-reclaim command instructs the server to reclaim all expired leases immediately. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.0.0 (built-in) @@ -1581,7 +1545,7 @@ Result is an integer representation of the status. Currently supported statuses network4-add reference network4-add - The network4-add command is used to add a new shared network. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1646,7 +1610,7 @@ Result is an integer representation of the status. Currently supported statuses network4-del reference network4-del - The network4-del command is used to delete existing shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1690,7 +1654,7 @@ Result is an integer representation of the status. Currently supported statuses network4-get reference network4-get - The network4-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1748,7 +1712,7 @@ Note that the actual response contains many additional fields that are omitted h network4-list reference network4-list - The network4-list command is used to retrieve full list of currently configured shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1788,7 +1752,7 @@ Result is an integer representation of the status. Currently supported statuses network4-subnet-add reference network4-subnet-add - The network4-subnet-add command is used to add existing subnets to existing shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1826,7 +1790,7 @@ Result is an integer representation of the status. Currently supported statuses network4-subnet-del reference network4-subnet-del - The network4-subnet-del command is used to remove a subnet that is part of an existing shared network and demote it to a plain, stand-alone subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -1864,7 +1828,7 @@ Result is an integer representation of the status. Currently supported statuses network6-add reference network6-add - The network6-add command is used to add a new shared network. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -1929,7 +1893,7 @@ Result is an integer representation of the status. Currently supported statuses network6-del reference network6-del - The network6-del command is used to delete existing shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -1970,7 +1934,7 @@ Result is an integer representation of the status. Currently supported statuses network6-get reference network6-get - The network6-get command is used to retrieve detailed information about shared networks, including subnets currently being part of a given network. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2028,7 +1992,7 @@ Note that the actual response contains many additional fields that are omitted h network6-list reference network6-list - The network6-list command is used to retrieve full list of currently configured shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2068,7 +2032,7 @@ Result is an integer representation of the status. Currently supported statuses network6-subnet-add reference network6-subnet-add - The network6-subnet-add command is used to add existing subnets to existing shared networks. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2106,7 +2070,7 @@ Result is an integer representation of the status. Currently supported statuses network6-subnet-del reference network6-subnet-del - The network6-subnet-del command is used to remove a subnet that is part of existing shared network and demote it to a plain, stand-alone subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2335,7 +2299,7 @@ Result is an integer representation of the status. Currently supported statuses stat-lease4-get - The stat-lease4-get command fetches lease statistics for a range of known IPv4 subnets. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.4.0 (stat_cmds hook) @@ -2383,7 +2347,7 @@ Result is an integer representation of the status. Currently supported statuses stat-lease6-get - The stat-lease6-get command fetches lease statistics for a range of known IPv6 subnets. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.4.0 (stat_cmds hook) @@ -2653,7 +2617,7 @@ Result is an integer representation of the status. Currently supported statuses subnet4-add reference subnet4-add - This command is used to create and add a new subnet to the existing server configuration. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -2702,7 +2666,7 @@ Result is an integer representation of the status. Currently supported statuses subnet4-del reference subnet4-del - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -2747,7 +2711,7 @@ Result is an integer representation of the status. Currently supported statuses subnet4-get reference subnet4-get - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet4-list, which is used to discover available subnets with their respective subnet identifiers and prefixes. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -2796,7 +2760,7 @@ Result is an integer representation of the status. Currently supported statuses subnet4-list reference subnet4-list - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp4 Availability: 1.3.0 (subnet_cmds hook) @@ -2834,7 +2798,7 @@ If no IPv4 subnets are found, an error code is returned along with the error des subnet6-add reference subnet6-add - This command is used to create and add new subnet to the existing server configuration. This operation has no impact on other subnets. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2883,7 +2847,7 @@ Result is an integer representation of the status. Currently supported statuses subnet6-del reference subnet6-del - This command is used to remove a subnet from the server's configuration. This command has no effect on other configured subnets but removing a subnet has certain implications which the server's administrator should be aware of. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2926,7 +2890,7 @@ Result is an integer representation of the status. Currently supported statuses subnet6-get reference subnet6-get - This command is used to retrieve detailed information about the specified subnet. This command usually follows the subnet6-list, which is used to discover available subnets with their respective subnet identifiers and prefixes. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) @@ -2975,7 +2939,7 @@ Result is an integer representation of the status. Currently supported statuses subnet6-list reference subnet6-list - This command is used to list all currently configured subnets. The subnets are returned in a brief form, i.e. a subnet identifier and subnet prefix is included for each subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (subnet_cmds hook) -- GitLab From c66627bcd69c8b587a9fa2ee54efb28fc78af76b Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Tue, 16 Oct 2018 12:40:01 -0400 Subject: [PATCH 163/169] Update lease6-wipe.json --- doc/api/lease6-wipe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/lease6-wipe.json b/doc/api/lease6-wipe.json index cffbf1d501..ace82847b7 100644 --- a/doc/api/lease6-wipe.json +++ b/doc/api/lease6-wipe.json @@ -2,7 +2,7 @@ "name": "lease6-wipe", "brief": "lease6-wipe is designed to remove all leases associated with a given subnet.", "description": "See ", - "support": [ "kea-dhcp4", "kea-dhcp6" ], + "support": [ "kea-dhcp6" ], "avail": "1.3.0", "hook": "lease_cmds", "cmd-syntax": "{ -- GitLab From 0aa081c5d21865a9c89afc17b819b5f7a7ab9002 Mon Sep 17 00:00:00 2001 From: Vicky Risk Date: Tue, 16 Oct 2018 13:45:49 -0400 Subject: [PATCH 164/169] Update leases-reclaim.json --- doc/api/leases-reclaim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/leases-reclaim.json b/doc/api/leases-reclaim.json index adf3feae96..c6d9b8f2bc 100644 --- a/doc/api/leases-reclaim.json +++ b/doc/api/leases-reclaim.json @@ -2,7 +2,7 @@ "name": "leases-reclaim", "brief": "The leases-reclaim command instructs the server to reclaim all expired leases immediately.", "description": "See ", - "support": [ "kea-dhcp6" ], + "support": [ "kea-dhcp4", "kea-dhcp6" ], "avail": "1.0.0", "cmd-syntax": "{ \"command\": \"leases-reclaim\", -- GitLab From a9d8c0b127656883ab57aeeafa57abb2c482f614 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Fri, 26 Oct 2018 18:04:16 +0200 Subject: [PATCH 165/169] [#10,!3] Corrected typo in the Makefile.am. --- doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index acd0a56ee7..6f0c22a1e4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -130,7 +130,7 @@ clean: # If you don't want to provide command syntax (cmd-syntax key), # any comments about the syntax (cmd-comment key) or response syntax # (resp-syntax) or any comment about response (resp-comment), simply -# remove those unused keys. The generator will attempt to gerate +# remove those unused keys. The generator will attempt to generate # boilerplates for it. # 6. Generate api.xml: make api # 7. Rebuild User's Guide as usual: make guide -- GitLab From d6f340928bd11a2e1d2fdec2f84b4e2f9f28691e Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Fri, 26 Oct 2018 18:23:17 +0200 Subject: [PATCH 166/169] [#10,!3] Tiny corrections in 3 API commands. --- doc/api/build-report.json | 2 +- doc/api/config-get.json | 2 +- doc/api/reservation-get.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/build-report.json b/doc/api/build-report.json index 9313835879..14682c083b 100644 --- a/doc/api/build-report.json +++ b/doc/api/build-report.json @@ -1,6 +1,6 @@ { "name": "build-report", - "brief": "returns a list of compilation options that this particular binary was built with", + "brief": "Returns a list of compilation options that this particular binary was built with", "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], "avail": "1.2.0", diff --git a/doc/api/config-get.json b/doc/api/config-get.json index 3aed593d13..7ed254a56a 100644 --- a/doc/api/config-get.json +++ b/doc/api/config-get.json @@ -1,6 +1,6 @@ { "name": "config-get", - "brief": "retrieves the current configuration used by the server. The configuration + "brief": "Retrieves the current configuration used by the server. The configuration is roughtly equal to the configuration file, but includes additional changes made by other commands and due to parameters inheritance.", "support": [ "kea-dhcp4", "kea-dhcp6", "kea-ctrl-agent" ], diff --git a/doc/api/reservation-get.json b/doc/api/reservation-get.json index cb6925758d..ef359b0928 100644 --- a/doc/api/reservation-get.json +++ b/doc/api/reservation-get.json @@ -1,6 +1,6 @@ { "name": "reservation-get", - "brief": "attempts to retrieve an existing host reservation", + "brief": "Attempts to retrieve an existing host reservation", "support": [ "kea-dhcp4", "kea-dhcp6" ], "hook": "host_cmds", "avail": "1.2.0", -- GitLab From b21559b502926af185dee8044ae96254cb8deb32 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 29 Oct 2019 18:33:17 +0100 Subject: [PATCH 167/169] [#10,!3] Copyright years are now autogenerated. --- doc/docgen/kea_docgen.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/docgen/kea_docgen.cc b/doc/docgen/kea_docgen.cc index 3a9044e834..0ca6f4cc46 100644 --- a/doc/docgen/kea_docgen.cc +++ b/doc/docgen/kea_docgen.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -157,7 +158,16 @@ public: /// @param f stream to write copyrights to void generateCopyright(stringstream& f) { f << "
build-report reference -build-report - returns a list of compilation options that this particular binary was built with +build-report - Returns a list of compilation options that this particular binary was built with Supported by: kea-dhcp4, kea-dhcp6, kea-ctrl-agent @@ -527,7 +527,7 @@ Result is an integer representation of the status. Currently supported statuses
config-get reference -config-get - retrieves the current configuration used by the server. The configuration +config-get - Retrieves the current configuration used by the server. The configuration is roughtly equal to the configuration file, but includes additional changes made by other commands and due to parameters inheritance. @@ -1397,7 +1397,7 @@ Result is an integer representation of the status. Currently supported statuses lease6-wipe reference lease6-wipe - lease6-wipe is designed to remove all leases associated with a given subnet. -Supported by: kea-dhcp4, kea-dhcp6 +Supported by: kea-dhcp6 Availability: 1.3.0 (lease_cmds hook) @@ -1435,7 +1435,7 @@ Result is an integer representation of the status. Currently supported statuses leases-reclaim reference leases-reclaim - The leases-reclaim command instructs the server to reclaim all expired leases immediately. -Supported by: kea-dhcp6 +Supported by: kea-dhcp4, kea-dhcp6 Availability: 1.0.0 (built-in) @@ -2208,7 +2208,7 @@ Result is an integer representation of the status. Currently supported statuses
reservation-get reference -reservation-get - attempts to retrieve an existing host reservation +reservation-get - Attempts to retrieve an existing host reservation Supported by: kea-dhcp4, kea-dhcp6 -- GitLab From 5d2e4d6fcc182a19eafa895abc35b1aee599fd23 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Tue, 29 Oct 2019 18:56:44 +0100 Subject: [PATCH 169/169] [#10,!3] Section about generating documentation added. --- doc/Makefile.am | 1 + doc/devel/doc.dox | 78 ++++++++++++++++++++++++++++++++++++++++++ doc/devel/mainpage.dox | 1 + 3 files changed, 80 insertions(+) create mode 100644 doc/devel/doc.dox diff --git a/doc/Makefile.am b/doc/Makefile.am index 6f0c22a1e4..951c257a19 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,6 +7,7 @@ EXTRA_DIST += devel/contribute.dox EXTRA_DIST += devel/mainpage.dox EXTRA_DIST += devel/terminology.dox EXTRA_DIST += devel/unit-tests.dox +EXTRA_DIST += devel/doc.dox nobase_dist_doc_DATA = examples/agent/comments.json nobase_dist_doc_DATA += examples/agent/simple.json diff --git a/doc/devel/doc.dox b/doc/devel/doc.dox new file mode 100644 index 0000000000..5af28f24fe --- /dev/null +++ b/doc/devel/doc.dox @@ -0,0 +1,78 @@ +// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +/** + + @page docs Building Kea Documentation + + There are several types of documentation for Kea. The primary one, intended to + be read by users, is User's Guide. It comes in HTML, PDF and txt format. All + of them generated from the same sources. To generate this doc, you need to + run configure script with --enable-generate-docs option. Several tools have to + be present in the system: docbook environment, links and several others. + You can generate this by doing: +@code +$ ./configure --enable-generate-docs +$ cd doc/ +$ make guide +@endcode + +The output files will be generated in doc/guide/ directory. + +Since Kea 1.5, this doc has appendix A that lists all Kea commands. That +appendix is generated using a small tool called docgen. The basic principle +is that for every command there is a JSON file that briefly describes the major +aspects of the new command, such as name, short description, expected syntax, +expected response, a hook that needs to be loaded, first Kea version where it +appeared, etc. Those JSON files are loaded by docgen tool that will generate +api.xml that will be used by make guide. There is no need to generate this, +unless you alter description of existing commands or add a new one. + +@section docsNewCommand Documenting new command + +There are several steps needed to document a new API command: + + 1. edit docgen/cmds-list and add the new command + 2. ./configure --enable-generate-docs + 3. make - you need to build the sources first, am afraid. The reason why you + need to do this is that the tool kea-docgen depends on libkea-cc as it + loads JSON files. This means that the libs need to be built first. + 4. (optional) run: make templates + This will go through the list of commands listed in cmds-list + and will check if there are corresponding JSON files in api/name.json + If the file is missing, a new JSON will be created using template. + If you dislike this generator, you can always use api/_template.json + and copy it over under the name of a new command. + 5. Edit api/command-name.json. If the command is provided by the daemon + out of its own (and not via hook), simply delete the hook entry. + If you don't want to provide command syntax (cmd-syntax key), + any comments about the syntax (cmd-comment key) or response syntax + (resp-syntax) or any comment about response (resp-comment), simply + remove those unused keys. The generator will attempt to generate + boilerplates for it. + 6. Generate api.xml: make api + 7. Rebuild User's Guide as usual: make guide + +A word of caution regaring editing JSON files. The files themselves need to be +valid JSON files. They also often contain fields, such as command syntax or +command response, there are themselves a JSON or JSON like structures. That +means that some trickery with escaping double quotes will be involved. Note +there is no need to escape any other character, unless you want to specify +non-printable characters. + +@section docsDevelGuide Generating Developer's Guide + +Generating Developer's Guide is very simple, although you need to have +doxygen installed in your system. If you also have graphviz installed, it will +generate nice diagrams. To generate developer's guide, do the following commands: + +@code +$ ./configure +$ cd doc +$ make devel +@endcode + +*/ \ No newline at end of file diff --git a/doc/devel/mainpage.dox b/doc/devel/mainpage.dox index 5bed68f9d9..92a316c2a1 100644 --- a/doc/devel/mainpage.dox +++ b/doc/devel/mainpage.dox @@ -141,6 +141,7 @@ * - @subpage logNotes * - @subpage LoggingApi * - @subpage SocketSessionUtility + * - @subpage docs * - Documentation warnings and errors * */ -- GitLab