6f166c0e03287bfae95524b3bdaa8543fe5f5496
[bgpcep.git] / pcep / impl / 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 odl-pcep-api-cfg { prefix pcep; revision-date 2013-04-09; }
9     import odl-pcep-spi-cfg { prefix spi; revision-date 2013-11-15; }
10     import netty { prefix netty; revision-date 2013-11-19; }
11     import odl-tcpmd5-netty-cfg { prefix tcpmd5; revision-date 2014-04-27; }
12
13     organization "Cisco Systems, Inc.";
14
15     contact "Robert Varga <rovarga@cisco.com>";
16
17     description
18         "This module contains the base YANG definitions for
19          PCEP implementation.
20
21         Copyright (c)2013 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 "2013-06-27" {
29         description
30             "Updated revision dates for imports.";
31     }
32
33     revision "2013-04-09" {
34         description
35             "Initial revision";
36     }
37
38     identity pcep-parser-base {
39         base config:module-type;
40         config:provided-service spi:extension;
41         config:java-name-prefix BasePCEPParser;
42     }
43
44     augment "/config:modules/config:module/config:configuration" {
45         case pcep-parser-base {
46             when "/config:modules/config:module/config:type = 'pcep-parser-base'";
47         }
48     }
49
50     identity pcep-dispatcher-impl {
51         base config:module-type;
52         config:provided-service pcep:pcep-dispatcher;
53         config:java-name-prefix PCEPDispatcherImpl;
54     }
55
56     augment "/config:modules/config:module/config:configuration" {
57         case pcep-dispatcher-impl {
58             when "/config:modules/config:module/config:type = 'pcep-dispatcher-impl'";
59
60             leaf max-unknown-messages {
61                 type uint16;
62                 default 5;
63             }
64
65             container pcep-extensions {
66                 uses config:service-ref {
67                     refine type {
68                         mandatory true;
69                         config:required-identity spi:consumer-extensions;
70                     }
71                 }
72             }
73
74             container pcep-session-proposal-factory {
75                 uses config:service-ref {
76                     refine type {
77                         mandatory true;
78                         config:required-identity pcep:pcep-session-proposal-factory;
79                     }
80                 }
81             }
82
83             container boss-group {
84                 uses config:service-ref {
85                     refine type {
86                         mandatory true;
87                         config:required-identity netty:netty-threadgroup;
88                     }
89                 }
90             }
91
92             container worker-group {
93                 uses config:service-ref {
94                     refine type {
95                         mandatory true;
96                         config:required-identity netty:netty-threadgroup;
97                     }
98                 }
99             }
100
101             container md5-channel-factory {
102                 uses config:service-ref {
103                     refine type {
104                         mandatory false;
105                         config:required-identity tcpmd5:md5-channel-factory;
106                     }
107                 }
108             }
109
110             container md5-server-channel-factory {
111                 uses config:service-ref {
112                     refine type {
113                         mandatory false;
114                         config:required-identity tcpmd5:md5-server-channel-factory;
115                     }
116                 }
117             }
118         }
119     }
120
121     identity pcep-session-proposal-factory-impl {
122         base config:module-type;
123         config:java-name-prefix "PCEPSessionProposalFactoryImpl";
124         config:provided-service pcep:pcep-session-proposal-factory;
125     }
126
127     augment "/config:modules/config:module/config:configuration" {
128         case pcep-session-proposal-factory-impl {
129             when "/config:modules/config:module/config:type = 'pcep-session-proposal-factory-impl'";
130
131             leaf dead-timer-value {
132                 type uint8;
133                 default 120;
134             }
135
136             leaf keep-alive-timer-value {
137                 type uint8;
138                 default 30;
139             }
140         }
141     }
142 }
143