module ietf-factory-default {
yang-version 1.1;
namespace urn:ietf:params:xml:ns:yang:ietf-factory-default;
prefix fdef;
import ietf-netconf { prefix nc ; }
import ietf-datastores { prefix ds; }
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web:
WG List:
WG Chair: Lou Berger
WG Chair: Joel Jaeggli
WG Chair: Kent Watsen
Editor: Balazs Lengyel
Editor: Qin Wu
";
description
"This module defines the
- reset-datastore RPC
- factory-default datastore
- an extension to the Netconf operation to
allow it to operate on the factory-default datastore.
It provides functionality to reset a YANG datastore to its
factory-default content.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. 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 Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (https://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX
(https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
revision 2018-10-09 {
description
"Initial revision.";
reference "RFC XXXX: Factory default Setting Capability for
RESTCONF";
}
feature factory-default-as-datastore {
description "Indicates that the factory default configuration is
also available as a separate datastore";
}
rpc reset-datastore {
description "The target datastore is reset to its factory
default content. ";
input {
leaf-list target-datasore {
type identityref {
base "ds:datastore" ;
}
min-elements 1;
description "The datastore(s) whose content will be
replaced by the factory-default configuration.";
}
// Do we need an extra parameter that may order a restart of
// the YANG-server or the whole system?
}
}
identity factory-default {
if-feature factory-default-as-datastore;
base ds:datastore;
description "The read-only datastore contains the configuration that
will be copied into e.g. the running datastore by the
reset-datastore operation if the target is the running
datastore.";
}
augment /nc:copy-config/nc:input/nc:source/nc:config-source {
if-feature factory-default-as-datastore;
description " Allows the copy-config operation to use the
factory-default datastore as a source";
leaf factory-default {
type empty ;
description
"The factory-default datastore is the source."; }
}
}