f3420f2d9e69905088cb852c5274074001c8981b
[bgpcep.git] / bgp / bmp-impl / src / main / yang / odl-bmp-impl-cfg.yang
1 module odl-bmp-impl-cfg {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:bmp:impl";
4     prefix "bmp-impl";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import odl-bgp-rib-spi-cfg { prefix ribspi; revision-date 2013-11-15; }
8     import netty { prefix netty; revision-date 2013-11-19; }
9     import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
10     import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
11     import opendaylight-md-sal-dom {prefix sal; revision-date 2013-10-28; }
12     import rfc2385 { prefix rfc2385; revision-date 2016-03-24; }
13
14     organization "Cisco Systems, Inc.";
15
16     contact "Milos Fabian <milfabia@cisco.com>";
17
18     description
19         "This module contains the base YANG definitions for
20          BMP implementation.
21
22         Copyright (c)2015 Cisco Systems, Inc. All rights reserved.;
23
24         This program and the accompanying materials are made available
25         under the terms of the Eclipse Public License v1.0 which
26         accompanies this distribution, and is available at
27         http://www.eclipse.org/legal/epl-v10.html";
28
29     revision "2015-05-18" {
30         description
31             "Initial revision";
32     }
33
34     identity bmp-dispatcher {
35         description
36             "Service representing a BMP dispatcher service. The service
37              can create both BMP client sessions and BMP servers.";
38
39         base "config:service-type";
40         config:java-class "org.opendaylight.protocol.bmp.api.BmpDispatcher";
41         config:disable-osgi-service-registration;
42     }
43
44     identity bmp-dispatcher-impl {
45         base config:module-type;
46         config:provided-service bmp-dispatcher;
47         config:java-name-prefix BmpDispatcherImpl;
48     }
49
50     augment "/config:modules/config:module/config:configuration" {
51         case bmp-dispatcher-impl {
52             when "/config:modules/config:module/config:type = 'bmp-dispatcher-impl'";
53         }
54     }
55
56     identity bmp-monitor {
57         description
58             "Service representing a BMP monitoring service.";
59
60         base "config:service-type";
61         config:java-class "org.opendaylight.protocol.bmp.impl.spi.BmpMonitoringStation";
62     }
63
64     identity bmp-monitor-impl {
65         base config:module-type;
66         config:provided-service bmp-monitor;
67         config:java-name-prefix BmpMonitorImpl;
68     }
69
70     augment "/config:modules/config:module/config:configuration" {
71         case bmp-monitor-impl {
72             when "/config:modules/config:module/config:type = 'bmp-monitor-impl'";
73
74             container extensions {
75                 uses config:service-ref {
76                     refine type {
77                         mandatory true;
78                         config:required-identity ribspi:consumer-extensions;
79                     }
80                 }
81             }
82
83             container codec-tree-factory {
84                 uses config:service-ref {
85                     refine type {
86                         mandatory true;
87                         config:required-identity mdsb:binding-codec-tree-factory;
88                     }
89                 }
90             }
91
92             container dom-data-provider {
93                 uses config:service-ref {
94                     refine type {
95                         mandatory true;
96                         config:required-identity sal:dom-async-data-broker;
97                     }
98                 }
99             }
100
101             container bmp-dispatcher {
102                 uses config:service-ref {
103                     refine type {
104                         mandatory true;
105                         config:required-identity bmp-dispatcher;
106                     }
107                 }
108             }
109
110             leaf binding-address {
111                 type inet:ip-address;
112                 default "0.0.0.0";
113             }
114
115             leaf binding-port {
116                 type inet:port-number;
117                 mandatory true;
118             }
119
120             list monitored-router {
121                 leaf address {
122                     type inet:ip-address;
123                     mandatory true;
124                 }
125
126                 key "address";
127
128                 leaf active {
129                     type boolean;
130                     default false;
131                 }
132
133                 leaf port {
134                     type inet:port-number;
135                     mandatory false;
136                 }
137
138                 leaf password {
139                     type rfc2385:rfc2385-key;
140                     description "RFC2385 shared secret";
141                 }
142             }
143         }
144     }
145 }