* Restructured and extended <stats> rpc to schema mountpoints
* New revision of clixon-lib.yang * CLI: Added `show statistics` example code for backend and CLI memory stats
This commit is contained in:
parent
a0df12134a
commit
b6116261a3
11 changed files with 285 additions and 60 deletions
|
|
@ -43,7 +43,7 @@ YANG_INSTALLDIR = @YANG_INSTALLDIR@
|
|||
|
||||
# Note: mirror these to test/config.sh.in
|
||||
YANGSPECS = clixon-config@2023-03-01.yang # 6.2
|
||||
YANGSPECS += clixon-lib@2023-03-01.yang # 6.2
|
||||
YANGSPECS += clixon-lib@2023-05-01.yang # 6.3
|
||||
YANGSPECS += clixon-rfc5277@2008-07-01.yang
|
||||
YANGSPECS += clixon-xml-changelog@2019-03-21.yang
|
||||
YANGSPECS += clixon-restconf@2022-08-01.yang # 5.9
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ module clixon-lib {
|
|||
import ietf-netconf-monitoring {
|
||||
prefix ncm;
|
||||
}
|
||||
import ietf-yang-metadata {
|
||||
prefix "md";
|
||||
}
|
||||
organization
|
||||
"Clicon / Clixon";
|
||||
|
||||
|
|
@ -16,9 +19,9 @@ module clixon-lib {
|
|||
"Olof Hagsand <olof@hagsand.se>";
|
||||
|
||||
description
|
||||
"***** BEGIN LICENSE BLOCK *****
|
||||
"***** BEGIN LICENSE BLOCK *****
|
||||
Copyright (C) 2009-2019 Olof Hagsand
|
||||
Copyright (C) 2020-2021 Olof Hagsand and Rubicon Communications, LLC(Netgate)
|
||||
Copyright (C) 2020-2022 Olof Hagsand and Rubicon Communications, LLC(Netgate)
|
||||
|
||||
This file is part of CLIXON
|
||||
|
||||
|
|
@ -51,7 +54,7 @@ module clixon-lib {
|
|||
- RPCs for debug, stats and process-control
|
||||
- Informal description of attributes
|
||||
|
||||
Additionally, Clixon extends NETCONF for internal use with some internal attributes. These
|
||||
Clixon also extends NETCONF for internal use with some internal attributes. These
|
||||
are not visible for external usage bit belongs to the namespace of this YANG.
|
||||
The internal attributes are:
|
||||
- content (also RESTCONF)
|
||||
|
|
@ -65,6 +68,14 @@ module clixon-lib {
|
|||
- objectexisted
|
||||
";
|
||||
|
||||
revision 2023-05-01 {
|
||||
description
|
||||
"Restructured and extended stats rpc to schema mountpoints";
|
||||
}
|
||||
revision 2023-03-01 {
|
||||
description
|
||||
"Added creator meta-object";
|
||||
}
|
||||
revision 2022-12-01 {
|
||||
description
|
||||
"Added values of RFC6022 transport identityref
|
||||
|
|
@ -113,15 +124,15 @@ module clixon-lib {
|
|||
type enumeration {
|
||||
enum start {
|
||||
description
|
||||
"Start if not already running";
|
||||
"Start if not already running";
|
||||
}
|
||||
enum stop {
|
||||
description
|
||||
"Stop if running";
|
||||
"Stop if running";
|
||||
}
|
||||
enum restart {
|
||||
description
|
||||
"Stop if running, then start";
|
||||
"Stop if running, then start";
|
||||
}
|
||||
enum status {
|
||||
description
|
||||
|
|
@ -138,7 +149,7 @@ module clixon-lib {
|
|||
}
|
||||
identity netconf {
|
||||
description
|
||||
"Just NETCONF without specitic underlying transport,
|
||||
"Just NETCONF without specific underlying transport,
|
||||
Clixon uses stdio for its netconf client and therefore does not know whether it is
|
||||
invoked in a script, by a NETCONF/SSH subsystem, etc";
|
||||
base ncm:transport;
|
||||
|
|
@ -154,8 +165,8 @@ module clixon-lib {
|
|||
base ncm:transport;
|
||||
}
|
||||
extension autocli-op {
|
||||
description
|
||||
"Takes an argument an operation defing how to modify the clispec at
|
||||
description
|
||||
"Takes an argument an operation defing how to modify the clispec at
|
||||
this point in the YANG tree for the automated generated CLI.
|
||||
Note that this extension is only used in clixon_cli.
|
||||
Operations is expected to be extended, but the following operations are defined:
|
||||
|
|
@ -163,10 +174,21 @@ module clixon-lib {
|
|||
- hide-database This command hides the database
|
||||
- hide-database-auto-completion This command hides the database and the auto completion (meaning, this command acts as both commands above)
|
||||
Obsolete: use clixon-autocli:hide and clixon-autocli:hide-show instead";
|
||||
argument cliop;
|
||||
status obsolete;
|
||||
}
|
||||
rpc debug {
|
||||
argument cliop;
|
||||
status obsolete;
|
||||
}
|
||||
|
||||
md:annotation creator {
|
||||
type string;
|
||||
description
|
||||
"This annotation contains the name of a creator of an object.
|
||||
One application is the clixon controller where multiple services can
|
||||
create the same object. When such a service is deleted (or changed) one needs to keep
|
||||
track of which service created what.
|
||||
Limitations: only objects that are actually added or deleted.
|
||||
A sub-object wil not be noted";
|
||||
}
|
||||
rpc debug {
|
||||
description "Set debug level of backend.";
|
||||
input {
|
||||
leaf level {
|
||||
|
|
@ -177,8 +199,15 @@ module clixon-lib {
|
|||
rpc ping {
|
||||
description "Check aliveness of backend daemon.";
|
||||
}
|
||||
rpc stats {
|
||||
description "Clixon XML statistics.";
|
||||
rpc stats { /* Could be moved to state */
|
||||
description "Clixon yang and datastore statistics.";
|
||||
input {
|
||||
leaf modules {
|
||||
description "If enabled include per-module statistics";
|
||||
type boolean;
|
||||
mandatory false;
|
||||
}
|
||||
}
|
||||
output {
|
||||
container global{
|
||||
description
|
||||
|
|
@ -198,7 +227,8 @@ module clixon-lib {
|
|||
type uint64;
|
||||
}
|
||||
}
|
||||
list datastore{
|
||||
container datastores{
|
||||
list datastore{
|
||||
description "Per datastore statistics for cxobj";
|
||||
key "name";
|
||||
leaf name{
|
||||
|
|
@ -214,9 +244,11 @@ module clixon-lib {
|
|||
description "Size in bytes of internal datastore cache of datastore tree.";
|
||||
type uint64;
|
||||
}
|
||||
}
|
||||
}
|
||||
list module{
|
||||
description "Per YANG module statistics";
|
||||
container module-sets{
|
||||
list module-set{
|
||||
description "Statistics per group of module, eg top-level and mount-points";
|
||||
key "name";
|
||||
leaf name{
|
||||
description "Name of YANG module.";
|
||||
|
|
@ -224,14 +256,33 @@ module clixon-lib {
|
|||
}
|
||||
leaf nr{
|
||||
description
|
||||
"Number of YANG objects. That is number of residing YANG objects";
|
||||
"Total number of YANG objects in set";
|
||||
type uint64;
|
||||
}
|
||||
leaf size{
|
||||
description
|
||||
"Size in bytes of internal YANG object representation.";
|
||||
"Total size in bytes of internal YANG object representation for module set";
|
||||
type uint64;
|
||||
}
|
||||
list module{
|
||||
description "Statistics per module (if modules set in input)";
|
||||
key "name";
|
||||
leaf name{
|
||||
description "Name of YANG module.";
|
||||
type string;
|
||||
}
|
||||
leaf nr{
|
||||
description
|
||||
"Number of YANG objects. That is number of residing YANG objects";
|
||||
type uint64;
|
||||
}
|
||||
leaf size{
|
||||
description
|
||||
"Size in bytes of internal YANG object representation.";
|
||||
type uint64;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -244,7 +295,6 @@ module clixon-lib {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
rpc process-control {
|
||||
description
|
||||
"Control a specific process or daemon: start/stop, etc.
|
||||
Loading…
Add table
Add a link
Reference in a new issue