Clean up ShortestPathFirst
[bgpcep.git] / pcep / ietf-stateful / src / main / yang / odl-pcep-sync-optimizations.yang
1 module odl-pcep-sync-optimizations {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:sync:optimizations";
4     prefix "sync-optimizations";
5
6     import pcep-types { prefix pcep; revision-date 2018-11-09; }
7     import pcep-message { prefix msg; revision-date 2018-11-09; }
8     import network-topology { prefix nt; revision-date 2013-10-21; }
9     import network-topology-pcep { prefix topo; revision-date 2022-07-30; }
10     import odl-pcep-ietf-stateful { prefix stateful; revision-date 2020-07-20; }
11     import yang-ext { prefix ext; }
12
13     organization "Pantheon Technologies";
14     contact "Iveta Halanova <iveta.halanova@pantheon.sk>";
15
16     description
17         "This module contains the data model of PCEP extensions defined
18         in RFC8232: 'Optimizations of Label Switched Path State Synchronization
19         Procedures for a Stateful PCE'.
20
21         Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
22
23         This program and the accompanying materials are made available
24         under the terms of the Eclipse Public License v1.0 which
25         accompanies this distribution, and is available at
26         http://www.eclipse.org/legal/epl-v10.html";
27
28     revision "2020-07-20" {
29         description "Update to Path State Synchronization Procedures RFC";
30         reference "RFC8232: https://tools.ietf.org/html/rfc8232";
31     }
32
33     revision "2018-11-09" {
34         description
35             "P2MP extension.";
36         reference "RFC8306";
37     }
38
39     revision 2017-10-25 {
40         description "Update network-topology-pcep revision";
41     }
42
43     revision "2015-07-14" {
44         description
45             "Initial revision.";
46         reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-sync-optimizations-02";
47     }
48
49     grouping sync-optimizations-capability-tlv {
50         reference "http://tools.ietf.org/html/rfc8232#section-4.1";
51         leaf triggered-initial-sync {
52             type boolean;
53             default false;
54         }
55         leaf delta-lsp-sync-capability {
56             type boolean;
57             default false;
58         }
59         leaf triggered-resync {
60             type boolean;
61             default false;
62         }
63         leaf include-db-version {
64             type boolean;
65             default false;
66         }
67     }
68
69     grouping lsp-db-version-tlv {
70         container lsp-db-version {
71             uses pcep:tlv;
72             leaf lsp-db-version-value {
73                 type uint64;
74             }
75         }
76     }
77
78     grouping speaker-entity-id {
79         leaf speaker-entity-id-value {
80             type binary;
81         }
82     }
83
84     grouping speaker-entity-id-tlv {
85         container speaker-entity-id {
86             uses pcep:tlv;
87             uses speaker-entity-id;
88         }
89     }
90
91     augment "/msg:open/msg:open-message/msg:open/msg:tlvs/stateful:stateful" {
92         uses sync-optimizations-capability-tlv;
93     }
94
95     augment "/msg:open/msg:open-message/msg:open/msg:tlvs" {
96         ext:augment-identifier tlvs3;
97         uses lsp-db-version-tlv;
98         uses speaker-entity-id-tlv;
99     }
100
101     augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" {
102         ext:augment-identifier tlvs4;
103         uses lsp-db-version-tlv;
104         uses speaker-entity-id-tlv;
105     }
106
107     augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client" {
108         uses lsp-db-version-tlv;
109     }
110
111     augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path/stateful:lsp/stateful:tlvs" {
112         ext:augment-identifier tlvs2;
113         uses lsp-db-version-tlv;
114     }
115
116     augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv/stateful:stateful" {
117         uses sync-optimizations-capability-tlv;
118     }
119
120     augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:lsp/stateful:tlvs" {
121         ext:augment-identifier tlvs5;
122         uses lsp-db-version-tlv;
123     }
124
125     augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:lsp/stateful:tlvs" {
126         ext:augment-identifier tlvs6;
127         uses lsp-db-version-tlv;
128     }
129
130     augment "/topo:add-lsp/topo:input/topo:arguments/stateful:lsp/stateful:tlvs" {
131         ext:augment-identifier tlvs1;
132         uses lsp-db-version-tlv;
133     }
134
135     augment "/topo:update-lsp/topo:input/topo:arguments/stateful:lsp/stateful:tlvs" {
136         ext:augment-identifier tlvs7;
137         uses lsp-db-version-tlv;
138     }
139 }