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