From: Francis Dupont Date: Fri, 9 Aug 2019 17:47:58 +0000 (+0200) Subject: [433-update-yang-models] Updated code and tests X-Git-Tag: Kea-1.6.0~41^2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9114c22101680dd7a081486f029884a5ec6b49f;p=thirdparty%2Fkea.git [433-update-yang-models] Updated code and tests --- diff --git a/doc/examples/kea4/all-keys-stable.json b/doc/examples/kea4/all-keys-stable.json index a99516fe7b..56d66744b8 100644 --- a/doc/examples/kea4/all-keys-stable.json +++ b/doc/examples/kea4/all-keys-stable.json @@ -6,8 +6,8 @@ // list of parameters supported by Kea DHCPv4 server along with the brief // description of each parameter. // -// This stable version is used for YANG as we do not want to update code -// and models each time a keyword is added to the syntax. +// This current version should be up to date, i.e. new keywords should be +// added in this file at the same time than in the syntax. { // Kea DHCPv4 server configuration begins here. "Dhcp4": { @@ -262,6 +262,69 @@ // User name to be used to access the database. "user": "kea" + }, + { + // Name of the database to connect to. + "name": "kea", + + // Host on which the database resides. + "host": "localhost", + + // Database password. + "password": "kea", + + // Port on which the database is available. + "port": 5432, + + // Type of the database, e.g. "mysql", "postgresql", "cql". + "type": "postgresql", + + // User name to be used to access the database. + "user": "kea" + }, + { + // Name of the database to connect to. + "keyspace": "kea", + + // Host on which the database resides. + "contact-points": "127.0.0.1", + + // Database password. + "password": "kea", + + // Port on which the database is available. + "port": 9042, + + // Type of the database, e.g. "mysql", "postgresql", "cql". + "type": "cql", + + // User name to be used to access the database. + "user": "kea", + + // Consistency level for all queries. + // Supported values: any, one, two, three, quorum, all, + // local-quorum, each-quorum, serial, local-serial, local-one. + "consistency": "quorum", + + // Serial consistency level for all queries. + // Supported values: any, one, two, three, quorum, all, + // local-quorum, each-quorum, serial, local-serial, local-one. + "serial-consistency": "serial", + + // Connection reconnect wait time. + "reconnect-wait-time": 100, + + // Connection connect timeout. + "connect-timeout": 100, + + // Connection request timeout. + "request-timeout": 100, + + // Connection tcp keepalive. + "tcp-keepalive": 100, + + // Connection tcp nodelay. + "tcp-nodelay": true } ], @@ -485,6 +548,15 @@ // Shared network level renew timer. "renew-timer": 31, + // Shared network level compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + // Enumeration specifying server's mode of operation when it // fetches host reservations. "reservation-mode": "all", @@ -611,6 +683,15 @@ // fetches host reservations. "reservation-mode": "all", + // Subnet-level compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + // List of static IPv4 reservations assigned to the clients belonging // to this subnet. For detailed example see reservations.json. "reservations": [ @@ -645,13 +726,25 @@ // Subnet prefix. "subnet": "192.0.0.0/8", - // Subnet level valid lifetime. - "valid-lifetime": 6000 + // Subnet level (default) valid lifetime. + "valid-lifetime": 6000, + + // Subnet level min valid lifetime. + "min-valid-lifetime": 4000, + + // Subnet level max valid lifetime. + "max-valid-lifetime": 8000 } ], - // Shared network level valid lifetime. - "valid-lifetime": 6001 + // Shared network level (default) valid lifetime. + "valid-lifetime": 6001, + + // Subnet level min valid lifetime. + "min-valid-lifetime": 4001, + + // Subnet level max valid lifetime. + "max-valid-lifetime": 8001 } ], @@ -661,9 +754,18 @@ // List of IPv4 subnets which don't belong to any shared network. "subnet4": [], - // Global valid lifetime value. + // Global valid (default) lifetime value. "valid-lifetime": 6000, + // Global min valid lifetime value. + "min-valid-lifetime": 4000, + + // Global max valid lifetime value. + "max-valid-lifetime": 8000, + + // Reservations (examples are in other files). + "reservations": [], + // Configuration control (currently not used, i.e. this syntax // is already defined but corresponding feature is not implemented). "config-control": @@ -677,7 +779,10 @@ // Type of the database, e.g. "mysql", "postgresql", "cql". "type": "mysql" } - ] + ], + // Intervals between attempts to fetch configuration updates + // via the configuration backends used. + "config-fetch-wait-time": 30 }, // Server tag. @@ -692,7 +797,28 @@ // Queue type was mandatory. "queue-type": "kea-ring4" }, - // Missing: calculate-tee-times, t1-percent, t2-percent + + // Fetches host reservations. + "reservation-mode": "all", + + // Global compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + + // String of zero or more characters with which to replace each + // invalid character in the hostname or Client FQDN. The default + // value is an empty string which will cause invalid characters + // to be omitted rather than replaced. + "hostname-char-replacement": "x", + + // Regular expression describing the invalid character set in + // the hostname or Client FQDN. + "hostname-char-set": "[^A-Za-z0-9.-]", // List of loggers used by the servers using this configuration file. "loggers": [ diff --git a/doc/examples/kea6/all-keys-stable.json b/doc/examples/kea6/all-keys-stable.json index 4c8f2a7ace..9e38763ab1 100644 --- a/doc/examples/kea6/all-keys-stable.json +++ b/doc/examples/kea6/all-keys-stable.json @@ -6,8 +6,8 @@ // list of parameters supported by Kea DHCPv6 server along with the brief // description of each parameter. // -// This stable version is used for YANG as we do not want to update code -// and models each time a keyword is added to the syntax. +// This current version should be up to date, i.e. new keywords should be +// added in this file at the same time than in the syntax. { // Kea DHCPv6 server configuration begins here. "Dhcp6": { @@ -218,6 +218,69 @@ // User name to be used to access the database. "user": "kea" + }, + { + // Name of the database to connect to. + "name": "kea", + + // Host on which the database resides. + "host": "localhost", + + // Database password. + "password": "kea", + + // Port on which the database is available. + "port": 5432, + + // Type of the database, e.g. "mysql", "postgresql", "cql". + "type": "postgresql", + + // User name to be used to access the database. + "user": "kea" + }, + { + // Name of the database to connect to. + "keyspace": "kea", + + // Host on which the database resides. + "contact-points": "127.0.0.1", + + // Database password. + "password": "kea", + + // Port on which the database is available. + "port": 9042, + + // Type of the database, e.g. "mysql", "postgresql", "cql". + "type": "cql", + + // User name to be used to access the database. + "user": "kea", + + // Consistency level for all queries. + // Supported values: any, one, two, three, quorum, all, + // local-quorum, each-quorum, serial, local-serial, local-one. + "consistency": "quorum", + + // Serial consistency level for all queries. + // Supported values: any, one, two, three, quorum, all, + // local-quorum, each-quorum, serial, local-serial, local-one. + "serial-consistency": "serial", + + // Connection reconnect wait time. + "reconnect-wait-time": 100, + + // Connection connect timeout. + "connect-timeout": 100, + + // Connection request timeout. + "request-timeout": 100, + + // Connection tcp keepalive. + "tcp-keepalive": 100, + + // Connection tcp nodelay. + "tcp-nodelay": true } ], @@ -349,9 +412,15 @@ } ], - // Global value of the preferred lifetime. + // Global (default) value of the preferred lifetime. "preferred-lifetime": 50, + // Global min value of the preferred lifetime. + "min-preferred-lifetime": 40, + + // Global max value of the preferred lifetime. + "max-preferred-lifetime": 60, + // Global value for the rebind timer, i.e. the time after which the // DHCP client enters rebind state if it fails to renew the lease. "rebind-timer": 40, @@ -418,9 +487,15 @@ // List of shared network specific DHCP options. "option-data": [], - // Shared network specific preferred lifetime. + // Shared network specific (default) preferred lifetime. "preferred-lifetime": 2000, + // Shared network specific min preferred lifetime. + "min-preferred-lifetime": 1500, + + // Shared network specific ma xpreferred lifetime. + "max-preferred-lifetime": 2500, + // Boolen flag indicating if the server can respond to // a Solicit message including a Rapid Commit option with // the Reply message (See DHCPv6 rapid commit). @@ -438,6 +513,15 @@ // Shared network level renew timer. "renew-timer": 31, + // Shared network level compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + // Enumeration specifying server's mode of operation when it // fetches host reservations. "reservation-mode": "all", @@ -497,13 +581,30 @@ // clients. "pd-pools": [ { + // Restricts this prefix pool to be used only for the client + // requests belonging to a particular client class. "client-class": "phones_server1", + + // Length of prefixes delegated to clients. "delegated-len": 64, + + // Excluded prefix (address) from client assignments. "excluded-prefix": "2001:db8::", + + // Excluded prefix (length) from client assignments. "excluded-prefix-len": 48, + + // Prefix pool level list of DHCP options. "option-data": [], + + // Prefix range (address) used for client assignments. "prefix": "2001:db8::", + + // Prefix range (length) used for client assignments. "prefix-len": 40, + + // List of client classes which must be evaluated + // when this prefix pool is selected for client assignments. "require-client-classes": [] } ], @@ -541,9 +642,15 @@ } ], - // Subnet specific preferred lifetime. + // Subnet specific (default) preferred lifetime. "preferred-lifetime": 2000, + // Subnet specific min preferred lifetime. + "min-preferred-lifetime": 1500, + + // Subnet specific max referred lifetime. + "max-preferred-lifetime": 2500, + // Boolen flag indicating if the server can respond to // a Solicit message including a Rapid Commit option with // the Reply message (See DHCPv6 rapid commit). @@ -567,6 +674,15 @@ // fetches host reservations. "reservation-mode": "all", + // Subnet level compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + // List of static IPv6 reservations assigned to the clients belonging // to this subnet. For detailed example see reservations.json. "reservations": [ @@ -604,22 +720,43 @@ // Subnet prefix. "subnet": "2001:db8::/32", - // Subnet level valid lifetime. - "valid-lifetime": 6000 + // Subnet level (default) valid lifetime. + "valid-lifetime": 6000, + + // Subnet level min valid lifetime. + "min-valid-lifetime": 4000, + + // Subnet level max valid lifetime. + "max-valid-lifetime": 8000 } ], - // Shared network level valid lifetime. - "valid-lifetime": 6001 + // Shared network level (default) valid lifetime. + "valid-lifetime": 6001, + + // Shared network level min valid lifetime. + "min-valid-lifetime": 4001, + + // Shared network level max valid lifetime. + "max-valid-lifetime": 8001 } ], // List of IPv6 subnets which don't belong to any shared network. "subnet6": [], - // Global valid lifetime value. + // Global (default) valid lifetime value. "valid-lifetime": 6000, + // Global min valid lifetime value. + "min-valid-lifetime": 4000, + + // Global max valid lifetime value. + "max-valid-lifetime": 8000, + + // Reservations (examples are in other files). + "reservations": [], + // Configuration control (currently not used, i.e. this syntax // is already defined but corresponding feature is not implemented). "config-control": @@ -633,7 +770,10 @@ // Type of the database, e.g. "mysql", "postgresql", "cql". "type": "mysql" } - ] + ], + // Intervals between attempts to fetch configuration updates + // via the configuration backends used. + "config-fetch-wait-time": 30 }, // Server tag. @@ -649,6 +789,31 @@ "queue-type": "kea-ring6" }, + // Fetches host reservations. + "reservation-mode": "all", + + // Data directory. + "data-directory": "/tmp", + + // Global compute T1 and T2 timers. + "calculate-tee-times": true, + + // T1 = valid lifetime * .5. + "t1-percent": .5, + + // T2 = valid lifetime * .75. + "t2-percent": .75, + + // String of zero or more characters with which to replace each + // invalid character in the hostname or Client FQDN. The default + // value is an empty string which will cause invalid characters + // to be omitted rather than replaced. + "hostname-char-replacement": "x", + + // Regular expression describing the invalid character set in + // the hostname or Client FQDN. + "hostname-char-set": "[^A-Za-z0-9.-]", + // List of loggers used by the servers using this configuration file. "loggers": [ { diff --git a/src/lib/yang/tests/translator_unittests.cc b/src/lib/yang/tests/translator_unittests.cc index 14ee74cdc4..f47368ca17 100644 --- a/src/lib/yang/tests/translator_unittests.cc +++ b/src/lib/yang/tests/translator_unittests.cc @@ -162,10 +162,13 @@ TEST(TranslatorBasicTest, valueFrom) { EXPECT_EQ("foobar", elem->stringValue()); elem.reset(); - // Unknown / unsupported. + // Decimal 64. double d64(.1234); s_val.reset(new Val(d64)); - EXPECT_THROW(TranslatorBasic::value(s_val), NotImplemented); + EXPECT_NO_THROW(elem = TranslatorBasic::value(s_val)); + ASSERT_TRUE(elem); + ASSERT_EQ(Element::real, elem->getType()); + EXPECT_DOUBLE_EQ(d64, elem->doubleValue()); } // Test basic yang value to JSON using sysrepo test models. @@ -373,7 +376,10 @@ TEST(TranslatorBasicTest, getItem) { xpath = "/keatest-module:main/dec64"; s_val.reset(new Val(9.85)); EXPECT_NO_THROW(sess->set_item(xpath.c_str(), s_val)); - EXPECT_THROW(elem = t_obj->getItem(xpath), NotImplemented); + EXPECT_NO_THROW(elem = t_obj->getItem(xpath)); + ASSERT_TRUE(elem); + ASSERT_EQ(Element::real, elem->getType()); + EXPECT_EQ("9.85", elem->str()); elem.reset(); // Not found. @@ -501,9 +507,13 @@ TEST(TranslatorBasicTest, valueTo) { EXPECT_EQ("Zm9vYmFy", string(s_val->data()->get_binary())); s_val.reset(); - // Unknown / unsupported. - elem = Element::create(.1234); - EXPECT_THROW(TranslatorBasic::value(elem, SR_DECIMAL64_T), NotImplemented); + // Decimal 64. + double d64(.1234); + elem = Element::create(d64); + EXPECT_NO_THROW(s_val = TranslatorBasic::value(elem, SR_DECIMAL64_T)); + ASSERT_TRUE(s_val); + EXPECT_DOUBLE_EQ(d64, s_val->data()->get_decimal64()); + s_val.reset(); } // Test JSON to basic yang value using sysrepo test models. @@ -641,6 +651,17 @@ TEST(TranslatorBasicTest, setItem) { EXPECT_EQ("Zm9vYmFy", string(s_val->data()->get_binary())); s_val.reset(); + // Decimal 64. + xpath = "/keatest-module:main/dec64"; + double d64(9.85); + elem = Element::create(d64); + EXPECT_NO_THROW(t_obj->setItem(xpath, elem, SR_DECIMAL64_T)); + EXPECT_NO_THROW(s_val = sess->get_item(xpath.c_str())); + ASSERT_TRUE(s_val); + ASSERT_EQ(SR_DECIMAL64_T, s_val->type()); + EXPECT_DOUBLE_EQ(d64, s_val->data()->get_decimal64()); + s_val.reset(); + // Leaf-list. xpath = "/keatest-module:main/numbers"; S_Vals s_vals; @@ -666,11 +687,6 @@ TEST(TranslatorBasicTest, setItem) { EXPECT_FALSE(s_vals); s_vals.reset(); - // Unknown / unsupported. - xpath = "/keatest-module:main/dec64"; - elem = Element::create(9.85); - EXPECT_THROW(t_obj->setItem(xpath, elem, SR_DECIMAL64_T), NotImplemented); - // Bad xpath. xpath = "/keatest-module:main/no_such_string"; elem = Element::create(string("str")); diff --git a/src/lib/yang/translator.cc b/src/lib/yang/translator.cc index aa5cc0ec5b..3cac6fa6b0 100644 --- a/src/lib/yang/translator.cc +++ b/src/lib/yang/translator.cc @@ -48,11 +48,10 @@ TranslatorBasic::~TranslatorBasic() { } ElementPtr - #ifndef HAVE_PRE_0_7_6_SYSREPO - TranslatorBasic::value(sysrepo::S_Val s_val) { +TranslatorBasic::value(sysrepo::S_Val s_val) { #else - TranslatorBasic::value(S_Val s_val) { +TranslatorBasic::value(S_Val s_val) { #endif if (!s_val) { isc_throw(BadValue, "value called with null"); @@ -90,6 +89,9 @@ ElementPtr case SR_INT32_T: return (Element::create(static_cast(s_val->data()->get_int32()))); + case SR_DECIMAL64_T: + return (Element::create(s_val->data()->get_decimal64())); + case SR_IDENTITYREF_T: return (Element::create(string(s_val->data()->get_identityref()))); @@ -258,6 +260,13 @@ TranslatorBasic::value(ConstElementPtr elem, sr_type_t type) { #endif break; + case SR_DECIMAL64_T: + if (elem->getType() != Element::real) { + isc_throw(BadValue, "value for a real called with not a real"); + } + s_val.reset(new Val(elem->doubleValue())); + break; + case SR_BINARY_T: if (elem->getType() != Element::string) { isc_throw(BadValue, diff --git a/src/lib/yang/translator_config.cc b/src/lib/yang/translator_config.cc index 7f0c21c415..898d662e81 100644 --- a/src/lib/yang/translator_config.cc +++ b/src/lib/yang/translator_config.cc @@ -191,6 +191,7 @@ TranslatorConfig::getDdnsKea(const std::string& xpath) { ElementPtr TranslatorConfig::getConfigControlKea(const string& xpath) { ElementPtr config_ctrl = Element::createMap(); + getParam(config_ctrl, xpath, "config-fetch-wait-time"); ConstElementPtr databases = getDatabases(xpath + "/config-database"); if (databases && !databases->empty()) { config_ctrl->set("config-databases", databases); @@ -209,9 +210,16 @@ TranslatorConfig::getServerKeaDhcpCommon(const string& xpath) { ElementPtr result = Element::createMap(); getParam(result, xpath, "valid-lifetime"); + getParam(result, xpath, "min-valid-lifetime"); + getParam(result, xpath, "max-valid-lifetime"); getParam(result, xpath, "renew-timer"); getParam(result, xpath, "rebind-timer"); + getParam(result, xpath, "calculate-tee-times"); + getParam(result, xpath, "t1-percent"); + getParam(result, xpath, "t2-percent"); getParam(result, xpath, "decline-probation-period"); + getParam(result, xpath, "hostname-char-set"); + getParam(result, xpath, "hostname-char-replacement"); ConstElementPtr networks = getSharedNetworks(xpath); if (networks && !networks->empty()) { @@ -335,7 +343,10 @@ TranslatorConfig::getServerKeaDhcp6() { string xpath = "/kea-dhcp6-server:config"; ElementPtr result = getServerKeaDhcpCommon(xpath); // Handle DHCPv6 specific global parameters. + getParam(result, xpath, "data-directory"); getParam(result, xpath, "preferred-lifetime"); + getParam(result, xpath, "min-preferred-lifetime"); + getParam(result, xpath, "max-preferred-lifetime"); // Handle subnets. ConstElementPtr subnets = getSubnets(xpath); if (subnets && !subnets->empty()) { @@ -468,6 +479,14 @@ TranslatorConfig::setServerKeaDhcpCommon(const string& xpath, if (valid) { setItem(xpath + "/valid-lifetime", valid, SR_UINT32_T); } + ConstElementPtr min_valid = elem->get("min-valid-lifetime"); + if (min_valid) { + setItem(xpath + "/min-valid-lifetime", min_valid, SR_UINT32_T); + } + ConstElementPtr max_valid = elem->get("max-valid-lifetime"); + if (max_valid) { + setItem(xpath + "/max-valid-lifetime", max_valid, SR_UINT32_T); + } ConstElementPtr renew = elem->get("renew-timer"); if (renew) { setItem(xpath + "/renew-timer", renew, SR_UINT32_T); @@ -476,6 +495,18 @@ TranslatorConfig::setServerKeaDhcpCommon(const string& xpath, if (rebind) { setItem(xpath + "/rebind-timer", rebind, SR_UINT32_T); } + ConstElementPtr calculate = elem->get("calculate-tee-times"); + if (calculate) { + setItem(xpath + "/calculate-tee-times", calculate, SR_BOOL_T); + } + ConstElementPtr t1_percent = elem->get("t1-percent"); + if (t1_percent) { + setItem(xpath + "/t1-percent", t1_percent, SR_DECIMAL64_T); + } + ConstElementPtr t2_percent = elem->get("t2-percent"); + if (t2_percent) { + setItem(xpath + "/t2-percent", t2_percent, SR_DECIMAL64_T); + } ConstElementPtr period = elem->get("decline-probation-period"); if (period) { setItem(xpath + "/decline-probation-period", period, SR_UINT32_T); @@ -581,6 +612,14 @@ TranslatorConfig::setServerKeaDhcpCommon(const string& xpath, if (socket) { setControlSocket(xpath + "/control-socket", socket); } + ConstElementPtr char_set = elem->get("hostname-char-set"); + if (char_set) { + setItem(xpath + "/hostname-char-set", char_set, SR_STRING_T); + } + ConstElementPtr char_repl = elem->get("hostname-char-replacement"); + if (char_repl) { + setItem(xpath + "/hostname-char-replacement", char_repl, SR_STRING_T); + } ConstElementPtr ddns = elem->get("dhcp-ddns"); if (ddns) { ConstElementPtr enable = ddns->get("enable-updates"); @@ -679,6 +718,11 @@ TranslatorConfig::setServerKeaDhcpCommon(const string& xpath, } ConstElementPtr config_ctrl = elem->get("config-control"); if (config_ctrl && !config_ctrl->empty()) { + ConstElementPtr cfwt = config_ctrl->get("config-fetch-wait-time"); + if (cfwt) { + setItem(xpath + "/config-control/config-fetch-wait-time", cfwt, + SR_UINT32_T); + } databases = config_ctrl->get("config-databases"); if (databases && !databases->empty()) { setDatabases(xpath + "/config-control/config-database", databases); @@ -767,10 +811,22 @@ void TranslatorConfig::setServerKeaDhcp6(ConstElementPtr elem) { string xpath = "/kea-dhcp6-server:config"; setServerKeaDhcpCommon(xpath, elem); + ConstElementPtr data_dir = elem->get("data-directory"); + if (data_dir) { + setItem(xpath + "/data-directory", data_dir, SR_STRING_T); + } ConstElementPtr preferred = elem->get("preferred-lifetime"); if (preferred) { setItem(xpath + "/preferred-lifetime", preferred, SR_UINT32_T); } + ConstElementPtr min_pref = elem->get("min-preferred-lifetime"); + if (min_pref) { + setItem(xpath + "/min-preferred-lifetime", min_pref, SR_UINT32_T); + } + ConstElementPtr max_pref = elem->get("max-preferred-lifetime"); + if (max_pref) { + setItem(xpath + "/max-preferred-lifetime", max_pref, SR_UINT32_T); + } ConstElementPtr subnets = elem->get("subnet6"); if (subnets) { setSubnets(xpath, subnets); diff --git a/src/lib/yang/translator_config.h b/src/lib/yang/translator_config.h index 361e51563b..bb3290649f 100644 --- a/src/lib/yang/translator_config.h +++ b/src/lib/yang/translator_config.h @@ -27,8 +27,13 @@ namespace yang { /// @code /// "Dhcp4": { /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "decline-probation-period": , /// "subnet4": [ ], /// , @@ -45,6 +50,8 @@ namespace yang { /// , /// , /// , +/// , +/// , /// , /// "echo-client-id": , /// "match-client-id": , @@ -67,8 +74,13 @@ namespace yang { /// YANG syntax for kea-dhcp4-server:config is: /// @code /// +--rw valid-lifetime? uint32 +/// +--rw min-valid-lifetime? uint32 +/// +--rw max-valid-lifetime? uint32 /// +--rw renew-timer? uint32 /// +--rw rebind-timer? uint32 +/// +--rw calculate-tee-times? boolean +/// +--rw t1-percent? decimal64 +/// +--rw t2-percent? decimal64 /// +--rw decline-probation-period? uint32 /// +--rw subnet4* /// +--rw shared-network* @@ -90,6 +102,8 @@ namespace yang { /// +--rw expired-leases-processing /// +--rw dhcp4o6-port? uint16 /// +--rw control-socket! +/// +--rw hostname-char-set? string +/// +--rw hostname-char-replacement? string /// +--rw dhcp-ddns /// +--rw echo-client-id? boolean /// +--rw match-client-id? boolean @@ -103,6 +117,7 @@ namespace yang { /// +--rw reservation-mode? enumeration /// +--rw host* /// +--rw config-control +/// +--rw config-fetch-wait-time? uint32 /// +--rw config-database* /// +--rw server-tag string /// +--rw dhcp-queue-control string @@ -164,10 +179,18 @@ namespace yang { /// JSON syntax for kea-dhcp6 is: /// @code /// "Dhcp6": { +/// "data-directory": , /// "preferred-lifetime": , +/// "min-preferred-lifetime": , +/// "max-preferred-lifetime": , /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "decline-probation-period": , /// "subnet6": [ ], /// , @@ -187,6 +210,8 @@ namespace yang { /// , /// , /// , +/// , +/// , /// , /// , /// @@ -202,10 +227,18 @@ namespace yang { /// /// YANG syntax for kea-dhcp6-server:config is: /// @code +/// +--rw data-directory? string /// +--rw preferred-lifetime? uint32 +/// +--rw min-preferred-lifetime? uint32 +/// +--rw max-preferred-lifetime? uint32 /// +--rw valid-lifetime? uint32 +/// +--rw min-valid-lifetime? uint32 +/// +--rw max-valid-lifetime? uint32 /// +--rw renew-timer? uint32 /// +--rw rebind-timer? uint32 +/// +--rw calculate-tee-times? boolean +/// +--rw t1-percent? decimal64 +/// +--rw t2-percent? decimal64 /// +--rw decline-probation-period? uint32 /// +--rw subnet6* /// +--rw shared-network* @@ -228,6 +261,8 @@ namespace yang { /// +--rw server-id /// +--rw dhcp4o6-port? uint16 /// +--rw control-socket! +/// +--rw hostname-char-set? string +/// +--rw hostname-char-replacement? string /// +--rw dhcp-ddns /// +--rw echo-client-id? boolean /// +--rw user-context? string @@ -236,6 +271,7 @@ namespace yang { /// +--rw reservation-mode? enumeration /// +--rw host* /// +--rw config-control +/// +--rw config-fetch-wait-time? uint32 /// +--rw config-database* /// +--rw server-tag string /// +--rw dhcp-queue-control string diff --git a/src/lib/yang/translator_control_socket.h b/src/lib/yang/translator_control_socket.h index 0ee964af65..236d17bdd6 100644 --- a/src/lib/yang/translator_control_socket.h +++ b/src/lib/yang/translator_control_socket.h @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -65,7 +65,7 @@ namespace yang { /// Supports the following models: /// - kea-dhcp4-server /// - kea-dhcp6-server -/// - kea-dhcp-ddns (not yet supported by the server itself) +/// - kea-dhcp-ddns /// - kea-ctrl-agent class TranslatorControlSocket : virtual public TranslatorBasic { public: diff --git a/src/lib/yang/translator_database.cc b/src/lib/yang/translator_database.cc index deed8c8f68..b12bec4280 100644 --- a/src/lib/yang/translator_database.cc +++ b/src/lib/yang/translator_database.cc @@ -115,6 +115,14 @@ TranslatorDatabase::getDatabaseKea(const string& xpath) { if (nodelay) { result->set("tcp-nodelay", nodelay); } + ConstElementPtr consistency = getItem(xpath + "/consistency"); + if (consistency) { + result->set("consistency", consistency); + } + ConstElementPtr serial_consistency = getItem(xpath + "/serial-consistency"); + if (serial_consistency) { + result->set("serial-consistency", serial_consistency); + } ConstElementPtr context = getItem(xpath + "/user-context"); if (context) { result->set("user-context", Element::fromJSON(context->stringValue())); @@ -221,6 +229,14 @@ TranslatorDatabase::setDatabaseKea(const string& xpath, if (nodelay) { setItem(xpath + "/tcp-nodelay", nodelay, SR_BOOL_T); } + ConstElementPtr consistency = elem->get("consistency"); + if (consistency) { + setItem(xpath + "/consistency", consistency, SR_STRING_T); + } + ConstElementPtr serial_consistency = elem->get("serial-consistency"); + if (serial_consistency) { + setItem(xpath + "/serial-consistency", serial_consistency, SR_STRING_T); + } ConstElementPtr context = Adaptor::getContext(elem); if (context) { setItem(xpath + "/user-context", Element::create(context->str()), diff --git a/src/lib/yang/translator_database.h b/src/lib/yang/translator_database.h index a33da13dbc..aa6442c390 100644 --- a/src/lib/yang/translator_database.h +++ b/src/lib/yang/translator_database.h @@ -35,6 +35,8 @@ namespace yang { /// "request-timeout": , /// "tcp-keepalive": , /// "tcp-nodelay": , +/// "consistency": , +/// "serial-consistency": , /// "user-context": { }, /// "comment": /// } @@ -61,6 +63,8 @@ namespace yang { /// +--rw request-timeout? uint32 /// +--rw tcp-keepalive? uint32 /// +--rw tcp-nodelay? boolean +/// +--rw consistency? string +/// +--rw serial-consistency? string /// +--rw user-context? string /// @endcode /// diff --git a/src/lib/yang/translator_logger.h b/src/lib/yang/translator_logger.h index 69984c3319..fe9fc71c23 100644 --- a/src/lib/yang/translator_logger.h +++ b/src/lib/yang/translator_logger.h @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -37,8 +37,7 @@ namespace yang { /// } /// @endcode /// -/// YANG syntax for kea-logging is with name as the logger list key and -/// output as the output option list key. +/// YANG syntax for loggers is: /// @code /// +--rw logger (list) /// | @@ -150,14 +149,14 @@ protected: void setOutputOptions(const std::string& xpath, isc::data::ConstElementPtr elem); - /// @brief getLogger JSON for kea-logging. + /// @brief getLogger JSON for loggers. /// /// @param xpath The xpath of the logger. /// @return JSON representation of the logger. /// @throw SysrepoError when sysrepo raises an error. isc::data::ElementPtr getLoggerKea(const std::string& xpath); - /// @brief setLogger for kea-logging. + /// @brief setLogger for loggers. /// /// @param xpath The xpath of the logger. /// @param elem The JSON element. @@ -200,14 +199,14 @@ public: isc::data::ConstElementPtr elem); protected: - /// @brief getLoggers JSON for kea-logging. + /// @brief getLoggers JSON for loggers. /// /// @param xpath The xpath of loggers. /// @return JSON representation of loggers. /// @throw SysrepoError when sysrepo raises an error. isc::data::ElementPtr getLoggersKea(const std::string& xpath); - /// @brief setLoggers for kea-logging. + /// @brief setLoggers for loggers. /// /// @param xpath The xpath of loggers. /// @param elem The JSON element. diff --git a/src/lib/yang/translator_pool.h b/src/lib/yang/translator_pool.h index fe4a89d032..0f2fa7530e 100644 --- a/src/lib/yang/translator_pool.h +++ b/src/lib/yang/translator_pool.h @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 diff --git a/src/lib/yang/translator_shared_network.cc b/src/lib/yang/translator_shared_network.cc index 73644f581d..9ba195f761 100644 --- a/src/lib/yang/translator_shared_network.cc +++ b/src/lib/yang/translator_shared_network.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -74,11 +74,27 @@ TranslatorSharedNetwork::getSharedNetworkKea(const string& xpath, if (preferred) { result->set("preferred-lifetime", preferred); } + ConstElementPtr min_pref = getItem(xpath + "/min-preferred-lifetime"); + if (min_pref) { + result->set("min-preferred-lifetime", min_pref); + } + ConstElementPtr max_pref = getItem(xpath + "/max-preferred-lifetime"); + if (max_pref) { + result->set("max-preferred-lifetime", max_pref); + } } ConstElementPtr valid = getItem(xpath + "/valid-lifetime"); if (valid) { result->set("valid-lifetime", valid); } + ConstElementPtr min_valid = getItem(xpath + "/min-valid-lifetime"); + if (min_valid) { + result->set("min-valid-lifetime", min_valid); + } + ConstElementPtr max_valid = getItem(xpath + "/max-valid-lifetime"); + if (max_valid) { + result->set("max-valid-lifetime", max_valid); + } ConstElementPtr renew = getItem(xpath + "/renew-timer"); if (renew) { result->set("renew-timer", renew); @@ -87,6 +103,18 @@ TranslatorSharedNetwork::getSharedNetworkKea(const string& xpath, if (rebind) { result->set("rebind-timer", rebind); } + ConstElementPtr calculate = getItem(xpath + "/calculate-tee-times"); + if (calculate) { + result->set("calculate-tee-times", calculate); + } + ConstElementPtr t1_percent = getItem(xpath + "/t1-percent"); + if (t1_percent) { + result->set("t1-percent", t1_percent); + } + ConstElementPtr t2_percent = getItem(xpath + "/t2-percent"); + if (t2_percent) { + result->set("t2-percent", t2_percent); + } ConstElementPtr options = getOptionDataList(xpath); if (options && (options->size() > 0)) { result->set("option-data", options); @@ -186,11 +214,27 @@ TranslatorSharedNetwork::setSharedNetworkKea(const string& xpath, if (preferred) { setItem(xpath + "/preferred-lifetime", preferred, SR_UINT32_T); } + ConstElementPtr min_pref = elem->get("min-preferred-lifetime"); + if (min_pref) { + setItem(xpath + "/min-preferred-lifetime", min_pref, SR_UINT32_T); + } + ConstElementPtr max_pref = elem->get("max-preferred-lifetime"); + if (max_pref) { + setItem(xpath + "/max-preferred-lifetime", max_pref, SR_UINT32_T); + } } ConstElementPtr valid = elem->get("valid-lifetime"); if (valid) { setItem(xpath + "/valid-lifetime", valid, SR_UINT32_T); } + ConstElementPtr min_valid = elem->get("min-valid-lifetime"); + if (min_valid) { + setItem(xpath + "/min-valid-lifetime", min_valid, SR_UINT32_T); + } + ConstElementPtr max_valid = elem->get("max-valid-lifetime"); + if (max_valid) { + setItem(xpath + "/max-valid-lifetime", max_valid, SR_UINT32_T); + } ConstElementPtr renew = elem->get("renew-timer"); if (renew) { setItem(xpath + "/renew-timer", renew, SR_UINT32_T); @@ -199,6 +243,18 @@ TranslatorSharedNetwork::setSharedNetworkKea(const string& xpath, if (rebind) { setItem(xpath + "/rebind-timer", rebind, SR_UINT32_T); } + ConstElementPtr calculate = elem->get("calculate-tee-times"); + if (calculate) { + setItem(xpath + "/calculate-tee-times", calculate, SR_BOOL_T); + } + ConstElementPtr t1_percent = elem->get("t1-percent"); + if (t1_percent) { + setItem(xpath + "/t1-percent", t1_percent, SR_DECIMAL64_T); + } + ConstElementPtr t2_percent = elem->get("t2-percent"); + if (t2_percent) { + setItem(xpath + "/t2-percent", t2_percent, SR_DECIMAL64_T); + } ConstElementPtr options = elem->get("option-data"); if (options && (options->size() > 0)) { setOptionDataList(xpath, options); diff --git a/src/lib/yang/translator_shared_network.h b/src/lib/yang/translator_shared_network.h index 15ced6154e..316e9b8bb1 100644 --- a/src/lib/yang/translator_shared_network.h +++ b/src/lib/yang/translator_shared_network.h @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -22,8 +22,13 @@ namespace yang { /// "name": , /// "subnet4": , /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "option-data": [ ], /// "interface": "", /// "client-class": "", @@ -46,9 +51,16 @@ namespace yang { /// "name": , /// "subnet6": , /// "preferred-lifetime": , +/// "min-preferred-lifetime": , +/// "max-preferred-lifetime": , /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "option-data": [ ], /// "interface": "", /// "interface-id": "", @@ -66,8 +78,13 @@ namespace yang { /// @code /// +--rw name string /// +--rw valid-lifetime? uint32 +/// +--rw min-valid-lifetime? uint32 +/// +--rw max-valid-lifetime? uint32 /// +--rw renew-timer? uint32 /// +--rw rebind-timer? uint32 +/// +--rw calculate-tee-times? boolean +/// +--rw t1-percent? decimal64 +/// +--rw t2-percent? decimal64 /// +--rw option-data* /// +--rw interface? string /// +--rw client-class? string @@ -85,6 +102,8 @@ namespace yang { /// (DHCPv6 only) /// +--rw subnet6* /// +--rw preferred-lifetime? uint32 +/// +--rw min-preferred-lifetime? uint32 +/// +--rw max-preferred-lifetime? uint32 /// +--rw interface-id? string /// +--rw rapid-commit? boolean /// @endcode diff --git a/src/lib/yang/translator_subnet.cc b/src/lib/yang/translator_subnet.cc index 315a6010d9..1d8ac030b7 100644 --- a/src/lib/yang/translator_subnet.cc +++ b/src/lib/yang/translator_subnet.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -99,12 +99,29 @@ TranslatorSubnet::getSubnetKea(const string& xpath) { if (preferred) { result->set("preferred-lifetime", preferred); } + ConstElementPtr min_pref = getItem(xpath + "/min-preferred-lifetime"); + if (min_pref) { + result->set("min-preferred-lifetime", min_pref); + } + ConstElementPtr max_pref = getItem(xpath + "/max-preferred-lifetime"); + if (max_pref) { + result->set("max-preferred-lifetime", max_pref); + } } ConstElementPtr valid = getItem(xpath + "/valid-lifetime"); if (valid) { result->set("valid-lifetime", valid); } + ConstElementPtr min_valid = getItem(xpath + "/min-valid-lifetime"); + if (min_valid) { + result->set("min-valid-lifetime", min_valid); + } + ConstElementPtr max_valid = getItem(xpath + "/max-valid-lifetime"); + if (max_valid) { + result->set("max-valid-lifetime", max_valid); + } ConstElementPtr renew = getItem(xpath + "/renew-timer"); + if (renew) { result->set("renew-timer", renew); } @@ -112,6 +129,18 @@ TranslatorSubnet::getSubnetKea(const string& xpath) { if (rebind) { result->set("rebind-timer", rebind); } + ConstElementPtr calculate = getItem(xpath + "/calculate-tee-times"); + if (calculate) { + result->set("calculate-tee-times", calculate); + } + ConstElementPtr t1_percent = getItem(xpath + "/t1-percent"); + if (t1_percent) { + result->set("t1-percent", t1_percent); + } + ConstElementPtr t2_percent = getItem(xpath + "/t2-percent"); + if (t2_percent) { + result->set("t2-percent", t2_percent); + } ConstElementPtr options = getOptionDataList(xpath); if (options && (options->size() > 0)) { result->set("option-data", options); @@ -270,11 +299,27 @@ TranslatorSubnet::setSubnetKea(const string& xpath, ConstElementPtr elem) { if (preferred) { setItem(xpath + "/preferred-lifetime", preferred, SR_UINT32_T); } + ConstElementPtr min_pref = elem->get("min-preferred-lifetime"); + if (min_pref) { + setItem(xpath + "/min-preferred-lifetime", min_pref, SR_UINT32_T); + } + ConstElementPtr max_pref = elem->get("max-preferred-lifetime"); + if (max_pref) { + setItem(xpath + "/max-preferred-lifetime", max_pref, SR_UINT32_T); + } } ConstElementPtr valid = elem->get("valid-lifetime"); if (valid) { setItem(xpath + "/valid-lifetime", valid, SR_UINT32_T); } + ConstElementPtr min_valid = elem->get("min-valid-lifetime"); + if (min_valid) { + setItem(xpath + "/min-valid-lifetime", min_valid, SR_UINT32_T); + } + ConstElementPtr max_valid = elem->get("max-valid-lifetime"); + if (max_valid) { + setItem(xpath + "/max-valid-lifetime", max_valid, SR_UINT32_T); + } ConstElementPtr renew = elem->get("renew-timer"); if (renew) { setItem(xpath + "/renew-timer", renew, SR_UINT32_T); @@ -283,6 +328,18 @@ TranslatorSubnet::setSubnetKea(const string& xpath, ConstElementPtr elem) { if (rebind) { setItem(xpath + "/rebind-timer", rebind, SR_UINT32_T); } + ConstElementPtr calculate = elem->get("calculate-tee-times"); + if (calculate) { + setItem(xpath + "/calculate-tee-times", calculate, SR_BOOL_T); + } + ConstElementPtr t1_percent = elem->get("t1-percent"); + if (t1_percent) { + setItem(xpath + "/t1-percent", t1_percent, SR_DECIMAL64_T); + } + ConstElementPtr t2_percent = elem->get("t2-percent"); + if (t2_percent) { + setItem(xpath + "/t2-percent", t2_percent, SR_DECIMAL64_T); + } ConstElementPtr options = elem->get("option-data"); if (options && (options->size() > 0)) { setOptionDataList(xpath, options); diff --git a/src/lib/yang/translator_subnet.h b/src/lib/yang/translator_subnet.h index 7023bec5e5..e6a2d98727 100644 --- a/src/lib/yang/translator_subnet.h +++ b/src/lib/yang/translator_subnet.h @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -22,8 +22,13 @@ namespace yang { /// @code /// { /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "option-data": [ ], /// "pools": [ ], /// "subnet": "", @@ -51,9 +56,16 @@ namespace yang { /// @code /// { /// "preferred-lifetime": , +/// "min-preferred-lifetime": , +/// "max-preferred-lifetime": , /// "valid-lifetime": , +/// "min-valid-lifetime": , +/// "max-valid-lifetime": , /// "renew-timer": , /// "rebind-timer": , +/// "calculate-tee-times": , +/// "t1-percent": , +/// "t2-percent": , /// "option-data": [ ], /// "pools": [ ], /// "pd-pools": [ ], @@ -87,8 +99,13 @@ namespace yang { /// YANG syntax for kea-dhcp[46]-server is with id as the key: /// @code /// +--rw valid-lifetime? uint32 +/// +--rw min-valid-lifetime? uint32 +/// +--rw max-valid-lifetime? uint32 /// +--rw renew-timer? uint32 /// +--rw rebind-timer? uint32 +/// +--rw calculate-tee-times? boolean +/// +--rw t1-percent? decimal64 +/// +--rw t2-percent? decimal64 /// +--rw option-data* /// +--rw pool* /// +--rw subnet inet:ip-prefix @@ -111,6 +128,8 @@ namespace yang { /// +--rw authoritative? boolean /// (DHCPv6 only) /// +--rw preferred-lifetime? uint32 +/// +--rw min-preferred-lifetime? uint32 +/// +--rw max-preferred-lifetime? uint32 /// +--rw pd-pool* /// +--rw interface-id? string /// +--rw rapid-commit? boolean diff --git a/src/lib/yang/yang.dox b/src/lib/yang/yang.dox index cf61927000..d2ee88e970 100644 --- a/src/lib/yang/yang.dox +++ b/src/lib/yang/yang.dox @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 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 @@ -150,7 +150,6 @@ Those models depend on the following modules: - ietf-yang-types - ietf-interfaces - kea-types - - kea-logging - kea-dhcp-types Those modules are extracted from the IETF DHCPv6 YANG draft too: diff --git a/src/lib/yang/yang_revisions.h b/src/lib/yang/yang_revisions.h index d3b7b12065..2aa6b5d3cf 100644 --- a/src/lib/yang/yang_revisions.h +++ b/src/lib/yang/yang_revisions.h @@ -21,13 +21,12 @@ static const std::map YANG_REVISIONS = { { "ietf-dhcpv6-types", "2018-09-04" }, { "ietf-dhcpv6-options", "2018-09-04" }, { "ietf-dhcpv6-server", "2018-09-04" }, - { "kea-types", "2018-11-20" }, - { "kea-logging", "2018-11-20" }, - { "kea-dhcp-types", "2018-11-20" }, - { "kea-dhcp4-server", "2018-11-20" }, - { "kea-dhcp6-server", "2018-11-20" }, - { "kea-ctrl-agent", "2018-11-20" }, - { "kea-dhcp-ddns", "2018-11-20" } + { "kea-types", "2019-08-09" }, + { "kea-dhcp-types", "2019-08-09" }, + { "kea-dhcp4-server", "2019-08-09" }, + { "kea-dhcp6-server", "2019-08-09" }, + { "kea-ctrl-agent", "2019-08-09" }, + { "kea-dhcp-ddns", "2019-08-09" } }; }; // end of namespace isc::yang diff --git a/src/share/yang/modules/Makefile.am b/src/share/yang/modules/Makefile.am index 484389e0f3..5ae20063ef 100644 --- a/src/share/yang/modules/Makefile.am +++ b/src/share/yang/modules/Makefile.am @@ -3,19 +3,19 @@ SUBDIRS = . yangmodulesdir = ${datarootdir}/${PACKAGE_NAME}/yang/modules yangmodules_list = ietf-dhcpv6-client@2018-09-04.yang -yangmodules_list += ietf-interfaces@2014-05-08.yang +yangmodules_list += ietf-interfaces@2018-02-20.yang yangmodules_list += ietf-dhcpv6-options@2018-09-04.yang yangmodules_list += ietf-dhcpv6-relay@2018-09-04.yang yangmodules_list += ietf-dhcpv6-server@2018-09-04.yang yangmodules_list += ietf-dhcpv6-types@2018-09-04.yang yangmodules_list += ietf-inet-types@2013-07-15.yang yangmodules_list += ietf-yang-types@2013-07-15.yang -yangmodules_list += kea-ctrl-agent@2018-11-20.yang -yangmodules_list += kea-dhcp-ddns@2018-11-20.yang -yangmodules_list += kea-dhcp-types@2018-11-20.yang -yangmodules_list += kea-dhcp4-server@2018-11-20.yang -yangmodules_list += kea-dhcp6-server@2018-11-20.yang -yangmodules_list += kea-types@2018-11-20.yang +yangmodules_list += kea-ctrl-agent@2019-08-09.yang +yangmodules_list += kea-dhcp-ddns@2019-08-09.yang +yangmodules_list += kea-dhcp-types@2019-08-09.yang +yangmodules_list += kea-dhcp4-server@2019-08-09.yang +yangmodules_list += kea-dhcp6-server@2019-08-09.yang +yangmodules_list += kea-types@2019-08-09.yang yangmodules_list += keatest-module@2018-11-20.yang if HAVE_SYSREPO diff --git a/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-09.hash b/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-09.hash index 12058d39d1..29d94830ff 100644 --- a/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-09.hash +++ b/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-09.hash @@ -1 +1 @@ -bd90f2b341a0f5502231dff061f2c2fc0a52558ad8d9375533c4195719c206fd +d405e7acd13d6ac6f8acc3192e3462b9c550bd90ea73506a27bb133f91667edb diff --git a/src/share/yang/modules/kea-dhcp4-server@2019-08-09.yang b/src/share/yang/modules/kea-dhcp4-server@2019-08-09.yang index 4aeef0fa52..7ec16607fc 100644 --- a/src/share/yang/modules/kea-dhcp4-server@2019-08-09.yang +++ b/src/share/yang/modules/kea-dhcp4-server@2019-08-09.yang @@ -290,10 +290,10 @@ module kea-dhcp4-server { uses dhcp:max-valid-lifetime; uses dhcp:renew-timer; uses dhcp:rebind-timer; - uses dhcp:decline-probation-period; uses dhcp:calculate-tee-times; uses dhcp:t1-percent; uses dhcp:t2-percent; + uses dhcp:decline-probation-period; uses subnet4-list; list shared-network {