module ietf-netconf-get2 {
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-get2";
prefix get2;
import ietf-inet-types {
prefix inet;
}
import ietf-netconf {
prefix nc;
}
import ietf-netconf-with-defaults {
prefix ncwd;
}
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web:
WG List:
WG Chair: Mehmet Ersue
WG Chair: Bert Wijnen
Editor: Andy Bierman
";
description
"This module contains a collection of YANG definitions for the
retrieval of information from a NETCONF server.
Copyright (c) 2012 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
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
// RFC Ed.: remove this note
// Note: extracted from draft-bierman-netconf-get2-00.txt
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
revision "2012-09-08" {
description
"Initial revision.";
reference
"RFC XXXX: The NETCONF Operation";
}
/* Features */
feature timestamps {
description
"This feature indicates that the server implements
the operations parameters which require
last modification timestamps to be maintained by
the server.
If this feature is advertised then one global
'last-modified' timestamp for the entire
running datastore MUST be supported.
The server MAY support additional timestamps
for additional datastores and data nodes
within a datastore. The 'with-timestamps'
parameter can be used to identify
which data nodes support a last-modified-time
timestamp.";
}
feature with-defaults {
description
"This feature indicates that the server supports the
'with-defaults' parameter for the operation.
A NETCONF server SHOULD support this feature.";
reference
"RFC 6243: With-defaults Capability for NETCONF";
}
feature subtree-filter {
description
"This feature indicates that the server supports the
subtree filtering mechanism for selecting portions
of the selected source datastore.
A NETCONF server SHOULD support this feature.";
reference
"RFC 6241: NETCONF Protocol, section 6.";
}
/* Protocol Operations */
rpc get2 {
description
"Retrieve NETCONF datastore information";
input {
container source {
choice datastore-source {
default running;
description
"The configuration source for the retrieval operation.
The running configuration is the default choice if
this parameter is not present.";
leaf candidate {
if-feature nc:candidate;
type empty;
description
"The candidate configuration datastore is the
retrieval source.";
}
leaf running {
type empty;
description
"The running configuration datastore is the
retrieval source.";
}
leaf operational {
type empty;
description
"The collection of non-configuration
data nodes supported by the server is the
retrieval source.";
}
leaf startup {
if-feature nc:startup;
type empty;
description
"The startup configuration datastore is the
retrieval source.";
}
leaf url {
if-feature nc:url;
type inet:uri;
description
"The URL-based configuration is the
retrieval source.";
}
}
}
choice filter-spec {
anyxml filter {
if-feature subtree-filter;
description
"This parameter identifies the portions of the
target datastore to retrieve.";
reference "RFC 6241, Section 6.";
}
leaf select {
if-feature nc:xpath;
type yang:xpath1.0;
description
"This parameter contains an XPath expression
identifying the portions of the target
datastore to retrieve.";
}
}
leaf keys-only {
type empty;
description
"This parameter selects only data nodes which
are key leaf nodes. Parent container and
list nodes are also returned, but no other leafs,
or any leaf-lists will be included in the reply.";
}
leaf if-modified-since {
if-feature timestamps;
type yang:date-and-time;
description
"This parameter selects only data nodes which
have been modified since the specified time.";
}
leaf depth {
type uint32;
default 0;
description
"This parameter selects how many conceptual
sub-tree levels should be returned in the
.
If this parameter is equal to '0', then entire
subtrees will be returned.
If this parameter is greater than '0', then
only the specified number of subtree levels will
be returned.";
reference "RFC XXXX, section 2.1.";
}
uses ncwd:with-defaults-parameters {
if-feature with-defaults;
description
"This parameter controls the retrieval of
default values.";
reference
"RFC 6243: With-defaults Capability for NETCONF";
}
leaf with-timestamps {
if-feature timestamps;
type empty;
description
"This parameter will cause the server to return
XML attributes identifying the last modification
time within one or more elements within the
.";
reference "RFC XXXX, sections 2.2 and 3.";
}
}
output {
anyxml data {
description
"Copy of the requested datastore subset which
matched the filter criteria (if any).
An empty data container indicates that the
request did not produce any results.";
}
}
}
}