Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-data-codec-xml / src / test / resources / anyxml-support / params / ietf-netconf@2011-06-01.yang
1 module ietf-netconf {
2
3   // the namespace for NETCONF XML definitions is unchanged
4   // from RFC 4741, which this document replaces
5   namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
6
7   prefix nc;
8
9   organization
10     "IETF NETCONF (Network Configuration) Working Group";
11
12   contact
13     "WG Web:   <http://tools.ietf.org/wg/netconf/>
14      WG List:  <netconf@ietf.org>
15
16      WG Chair: Bert Wijnen
17                <bertietf@bwijnen.net>
18
19      WG Chair: Mehmet Ersue
20                <mehmet.ersue@nsn.com>
21
22      Editor:   Martin Bjorklund
23                <mbj@tail-f.com>
24
25      Editor:   Juergen Schoenwaelder
26                <j.schoenwaelder@jacobs-university.de>
27
28      Editor:   Andy Bierman
29                <andy.bierman@brocade.com>";
30   description
31     "NETCONF Protocol Data Types and Protocol Operations.
32
33      Copyright (c) 2011 IETF Trust and the persons identified as
34      the document authors.  All rights reserved.
35
36      Redistribution and use in source and binary forms, with or
37      without modification, is permitted pursuant to, and subject
38      to the license terms contained in, the Simplified BSD License
39      set forth in Section 4.c of the IETF Trust's Legal Provisions
40      Relating to IETF Documents
41      (http://trustee.ietf.org/license-info).
42
43      This version of this YANG module is part of RFC 6241; see
44      the RFC itself for full legal notices.";
45
46   revision 2011-06-01 {
47     description
48       "Initial revision;";
49     reference
50       "RFC 6241: Network Configuration Protocol";
51   }
52
53   // NETCONF capabilities defined as features
54   feature writable-running;
55   feature candidate;
56   feature validate;
57   feature url;
58
59   // NETCONF Simple Types
60
61   typedef edit-operation-type {
62     type enumeration {
63       enum merge {
64       }
65       enum replace {
66       }
67       enum create {
68       }
69       enum delete {
70       }
71       enum remove {
72       }
73     }
74     default "merge";
75     description "NETCONF 'operation' attribute values";
76     reference "RFC 6241, Section 7.2";
77   }
78
79   // NETCONF Standard Protocol Operations
80
81   rpc edit-config {
82     description
83       "The <edit-config> operation loads all or part of a specified
84        configuration to the specified target configuration.";
85
86     reference "RFC 6241, Section 7.2";
87
88     input {
89       container target {
90         description
91           "Particular configuration to edit.";
92
93         choice config-target {
94           mandatory true;
95           description
96             "The configuration target.";
97
98           leaf candidate {
99             if-feature candidate;
100             type empty;
101             description
102               "The candidate configuration is the config target.";
103           }
104           leaf running {
105             if-feature writable-running;
106             type empty;
107             description
108               "The running configuration is the config source.";
109           }
110         }
111       }
112
113       leaf default-operation {
114         type enumeration {
115           enum merge {
116             description
117               "The default operation is merge.";
118           }
119           enum replace {
120             description
121               "The default operation is replace.";
122           }
123           enum none {
124             description
125               "There is no default operation.";
126           }
127         }
128         default "merge";
129         description
130           "The default operation to use.";
131       }
132
133       leaf test-option {
134         if-feature validate;
135         type enumeration {
136           enum test-then-set {
137             description
138               "The server will test and then set if no errors.";
139           }
140           enum set {
141             description
142               "The server will set without a test first.";
143           }
144
145           enum test-only {
146             description
147               "The server will only test and not set, even
148                if there are no errors.";
149           }
150         }
151         default "test-then-set";
152         description
153           "The test option to use.";
154       }
155
156       leaf error-option {
157         type enumeration {
158           enum stop-on-error {
159             description
160               "The server will stop on errors.";
161           }
162           enum continue-on-error {
163             description
164               "The server may continue on errors.";
165           }
166           enum rollback-on-error {
167             description
168               "The server will roll back on errors.
169                This value can only be used if the 'rollback-on-error'
170                feature is supported.";
171           }
172         }
173         default "stop-on-error";
174         description
175           "The error option to use.";
176       }
177
178       choice edit-content {
179         mandatory true;
180         description
181           "The content for the edit operation.";
182
183         anyxml config {
184           description
185             "Inline Config content.";
186         }
187         leaf url {
188           if-feature url;
189           type string;
190           description
191             "URL-based config content.";
192         }
193       }
194     }
195   }
196
197 }