New clixon-config@2020-04-23.yang revision
* Removed xml-stats non-config data (replaced by rpc `stats` in clixon-lib.yang) * Added option `CLICON_YANG_UNKNOWN_ANYDATA` to treat unknown XML (wrt YANG) as anydata.
This commit is contained in:
parent
bf04131e54
commit
a3b6ea9e10
9 changed files with 115 additions and 88 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Copyright (C) 2009-2016 Olof Hagsand and Benny Holmgren
|
||||
# Copyright (C) 2017-2019 Olof Hagsand
|
||||
# Copyright (C) 2020 Olof Hagsand and Rubicon Communications, LLC(Netgate)#
|
||||
# Copyright (C) 2020 Olof Hagsand and Rubicon Communications, LLC(Netgate)
|
||||
# This file is part of CLIXON
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
|
@ -42,7 +42,7 @@ datarootdir = @datarootdir@
|
|||
# See also OPT_YANG_INSTALLDIR for the standard yang files
|
||||
YANG_INSTALLDIR = @YANG_INSTALLDIR@
|
||||
|
||||
YANGSPECS = clixon-config@2020-02-22.yang
|
||||
YANGSPECS = clixon-config@2020-04-23.yang
|
||||
YANGSPECS += clixon-lib@2020-04-23.yang
|
||||
YANGSPECS += clixon-rfc5277@2008-07-01.yang
|
||||
YANGSPECS += clixon-xml-changelog@2019-03-21.yang
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ module clixon-config {
|
|||
|
||||
***** END LICENSE BLOCK *****";
|
||||
|
||||
/* Deleted: clixon-stats state for clixon XML and memory statistics. (moved to clixon-lib)
|
||||
*/
|
||||
revision 2020-02-22 {
|
||||
description
|
||||
"Added: search index extension,
|
||||
|
|
@ -314,14 +312,6 @@ module clixon-config {
|
|||
Some yang specs seem not to fulfil this. However, if you reset this, there may
|
||||
be follow-up errors due to code that assumes a configuration list has keys";
|
||||
}
|
||||
leaf CLICON_YANG_UNKNOWN_ANYDATA{
|
||||
type boolean;
|
||||
default false;
|
||||
description
|
||||
"Treat unknown XML/JSON nodes as anydata.
|
||||
This does not apply to namespaces, which means a top-level node: xxx:yyy
|
||||
is accepted only if yyy is unknown, not xxx";
|
||||
}
|
||||
leaf CLICON_BACKEND_DIR {
|
||||
type string;
|
||||
description
|
||||
|
|
@ -728,4 +718,33 @@ module clixon-config {
|
|||
|
||||
}
|
||||
}
|
||||
container clixon-stats{
|
||||
config false;
|
||||
description "Clixon backend statistics.";
|
||||
container global{
|
||||
description "Clixon global statistics";
|
||||
leaf xmlnr{
|
||||
description "Number of XML objects. That is number of residing xml/json objects
|
||||
in the internal 'cxobj' representation.";
|
||||
type uint64;
|
||||
}
|
||||
}
|
||||
list datastore{
|
||||
description "Datastore statistics";
|
||||
key "name";
|
||||
leaf name{
|
||||
description "name of datastore (eg running).";
|
||||
type string;
|
||||
}
|
||||
leaf nr{
|
||||
description "Number of XML objects. That is number of residing xml/json objects
|
||||
in the internal 'cxobj' representation.";
|
||||
type uint64;
|
||||
}
|
||||
leaf size{
|
||||
description "Size in bytes of internal datastore cache of datastore tree.";
|
||||
type uint64;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ module clixon-config {
|
|||
"Clixon configuration file
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Copyright (C) 2009-2019 Olof Hagsand
|
||||
Copyright (C) 2020 Olof Hagsand and Rubicon Communications, LLC(Netgate)
|
||||
|
||||
This file is part of CLIXON
|
||||
|
||||
|
|
@ -39,6 +40,22 @@ module clixon-config {
|
|||
|
||||
***** END LICENSE BLOCK *****";
|
||||
|
||||
/* Deleted: clixon-stats state for clixon XML and memory statistics. (moved to clixon-lib)
|
||||
*/
|
||||
revision 2020-04-23 {
|
||||
description
|
||||
"Added: CLICON_YANG_UNKNOWN_ANYDATA to treat unknown XML (wrt YANG) as anydata.
|
||||
Deleted: xml-stats non-config data (replaced by rpc stats in clixon-lib.yang)";
|
||||
}
|
||||
revision 2020-02-22 {
|
||||
description
|
||||
"Added: search index extension,
|
||||
Added: clixon-stats state for clixon XML and memory statistics.
|
||||
Added: CLICON_CLI_BUF_START and CLICON_CLI_BUF_THRESHOLD for quadratic and linear
|
||||
growth of CLIgen buffers (cbuf:s)
|
||||
Added: CLICON_VALIDATE_STATE_XML for controling validation of user state XML
|
||||
Added: CLICON_CLICON_YANG_LIST_CHECK to skip list key checks";
|
||||
}
|
||||
revision 2019-09-11 {
|
||||
description
|
||||
"Added: CLICON_BACKEND_USER: drop of privileges to user,
|
||||
|
|
@ -67,6 +84,10 @@ module clixon-config {
|
|||
description
|
||||
"Released in Clixon 3.8";
|
||||
}
|
||||
extension search_index {
|
||||
description "This list argument acts as a search index using optimized binary search.
|
||||
";
|
||||
}
|
||||
typedef startup_mode{
|
||||
description
|
||||
"Which method to boot/start clicon backend.
|
||||
|
|
@ -289,6 +310,23 @@ module clixon-config {
|
|||
There is a 'good-enough' posix translation mode and a complete
|
||||
libxml2 mode";
|
||||
}
|
||||
leaf CLICON_YANG_LIST_CHECK {
|
||||
type boolean;
|
||||
default true;
|
||||
description
|
||||
"If false, skip Yang list check sanity checks from RFC 7950, Sec 7.8.2:
|
||||
The 'key' statement, which MUST be present if the list represents configuration.
|
||||
Some yang specs seem not to fulfil this. However, if you reset this, there may
|
||||
be follow-up errors due to code that assumes a configuration list has keys";
|
||||
}
|
||||
leaf CLICON_YANG_UNKNOWN_ANYDATA{
|
||||
type boolean;
|
||||
default false;
|
||||
description
|
||||
"Treat unknown XML/JSON nodes as anydata.
|
||||
This does not apply to namespaces, which means a top-level node: xxx:yyy
|
||||
is accepted only if yyy is unknown, not xxx";
|
||||
}
|
||||
leaf CLICON_BACKEND_DIR {
|
||||
type string;
|
||||
description
|
||||
|
|
@ -440,6 +478,25 @@ module clixon-config {
|
|||
Also, if CLICON_CLI_HIST_FILE is set, also the size in lines
|
||||
of the saved history.";
|
||||
}
|
||||
leaf CLICON_CLI_BUF_START {
|
||||
type uint32;
|
||||
default 256;
|
||||
description
|
||||
"CLIgen buffer (cbuf) initial size.
|
||||
When the buffer needs to grow, the allocation grows quadratic up to a threshold
|
||||
after which linear growth continues.
|
||||
See CLICON_CLI_BUF_THRESHOLD";
|
||||
}
|
||||
leaf CLICON_CLI_BUF_THRESHOLD {
|
||||
type uint32;
|
||||
default 65536;
|
||||
description
|
||||
"CLIgen buffer (cbuf) threshold size.
|
||||
When the buffer exceeds the threshold, the allocation grows by adding the threshold
|
||||
value to the buffer length.
|
||||
If 0, the growth continues with quadratic growth.
|
||||
See CLICON_CLI_BUF_THRESHOLD";
|
||||
}
|
||||
leaf CLICON_SOCK_FAMILY {
|
||||
type string;
|
||||
default "UNIX";
|
||||
|
|
@ -552,6 +609,20 @@ module clixon-config {
|
|||
If CLICON_XML_CHANGELOG is true, Clixon
|
||||
reads the module changelog from this file.";
|
||||
}
|
||||
leaf CLICON_VALIDATE_STATE_XML {
|
||||
type boolean;
|
||||
default false;
|
||||
description
|
||||
"Validate user state callback content.
|
||||
Users may register state callbacks using ca_statedata callback
|
||||
When set, the XML returned from the callback is validated after merging with
|
||||
the running db. If it fails, an internal error is returned to the originating
|
||||
user.
|
||||
If the option is not set, the XML returned by the user is not validated.
|
||||
Note that enabling currently causes a large performance overhead for large
|
||||
lists, therefore it is recommended to enable it during development and debugging
|
||||
but disable it in production, until this has been resolved.";
|
||||
}
|
||||
leaf CLICON_STARTUP_MODE {
|
||||
type startup_mode;
|
||||
description "Which method to boot/start clicon backend";
|
||||
|
|
@ -560,7 +631,9 @@ module clixon-config {
|
|||
type boolean;
|
||||
default false;
|
||||
description "If set, modifications in validation and commit
|
||||
callbacks are written back into the datastore";
|
||||
callbacks are written back into the datastore.
|
||||
This is a bad idea and therefore obsoleted.";
|
||||
status obsolete;
|
||||
}
|
||||
leaf CLICON_NACM_MODE {
|
||||
type nacm_mode;
|
||||
|
|
@ -659,6 +732,5 @@ module clixon-config {
|
|||
data to store before dropping. 0 means no retention";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
module clixon-lib {
|
||||
yang-version 1.1;
|
||||
namespace "http://clicon.org/lib";
|
||||
prefix cl;
|
||||
|
||||
organization
|
||||
"Clicon / Clixon";
|
||||
|
||||
contact
|
||||
"Olof Hagsand <olof@hagsand.se>";
|
||||
|
||||
description
|
||||
"Clixon Netconf extensions for communication between clients and backend.
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Copyright (C) 2009-2019 Olof Hagsand and Benny Holmgren
|
||||
|
||||
This file is part of CLIXON
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the \"License\");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an \"AS IS\" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 3 or later (the \"GPL\"),
|
||||
in which case the provisions of the GPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of the GPL, and not to allow others to
|
||||
use your version of this file under the terms of Apache License version 2,
|
||||
indicate your decision by deleting the provisions above and replace them with
|
||||
the notice and other provisions required by the GPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the Apache License version 2 or the GPL.
|
||||
|
||||
***** END LICENSE BLOCK *****";
|
||||
|
||||
revision 2019-08-13 {
|
||||
description
|
||||
"No changes (reverted change)";
|
||||
}
|
||||
revision 2019-06-05 {
|
||||
description
|
||||
"ping rpc added for liveness";
|
||||
}
|
||||
revision 2019-01-02 {
|
||||
description
|
||||
"Released in Clixon 3.9";
|
||||
}
|
||||
rpc debug {
|
||||
description "Set debug level of backend.";
|
||||
input {
|
||||
leaf level {
|
||||
type uint32;
|
||||
}
|
||||
}
|
||||
}
|
||||
rpc ping {
|
||||
description "Check aliveness of backend daemon.";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue