Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-interfaces@2014-05-08.yang
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-interfaces {
3   yang-version 1;
4   namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
5   prefix if;
6
7   import ietf-yang-types {
8     prefix yang;
9   }
10
11   organization
12     "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
13   contact
14     "WG Web:   &lt;http://tools.ietf.org/wg/netmod/&gt;
15      WG List:  &lt;mailto:netmod@ietf.org&gt;
16
17      WG Chair: Thomas Nadeau
18              &lt;mailto:tnadeau@lucidvision.com&gt;
19
20      WG Chair: Juergen Schoenwaelder
21              &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;
22
23      Editor:   Martin Bjorklund
24              &lt;mailto:mbj@tail-f.com&gt;";
25   description
26     "This module contains a collection of YANG definitions for
27      managing network interfaces.
28
29      Copyright (c) 2014 IETF Trust and the persons identified as
30      authors of the code.  All rights reserved.
31
32      Redistribution and use in source and binary forms, with or
33      without modification, is permitted pursuant to, and subject
34      to the license terms contained in, the Simplified BSD License
35      set forth in Section 4.c of the IETF Trust's Legal Provisions
36      Relating to IETF Documents
37      (http://trustee.ietf.org/license-info).
38
39      This version of this YANG module is part of RFC 7223; see
40      the RFC itself for full legal notices.";
41
42   revision 2014-05-08 {
43     description
44       "Initial revision.";
45     reference
46       "RFC 7223: A YANG Data Model for Interface Management";
47   }
48
49   feature arbitrary-names {
50     description
51       "This feature indicates that the device allows user-controlled
52        interfaces to be named arbitrarily.";
53   }
54
55   feature pre-provisioning {
56     description
57       "This feature indicates that the device supports
58        pre-provisioning of interface configuration, i.e., it is
59        possible to configure an interface whose physical interface
60        hardware is not present on the device.";
61   }
62
63   feature if-mib {
64     description
65       "This feature indicates that the device implements
66        the IF-MIB.";
67     reference
68       "RFC 2863: The Interfaces Group MIB";
69   }
70
71   identity interface-type {
72     description
73       "Base identity from which specific interface types are
74        derived.";
75   }
76
77   typedef interface-ref {
78     type leafref {
79       path "/if:interfaces/if:interface/if:name";
80     }
81     description
82       "This type is used by data models that need to reference
83        configured interfaces.";
84   }
85
86   typedef interface-state-ref {
87     type leafref {
88       path "/if:interfaces-state/if:interface/if:name";
89     }
90     description
91       "This type is used by data models that need to reference
92        the operationally present interfaces.";
93   }
94
95   container interfaces {
96     description
97       "Interface configuration parameters.";
98     list interface {
99       key "name";
100       description
101         "The list of configured interfaces on the device.
102
103          The operational state of an interface is available in the
104          /interfaces-state/interface list.  If the configuration of a
105          system-controlled interface cannot be used by the system
106          (e.g., the interface hardware present does not match the
107          interface type), then the configuration is not applied to
108          the system-controlled interface shown in the
109          /interfaces-state/interface list.  If the configuration
110          of a user-controlled interface cannot be used by the system,
111          the configured interface is not instantiated in the
112          /interfaces-state/interface list.";
113       leaf name {
114         type string;
115         description
116           "The name of the interface.
117
118            A device MAY restrict the allowed values for this leaf,
119            possibly depending on the type of the interface.
120            For system-controlled interfaces, this leaf is the
121            device-specific name of the interface.  The 'config false'
122            list /interfaces-state/interface contains the currently
123            existing interfaces on the device.
124
125            If a client tries to create configuration for a
126            system-controlled interface that is not present in the
127            /interfaces-state/interface list, the server MAY reject
128            the request if the implementation does not support
129            pre-provisioning of interfaces or if the name refers to
130            an interface that can never exist in the system.  A
131            NETCONF server MUST reply with an rpc-error with the
132            error-tag 'invalid-value' in this case.
133
134            If the device supports pre-provisioning of interface
135            configuration, the 'pre-provisioning' feature is
136            advertised.
137
138            If the device allows arbitrarily named user-controlled
139            interfaces, the 'arbitrary-names' feature is advertised.
140
141            When a configured user-controlled interface is created by
142            the system, it is instantiated with the same name in the
143            /interface-state/interface list.";
144       }
145
146       leaf description {
147         type string;
148         description
149           "A textual description of the interface.
150
151            A server implementation MAY map this leaf to the ifAlias
152            MIB object.  Such an implementation needs to use some
153            mechanism to handle the differences in size and characters
154            allowed between this leaf and ifAlias.  The definition of
155            such a mechanism is outside the scope of this document.
156
157            Since ifAlias is defined to be stored in non-volatile
158            storage, the MIB implementation MUST map ifAlias to the
159            value of 'description' in the persistently stored
160            datastore.
161
162            Specifically, if the device supports ':startup', when
163            ifAlias is read the device MUST return the value of
164            'description' in the 'startup' datastore, and when it is
165            written, it MUST be written to the 'running' and 'startup'
166            datastores.  Note that it is up to the implementation to
167
168            decide whether to modify this single leaf in 'startup' or
169            perform an implicit copy-config from 'running' to
170            'startup'.
171
172            If the device does not support ':startup', ifAlias MUST
173            be mapped to the 'description' leaf in the 'running'
174            datastore.";
175         reference
176           "RFC 2863: The Interfaces Group MIB - ifAlias";
177       }
178
179       leaf type {
180         type identityref {
181           base interface-type;
182         }
183         mandatory true;
184         description
185           "The type of the interface.
186
187            When an interface entry is created, a server MAY
188            initialize the type leaf with a valid value, e.g., if it
189            is possible to derive the type from the name of the
190            interface.
191
192            If a client tries to set the type of an interface to a
193            value that can never be used by the system, e.g., if the
194            type is not supported or if the type does not match the
195            name of the interface, the server MUST reject the request.
196            A NETCONF server MUST reply with an rpc-error with the
197            error-tag 'invalid-value' in this case.";
198         reference
199           "RFC 2863: The Interfaces Group MIB - ifType";
200       }
201
202       leaf enabled {
203         type boolean;
204         default "true";
205         description
206           "This leaf contains the configured, desired state of the
207            interface.
208
209            Systems that implement the IF-MIB use the value of this
210            leaf in the 'running' datastore to set
211            IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
212            has been initialized, as described in RFC 2863.
213
214
215
216            Changes in this leaf in the 'running' datastore are
217            reflected in ifAdminStatus, but if ifAdminStatus is
218            changed over SNMP, this leaf is not affected.";
219         reference
220           "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
221       }
222
223       leaf link-up-down-trap-enable {
224         if-feature "if-mib";
225         type enumeration {
226           enum "enabled" {
227             value 1;
228           }
229           enum "disabled" {
230             value 2;
231           }
232         }
233         description
234           "Controls whether linkUp/linkDown SNMP notifications
235            should be generated for this interface.
236
237            If this node is not configured, the value 'enabled' is
238            operationally used by the server for interfaces that do
239            not operate on top of any other interface (i.e., there are
240            no 'lower-layer-if' entries), and 'disabled' otherwise.";
241         reference
242           "RFC 2863: The Interfaces Group MIB -
243                 ifLinkUpDownTrapEnable";
244       }
245     }
246   }
247
248   container interfaces-state {
249     config false;
250     description
251       "Data nodes for the operational state of interfaces.";
252     list interface {
253       key "name";
254       description
255         "The list of interfaces on the device.
256
257          System-controlled interfaces created by the system are
258          always present in this list, whether they are configured or
259          not.";
260       leaf name {
261         type string;
262         description
263           "The name of the interface.
264
265            A server implementation MAY map this leaf to the ifName
266            MIB object.  Such an implementation needs to use some
267            mechanism to handle the differences in size and characters
268            allowed between this leaf and ifName.  The definition of
269            such a mechanism is outside the scope of this document.";
270         reference
271           "RFC 2863: The Interfaces Group MIB - ifName";
272       }
273
274       leaf type {
275         type identityref {
276           base interface-type;
277         }
278         mandatory true;
279         description
280           "The type of the interface.";
281         reference
282           "RFC 2863: The Interfaces Group MIB - ifType";
283       }
284
285       leaf admin-status {
286         if-feature "if-mib";
287         type enumeration {
288           enum "up" {
289             value 1;
290             description
291               "Ready to pass packets.";
292           }
293           enum "down" {
294             value 2;
295             description
296               "Not ready to pass packets and not in some test mode.";
297           }
298           enum "testing" {
299             value 3;
300             description
301               "In some test mode.";
302           }
303         }
304         mandatory true;
305         description
306           "The desired state of the interface.
307
308            This leaf has the same read semantics as ifAdminStatus.";
309         reference
310           "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
311       }
312
313       leaf oper-status {
314         type enumeration {
315           enum "up" {
316             value 1;
317             description
318               "Ready to pass packets.";
319           }
320           enum "down" {
321             value 2;
322             description
323               "The interface does not pass any packets.";
324           }
325           enum "testing" {
326             value 3;
327             description
328               "In some test mode.  No operational packets can
329                be passed.";
330           }
331           enum "unknown" {
332             value 4;
333             description
334               "Status cannot be determined for some reason.";
335           }
336           enum "dormant" {
337             value 5;
338             description
339               "Waiting for some external event.";
340           }
341           enum "not-present" {
342             value 6;
343             description
344               "Some component (typically hardware) is missing.";
345           }
346           enum "lower-layer-down" {
347             value 7;
348             description
349               "Down due to state of lower-layer interface(s).";
350           }
351         }
352         mandatory true;
353         description
354           "The current operational state of the interface.
355
356            This leaf has the same semantics as ifOperStatus.";
357         reference
358           "RFC 2863: The Interfaces Group MIB - ifOperStatus";
359       }
360
361       leaf last-change {
362         type yang:date-and-time;
363         description
364           "The time the interface entered its current operational
365            state.  If the current state was entered prior to the
366            last re-initialization of the local network management
367            subsystem, then this node is not present.";
368         reference
369           "RFC 2863: The Interfaces Group MIB - ifLastChange";
370       }
371
372       leaf if-index {
373         if-feature "if-mib";
374         type int32 {
375           range "1..2147483647";
376         }
377         mandatory true;
378         description
379           "The ifIndex value for the ifEntry represented by this
380            interface.";
381         reference
382           "RFC 2863: The Interfaces Group MIB - ifIndex";
383       }
384
385       leaf phys-address {
386         type yang:phys-address;
387         description
388           "The interface's address at its protocol sub-layer.  For
389            example, for an 802.x interface, this object normally
390            contains a Media Access Control (MAC) address.  The
391            interface's media-specific modules must define the bit
392
393
394            and byte ordering and the format of the value of this
395            object.  For interfaces that do not have such an address
396            (e.g., a serial line), this node is not present.";
397         reference
398           "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
399       }
400
401       leaf-list higher-layer-if {
402         type interface-state-ref;
403         description
404           "A list of references to interfaces layered on top of this
405            interface.";
406         reference
407           "RFC 2863: The Interfaces Group MIB - ifStackTable";
408       }
409
410       leaf-list lower-layer-if {
411         type interface-state-ref;
412         description
413           "A list of references to interfaces layered underneath this
414            interface.";
415         reference
416           "RFC 2863: The Interfaces Group MIB - ifStackTable";
417       }
418
419       leaf speed {
420         type yang:gauge64;
421         units "bits/second";
422         description
423           "An estimate of the interface's current bandwidth in bits
424            per second.  For interfaces that do not vary in
425            bandwidth or for those where no accurate estimation can
426            be made, this node should contain the nominal bandwidth.
427            For interfaces that have no concept of bandwidth, this
428            node is not present.";
429         reference
430           "RFC 2863: The Interfaces Group MIB -
431                 ifSpeed, ifHighSpeed";
432       }
433
434       container statistics {
435         description
436           "A collection of interface-related statistics objects.";
437         leaf discontinuity-time {
438           type yang:date-and-time;
439           mandatory true;
440           description
441             "The time on the most recent occasion at which any one or
442              more of this interface's counters suffered a
443              discontinuity.  If no such discontinuities have occurred
444              since the last re-initialization of the local management
445              subsystem, then this node contains the time the local
446              management subsystem re-initialized itself.";
447         }
448
449         leaf in-octets {
450           type yang:counter64;
451           description
452             "The total number of octets received on the interface,
453              including framing characters.
454
455              Discontinuities in the value of this counter can occur
456              at re-initialization of the management system, and at
457              other times as indicated by the value of
458              'discontinuity-time'.";
459           reference
460             "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
461         }
462
463         leaf in-unicast-pkts {
464           type yang:counter64;
465           description
466             "The number of packets, delivered by this sub-layer to a
467              higher (sub-)layer, that were not addressed to a
468              multicast or broadcast address at this sub-layer.
469
470              Discontinuities in the value of this counter can occur
471              at re-initialization of the management system, and at
472              other times as indicated by the value of
473              'discontinuity-time'.";
474           reference
475             "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
476         }
477
478         leaf in-broadcast-pkts {
479           type yang:counter64;
480           description
481             "The number of packets, delivered by this sub-layer to a
482              higher (sub-)layer, that were addressed to a broadcast
483              address at this sub-layer.
484
485              Discontinuities in the value of this counter can occur
486              at re-initialization of the management system, and at
487              other times as indicated by the value of
488              'discontinuity-time'.";
489           reference
490             "RFC 2863: The Interfaces Group MIB -
491                 ifHCInBroadcastPkts";
492         }
493
494         leaf in-multicast-pkts {
495           type yang:counter64;
496           description
497             "The number of packets, delivered by this sub-layer to a
498              higher (sub-)layer, that were addressed to a multicast
499              address at this sub-layer.  For a MAC-layer protocol,
500              this includes both Group and Functional addresses.
501
502              Discontinuities in the value of this counter can occur
503              at re-initialization of the management system, and at
504              other times as indicated by the value of
505              'discontinuity-time'.";
506           reference
507             "RFC 2863: The Interfaces Group MIB -
508                 ifHCInMulticastPkts";
509         }
510
511         leaf in-discards {
512           type yang:counter32;
513           description
514             "The number of inbound packets that were chosen to be
515              discarded even though no errors had been detected to
516              prevent their being deliverable to a higher-layer
517              protocol.  One possible reason for discarding such a
518              packet could be to free up buffer space.
519
520              Discontinuities in the value of this counter can occur
521              at re-initialization of the management system, and at
522              other times as indicated by the value of
523              'discontinuity-time'.";
524           reference
525             "RFC 2863: The Interfaces Group MIB - ifInDiscards";
526         }
527
528         leaf in-errors {
529           type yang:counter32;
530           description
531             "For packet-oriented interfaces, the number of inbound
532              packets that contained errors preventing them from being
533              deliverable to a higher-layer protocol.  For character-
534              oriented or fixed-length interfaces, the number of
535              inbound transmission units that contained errors
536              preventing them from being deliverable to a higher-layer
537              protocol.
538
539              Discontinuities in the value of this counter can occur
540              at re-initialization of the management system, and at
541              other times as indicated by the value of
542              'discontinuity-time'.";
543           reference
544             "RFC 2863: The Interfaces Group MIB - ifInErrors";
545         }
546
547         leaf in-unknown-protos {
548           type yang:counter32;
549           description
550             "For packet-oriented interfaces, the number of packets
551              received via the interface that were discarded because
552              of an unknown or unsupported protocol.  For
553              character-oriented or fixed-length interfaces that
554              support protocol multiplexing, the number of
555              transmission units received via the interface that were
556              discarded because of an unknown or unsupported protocol.
557              For any interface that does not support protocol
558              multiplexing, this counter is not present.
559
560              Discontinuities in the value of this counter can occur
561              at re-initialization of the management system, and at
562              other times as indicated by the value of
563              'discontinuity-time'.";
564           reference
565             "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
566         }
567
568         leaf out-octets {
569           type yang:counter64;
570           description
571             "The total number of octets transmitted out of the
572              interface, including framing characters.
573
574              Discontinuities in the value of this counter can occur
575              at re-initialization of the management system, and at
576              other times as indicated by the value of
577              'discontinuity-time'.";
578           reference
579             "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
580         }
581
582         leaf out-unicast-pkts {
583           type yang:counter64;
584           description
585             "The total number of packets that higher-level protocols
586              requested be transmitted, and that were not addressed
587              to a multicast or broadcast address at this sub-layer,
588              including those that were discarded or not sent.
589
590              Discontinuities in the value of this counter can occur
591              at re-initialization of the management system, and at
592              other times as indicated by the value of
593              'discontinuity-time'.";
594           reference
595             "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
596         }
597
598         leaf out-broadcast-pkts {
599           type yang:counter64;
600           description
601             "The total number of packets that higher-level protocols
602              requested be transmitted, and that were addressed to a
603              broadcast address at this sub-layer, including those
604              that were discarded or not sent.
605
606              Discontinuities in the value of this counter can occur
607              at re-initialization of the management system, and at
608              other times as indicated by the value of
609              'discontinuity-time'.";
610           reference
611             "RFC 2863: The Interfaces Group MIB -
612                 ifHCOutBroadcastPkts";
613         }
614
615         leaf out-multicast-pkts {
616           type yang:counter64;
617           description
618             "The total number of packets that higher-level protocols
619              requested be transmitted, and that were addressed to a
620              multicast address at this sub-layer, including those
621              that were discarded or not sent.  For a MAC-layer
622              protocol, this includes both Group and Functional
623              addresses.
624
625              Discontinuities in the value of this counter can occur
626              at re-initialization of the management system, and at
627              other times as indicated by the value of
628              'discontinuity-time'.";
629           reference
630             "RFC 2863: The Interfaces Group MIB -
631                 ifHCOutMulticastPkts";
632         }
633
634         leaf out-discards {
635           type yang:counter32;
636           description
637             "The number of outbound packets that were chosen to be
638              discarded even though no errors had been detected to
639              prevent their being transmitted.  One possible reason
640              for discarding such a packet could be to free up buffer
641              space.
642
643              Discontinuities in the value of this counter can occur
644              at re-initialization of the management system, and at
645              other times as indicated by the value of
646              'discontinuity-time'.";
647           reference
648             "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
649         }
650
651         leaf out-errors {
652           type yang:counter32;
653           description
654             "For packet-oriented interfaces, the number of outbound
655              packets that could not be transmitted because of errors.
656              For character-oriented or fixed-length interfaces, the
657              number of outbound transmission units that could not be
658              transmitted because of errors.
659
660
661
662
663              Discontinuities in the value of this counter can occur
664              at re-initialization of the management system, and at
665              other times as indicated by the value of
666              'discontinuity-time'.";
667           reference
668             "RFC 2863: The Interfaces Group MIB - ifOutErrors";
669         }
670       }
671     }
672   }
673 }
674 </data>
675 </rpc-reply>