Refactor standard model placement
[netconf.git] / model / rfc6243 / src / main / yang / ietf-netconf-with-defaults@2011-06-01.yang
1 module ietf-netconf-with-defaults {
2
3    namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
4
5    prefix ncwd;
6
7    import ietf-netconf { prefix nc; }
8
9    organization
10     "IETF NETCONF (Network Configuration Protocol) Working Group";
11
12    contact
13     "WG Web:   <http://tools.ietf.org/wg/netconf/>
14
15      WG List:  <netconf@ietf.org>
16
17      WG Chair: Bert Wijnen
18                <bertietf@bwijnen.net>
19
20      WG Chair: Mehmet Ersue
21                <mehmet.ersue@nsn.com>
22
23      Editor: Andy Bierman
24              <andy.bierman@brocade.com>
25
26      Editor: Balazs Lengyel
27              <balazs.lengyel@ericsson.com>";
28
29    description
30     "This module defines an extension to the NETCONF protocol
31      that allows the NETCONF client to control how default
32      values are handled by the server in particular NETCONF
33      operations.
34
35      Copyright (c) 2011 IETF Trust and the persons identified as
36      the document authors.  All rights reserved.
37
38      Redistribution and use in source and binary forms, with or
39      without modification, is permitted pursuant to, and subject
40      to the license terms contained in, the Simplified BSD License
41      set forth in Section 4.c of the IETF Trust's Legal Provisions
42      Relating to IETF Documents
43      (http://trustee.ietf.org/license-info).
44
45      This version of this YANG module is part of RFC 6243; see
46      the RFC itself for full legal notices.";
47    revision 2011-06-01 {
48      description
49        "Initial version.";
50      reference
51       "RFC 6243: With-defaults Capability for NETCONF";
52    }
53
54    typedef with-defaults-mode {
55       description
56         "Possible modes to report default data.";
57       reference
58          "RFC 6243; Section 3.";
59       type enumeration {
60          enum report-all {
61              description
62                "All default data is reported.";
63              reference
64                "RFC 6243; Section 3.1";
65          }
66          enum report-all-tagged {
67              description
68                "All default data is reported.
69                 Any nodes considered to be default data
70                 will contain a 'default' XML attribute,
71                 set to 'true' or '1'.";
72              reference
73                "RFC 6243; Section 3.4";
74          }
75          enum trim {
76              description
77                "Values are not reported if they contain the default.";
78              reference
79                "RFC 6243; Section 3.2";
80          }
81          enum explicit {
82              description
83                "Report values that contain the definition of
84                 explicitly set data.";
85              reference
86                "RFC 6243; Section 3.3";
87          }
88      }
89    }
90
91    grouping with-defaults-parameters {
92      description
93        "Contains the <with-defaults> parameter for control
94         of defaults in NETCONF retrieval operations.";
95      leaf with-defaults {
96        description
97          "The explicit defaults processing mode requested.";
98        reference
99          "RFC 6243; Section 4.5.1";
100
101        type with-defaults-mode;
102      }
103    }
104
105    // extending the get-config operation
106    augment /nc:get-config/nc:input {
107        description
108          "Adds the <with-defaults> parameter to the
109           input of the NETCONF <get-config> operation.";
110        reference
111          "RFC 6243; Section 4.5.1";
112
113        uses with-defaults-parameters;
114    }
115
116    // extending the get operation
117    augment /nc:get/nc:input {
118        description
119          "Adds the <with-defaults> parameter to
120           the input of the NETCONF <get> operation.";
121        reference
122          "RFC 6243; Section 4.5.1";
123
124        uses with-defaults-parameters;
125    }
126
127    // extending the copy-config operation
128    augment /nc:copy-config/nc:input {
129        description
130          "Adds the <with-defaults> parameter to
131           the input of the NETCONF <copy-config> operation.";
132        reference
133          "RFC 6243; Section 4.5.1";
134
135        uses with-defaults-parameters;
136    }
137
138 }