Fixed small bugs in PCEP. Adjusted configuration.
[bgpcep.git] / pcep / impl-config / src / main / yang / odl-pcep-impl-cfg.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module odl-pcep-impl-cfg {
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:impl";
5     prefix "pcep-impl";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import pcep { prefix pcep; revision-date 2013-04-09; }
9     import config-pcep-spi { prefix spi; revision-date 2013-11-15; }
10     import netty { prefix netty; revision-date 2013-11-19; }
11
12     organization "Cisco Systems, Inc.";
13
14     contact "Robert Varga <rovarga@cisco.com>";
15
16     description
17         "This module contains the base YANG definitions for
18          PCEP implementation.
19
20         Copyright (c)2013 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 "2013-06-27" {
28         description
29             "Updated revision dates for imports.";
30     }
31
32     revision "2013-04-09" {
33         description
34             "Initial revision";
35     }
36
37     identity pcep-parser-base {
38         base config:module-type;
39         config:provided-service spi:extension;
40         config:java-name-prefix BasePCEPParser;
41     }
42
43     augment "/config:modules/config:module/config:configuration" {
44         case pcep-parser-base {
45             when "/config:modules/config:module/config:type = 'pcep-parser-base'";
46         }
47     }
48
49     identity pcep-parser-ietf-stateful07 {
50         base config:module-type;
51         config:provided-service spi:extension;
52        config:java-name-prefix IetfStateful07PCEPParser;
53     }
54
55     augment "/config:modules/config:module/config:configuration" {
56         case pcep-parser-ietf-stateful07 {
57             when "/config:modules/config:module/config:type = 'pcep-parser-ietf-stateful07'";
58         }
59     }
60
61         identity pcep-parser-ietf-initiated00 {
62                 base config:module-type;
63         config:provided-service spi:extension;
64         config:java-name-prefix IetfInitiated00PCEPParser;
65     }
66
67     augment "/config:modules/config:module/config:configuration" {
68         case pcep-parser-ietf-initiated00 {
69             when "/config:modules/config:module/config:type = 'pcep-parser-ietf-initiated00'";
70             }
71     }
72
73     identity pcep-parser-ietf-stateful02 {
74         base config:module-type;
75         config:provided-service spi:extension;
76         config:java-name-prefix IetfStateful02PCEPParser;
77     }
78
79     augment "/config:modules/config:module/config:configuration" {
80         case pcep-parser-ietf-stateful02 {
81             when "/config:modules/config:module/config:type = 'pcep-parser-ietf-stateful02'";
82         }
83     }
84
85         identity pcep-parser-crabbe-initiated00 {
86                 base config:module-type;
87         config:provided-service spi:extension;
88         config:java-name-prefix CrabbeInitiated00PCEPParser;
89     }
90
91     augment "/config:modules/config:module/config:configuration" {
92         case pcep-parser-crabbe-initiated00 {
93             when "/config:modules/config:module/config:type = 'pcep-parser-crabbe-initiated00'";
94         }
95     }
96
97     identity pcep-dispatcher-impl {
98         base config:module-type;
99         config:provided-service pcep:pcep-dispatcher;
100         config:java-name-prefix PCEPDispatcherImpl;
101     }
102
103     augment "/config:modules/config:module/config:configuration" {
104         case pcep-dispatcher-impl {
105             when "/config:modules/config:module/config:type = 'pcep-dispatcher-impl'";
106
107             leaf max-unknown-messages {
108                 type uint16;
109                 default 5;
110             }
111
112             container pcep-extensions {
113                 uses config:service-ref {
114                     refine type {
115                         mandatory true;
116                         config:required-identity spi:consumer-extensions;
117                     }
118                 }
119             }
120
121             container pcep-session-proposal-factory {
122                 uses config:service-ref {
123                     refine type {
124                         mandatory true;
125                         config:required-identity pcep:pcep-session-proposal-factory;
126                     }
127                 }
128             }
129
130             container boss-group {
131                 uses config:service-ref {
132                     refine type {
133                         mandatory true;
134                         config:required-identity netty:netty-threadgroup;
135                     }
136                 }
137             }
138
139             container worker-group {
140                 uses config:service-ref {
141                     refine type {
142                         mandatory true;
143                         config:required-identity netty:netty-threadgroup;
144                     }
145                 }
146             }
147
148             container timer {
149                 uses config:service-ref {
150                     refine type {
151                         mandatory true;
152                         config:required-identity netty:netty-timer;
153                     }
154                 }
155             }
156         }
157     }
158
159     identity pcep-session-proposal-factory-impl {
160         base config:module-type;
161         config:java-name-prefix "PCEPSessionProposalFactoryImpl";
162         config:provided-service pcep:pcep-session-proposal-factory;
163     }
164
165     augment "/config:modules/config:module/config:configuration" {
166         case pcep-session-proposal-factory-impl {
167             when "/config:modules/config:module/config:type = 'pcep-session-proposal-factory-impl'";
168
169             leaf dead-timer-value {
170                 type uint16;
171                 default 120;
172             }
173
174             leaf keep-alive-timer-value {
175                 type uint16;
176                 default 30;
177             }
178
179             leaf initiated {
180                 type boolean;
181                 default true;
182             }
183
184             leaf stateful {
185                 type boolean;
186                 default true;
187             }
188
189             leaf active {
190                 type boolean;
191                 default true;
192             }
193
194             leaf versioned {
195                 type boolean;
196                 default false;
197             }
198         }
199     }
200 }
201