Add new revision for pcep types model
[bgpcep.git] / pcep / ietf-stateful07 / src / main / yang / odl-pcep-stateful-stats.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module odl-pcep-stateful-stats {
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats";
5     prefix pspc;
6
7     import network-topology { prefix nt; revision-date 2013-10-21; }
8     import network-topology-pcep { prefix pn; revision-date 2018-11-09; }
9     import yang-ext { prefix ext; revision-date 2013-07-09; }
10     import pcep-session-stats { prefix pss; revision-date 2017-11-13; }
11     import network-pcep-topology-stats { prefix npts; revision-date 2018-11-09; }
12     import odl-pcep-sync-optimizations { prefix opso; revision-date 2018-11-09; }
13
14     description
15         "This module contains the PCEP Stateful stats YANG definitions for
16          PCEP Topology Node Stats.
17          Copyright (c)2017 AT&T Services, Inc. All rights reserved.;
18
19          This program and the accompanying materials are made available
20          under the terms of the Eclipse Public License v1.0 which
21          accompanies this distribution, and is available at
22          http://www.eclipse.org/legal/epl-v10.html";
23
24     organization "AT&T Services, Inc.";
25     contact "Claudio D. Gasparini <claudio.gasparini@pantheon.sk>";
26
27     revision "2018-11-09" {
28         description
29             "P2MP extension.";
30         reference "RFC8306";
31     }
32
33     revision "2017-11-13" {
34         description
35             "Initial revision.";
36     }
37
38     grouping stateful-messages-grouping {
39         description "The statistics of sent/received PCEP stateful messages.";
40         leaf last-received-rpt-msg-timestamp {
41             description "The timestamp of last received PCRpt message.";
42             type uint32;
43             default 0;
44         }
45
46         leaf received-rpt-msg-count {
47             description "The number of received PcRpt messages.";
48             type uint32;
49             default 0;
50         }
51
52         leaf sent-upd-msg-count {
53             description "The number of sent PCUpd messages.";
54             type uint32;
55             default 0;
56         }
57
58         leaf sent-init-msg-count {
59             description "The number of sent PCInitiate messages.";
60             type uint32;
61             default 0;
62         }
63     }
64
65     augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:messages" {
66         when "../../../nt:topology-types/pn:topology-pcep";
67         ext:augment-identifier stateful-messages-stats-aug;
68         description "Augment Pcep topology node with Stateful session stats";
69
70         uses stateful-messages-grouping;
71     }
72
73     grouping stateful-preferences {
74         leaf instantiation {
75             description "Represents peer's instantiation capability.";
76             type boolean;
77             default "false";
78         }
79
80         leaf stateful {
81             description "Represents peer's stateful/stateless capability.";
82             type boolean;
83             default "false";
84         }
85
86         leaf active {
87             description "Represents peer's LSP update capability.";
88             type boolean;
89             default "false";
90         }
91     }
92
93     augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:peer-capabilities" {
94         when "../../../nt:topology-types/pn:topology-pcep";
95         ext:augment-identifier stateful-capabilities-stats-aug;
96         description "Remote peer's (PCC) advertised stateful capabilities.";
97
98         uses stateful-preferences;
99     }
100
101     augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:local-pref" {
102         when "../../../nt:topology-types/pn:topology-pcep";
103         ext:augment-identifier pcep-entity-id-stats-aug;
104         description "PCEP Entity Identifier";
105
106         uses opso:speaker-entity-id;
107     }
108 }