moduleyumaworks-system {
yang-version1;
namespace"http://yumaworks.com/ns/yumaworks-system";
prefixysys;
importietf-netconf {
prefixnc;
}
importietf-netconf-monitoring {
prefixncm;
}
importietf-yang-types {
prefixyang;
}
importyuma-app-common {
prefixyumaapp;
}
importyuma-ncx {
prefixncx;
}
importyuma-types {
prefixnt;
}
importyumaworks-restconf {
prefixrc;
}
importietf-netconf-acm {
prefixnacm;
}
organization"YumaWorks, Inc.";
contact"Support <support at yumaworks.com>";
description"Common system operations for the netconfd-pro server.
Copyright (c) 2013 - 2017 YumaWorks, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the BSD 3-Clause License
http://opensource.org/licenses/BSD-3-Clause";
revision"2017-12-22" {
description"Copy load rpc into this module so yuma-system
can be removed.";
}
revision"2017-10-06" {
description"Add save-config parameter to the load and
load-bundle operations.
Add delete-config parameter to the unload and
unload-bundle operations.";
}
revision"2016-08-24" {
description"Add unload-bundle operation.";
}
revision"2016-04-27" {
description"Add deviation parameter to load-bundle input params.";
}
revision"2015-09-26" {
description"Add depth parameter to get, get-config, and
copy-config operations.";
}
revision"2014-10-16" {
description"Add with-owners parameter to get, get-config, and
copy-config operations.";
}
revision"2014-05-27" {
description"Add overwrite parameter to backup operation.";
}
revision"2014-01-09" {
description"Add load-bundle operation.";
}
revision"2013-11-13" {
description"Add replay-config internal operation.
Add module-type leaf to netconf-state schema list";
}
revision"2013-09-19" {
description"Add comment parameter to commit operation.";
}
revision"2013-08-30" {
description"Add unload operation.";
}
revision"2013-07-16" {
description"Add cancel-subscription operation.";
}
revision"2013-01-06" {
description"Initial version.";
}
augment/ncm:netconf-state {
containerbackup-files {
configfalse;
description"Reports the backup files currently available
on the server. Only present if backup commands
in this module are supported by the server";
listbackup-file {
key "name";
leafname {
typent:NcxName;
description"File name for the backup.";
}
leafbackup-time {
typeyang:date-and-time;
description"Date and time the backup file was created.";
}
} // list backup-file
} // container backup-files
}
augment/ncm:netconf-state/ncm:schemas/ncm:schema {
leafconformance {
typeboolean;
configfalse;
description"Indicates whether the server is claiming conformance
to the module represented by this schema or not.
If 'true', the server implements the module
represented by the indicated schema,
according to the YANG module capability URI.
If 'false', the server just imports definitions
from the module represented by the indicated schema.";
}
leafmodule-type {
typeenumeration {
enum"module" {
value0;
description"Schema represents a YANG module";
}
enum"submodule" {
value1;
description"Schema represents a YANG submodule";
}
}
configfalse;
description"Indicates the type of module for this entry";
}
}
rpcbackup {
nacm:default-deny-all;
description"Backup the current running configuration to a file
on the device.";
input {
ncx:default-parm"filename";
leaffilename {
typent:NcxName;
mandatorytrue;
description"File name for the backup. A simple identifier name
is expected with no directory specifications or
file extensions added. (e.g., 'backup1').";
}
leafoverwrite {
typeboolean;
default'false';
description"If 'true' then allow an existing backup with the same
'filename' value to be overwritten. If 'false' then return
an error if the file already exists.";
}
}
} // rpc backuprpcdelete-backup {
nacm:default-deny-all;
description"Delete the specified backup file on the device.";
input {
ncx:default-parm"filename";
leaffilename {
typent:NcxName;
mandatorytrue;
description"File name to delete";
}
}
} // rpc delete-backuprpcrestore {
nacm:default-deny-all;
description"Restore a saved configuration on the device to the
running configuration.";
input {
ncx:default-parm"filename";
leaffilename {
typent:NcxName;
mandatorytrue;
description"File name for the restore. A simple identifier name
is expected with no directory specifications or
file extensions added. (e.g., 'backup1').";
}
}
} // rpc restorerpccancel-subscription {
description"Cancel a notification subscription for the session,
if this session has an active subscription. If not,
just return OK.";
} // rpc cancel-subscriptionrpcunload {
nacm:default-deny-all;
description"Unload a module from the server. Remove the associated
server instrumentation library (SIL). Remove any data
nodes in the system from the module. Remove the module
from the server capabilities and NETCONF monitoring
data. Remove the module namespace from the system.
Note: this operation does not remove the --module parameter
from the server configuration file if it exists.
The following conditions must be true for the unload to be
attempted by the server:
* The module is allowed to be unloaded. It is data-model
and vendor specific whether a module can be
removed at run-time.
* There are no dependencies on the module being removed.
No modules that import this module are also loaded.
* The module was loaded into the server, either via the
<load> operation or the --module configuration parameter.
* No datastores are currently locked. The server will
attempt to lock all datastores on behalf of the client
for the entire unload operation.
* The candidate datastore does not contain any edits
that have not been committed.
* No confirmed-commit operation is in progress.
If all these conditions are met then the server will
attempt to unload the specified module. The unload
operation can fail for various reasons:
* The client does not have write privileges for
all data being deleted. This includes any
top-level data nodes and any nested augment
nodes in other modules.
* The deletion of one or more nodes would cause the
running datastore to fail any YANG validation
tests in RFC 6020, sec. 8.3.3.
* Server resource errors occur
";
input {
ncx:default-parm"module";
leafmodule {
typent:NcxName;
mandatorytrue;
description"The name of the module to unload.";
}
usesdelete-config-parm;
}
} // rpc unloadrpcreplay-config {
ncx:hidden;
ncx:abstract;
description"Replay the running config for SIL components that have
reset during operation.";
} // rpc replay-configrpcload-bundle {
nacm:default-deny-all;
description"Load a SIL bundle into the server, if it is not already loaded.";
input {
ncx:default-parm"bundle";
leafbundle {
typent:NcxName;
mandatorytrue;
description"Name of the SIL bundle to load.";
}
usesyumaapp:DeviationParm;
usessave-config-parm;
}
} // rpc load-bundlerpcunload-bundle {
nacm:default-deny-all;
description"Unload a SIL bundle from the server, if it is loaded.";
input {
ncx:default-parm"bundle";
leafbundle {
typent:NcxName;
mandatorytrue;
description"Name of the SIL bundle to unload.";
}
usesdelete-config-parm;
}
} // rpc unload-bundleaugment/nc:commit/nc:input {
leafcomment {
typestring {
length"0 .. 1024";
}
description"User provided comment to add to audit log for this
commit operation.";
}
}
groupingwith-owners-parm {
leafwith-owners {
typeempty;
description"Include the 'ywx:owner' attribute in the response for nodes
that have stored owner names. The --save-owners CLI parameter
for the server must be set to 'complex' or 'all' for any
owner names to be saved.";
}
} // grouping with-owners-parmaugment/nc:get-config/nc:input {
useswith-owners-parm;
usesrc:depth-parameter;
}
augment/nc:get/nc:input {
useswith-owners-parm;
usesrc:depth-parameter;
}
augment/nc:copy-config/nc:input {
useswith-owners-parm;
usesrc:depth-parameter;
}
groupingsave-config-parm {
leafsave-config {
typeboolean;
default'false';
description"If 'true' then save the module or bundle load
configuration in the --confdir directory, if the
load or load-bundle operation is completed without
errors.
Ignored if the --no-config CLI parameter is used
or the --confdir CLI parameter is not specified
and no default configuration directory is found.
A configuration file is created or replaced in this
directory with the name <module-name>.conf.";
}
} // grouping save-config-parmgroupingdelete-config-parm {
leafdelete-config {
typeboolean;
default'false';
description"If 'true' then delete the module or bundle load
configuration in the --confdir directory, if the unload
or unload-bundle operation is completed without errors.
Ignored if the --no-config CLI parameter is used
or the --confdir CLI parameter is not specified
and no default configuration directory is found.
A configuration file is deleted in this
directory with the name <module-name>.conf.";
}
} // grouping delete-config-parmrpcload {
nacm:default-deny-all;
description"Load a module into the server, if it is not already loaded.
Returns the module revision date (or today's date if none),
of the module that was loaded, or an error if not found
or the module found had errors and was not loaded
successfully. If the module is already loaded, then the
revision date will simply be returned.";
input {
ncx:default-parm"module";
leafmodule {
typent:NcxName;
mandatorytrue;
description"Name of the module to load.";
}
leafrevision {
typent:Date;
description"Module revision to load.";
}
usesyumaapp:DeviationParm;
usessave-config-parm;
}
output {
leafmod-revision {
typent:Date;
description"Revision date of the module in use by the server.
Will only be present if the module has a version";
}
}
} // rpc load
} // module yumaworks-system