BGPCEP-726: Introduce tunnel topology config
[bgpcep.git] / pcep / tunnel / tunnel-provider / src / main / yang / odl-pcep-tunnel-provider-cfg.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module odl-pcep-tunnel-provider-cfg {
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:tunnel:provider";
5     prefix "tun";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import odl-programming-spi-cfg { prefix pgmspi; revision-date 2013-11-15; }
9     import odl-pcep-topology-provider-cfg { prefix pceptopo; revision-date 2013-11-15; }
10     import odl-topology-api-cfg { prefix topo; revision-date 2013-11-15; }
11     import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
12     import network-topology { prefix nt; revision-date 2013-10-21; }
13     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
14
15     organization "Cisco Systems, Inc.";
16
17     contact "Robert Varga <rovarga@cisco.com>";
18
19     description
20         "This module contains the base YANG definitions for
21         PCEP tunnel topology provider service.
22
23         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
24
25         This program and the accompanying materials are made available
26         under the terms of the Eclipse Public License v1.0 which
27         accompanies this distribution, and is available at
28         http://www.eclipse.org/legal/epl-v10.html";
29
30     revision "2013-11-15" {
31         description
32             "Initial revision";
33     }
34
35     identity pcep-tunnel-topology-reference {
36         description
37             "Service representing a PCEP-enabled tunnel topology.";
38
39         base "config:service-type";
40         config:java-class "org.opendaylight.bgpcep.topology.TopologyReference";
41     }
42
43     identity pcep-tunnel-topology-provider {
44         base config:module-type;
45         config:provided-service pcep-tunnel-topology-reference;
46         config:java-name-prefix PCEPTunnelTopologyProvider;
47     }
48
49     augment "/config:modules/config:module/config:configuration" {
50         case pcep-tunnel-topology-provider {
51             when "/config:modules/config:module/config:type = 'pcep-tunnel-topology-provider'";
52
53             container data-provider {
54                 uses config:service-ref {
55                     refine type {
56                         mandatory true;
57                         config:required-identity mdsal:binding-async-data-broker;
58                     }
59                 }
60             }
61
62             container rpc-registry {
63                 uses config:service-ref {
64                     refine type {
65                         mandatory true;
66                         config:required-identity mdsal:binding-rpc-registry;
67                     }
68                 }
69             }
70
71             container scheduler {
72                 uses config:service-ref {
73                     refine type {
74                         mandatory true;
75                         config:required-identity pgmspi:instruction-scheduler;
76                     }
77                 }
78             }
79
80             container source-topology {
81                 uses config:service-ref {
82                     refine type {
83                         mandatory true;
84                         config:required-identity pceptopo:pcep-topology-reference;
85                     }
86                 }
87             }
88
89             leaf topology-id {
90                 type nt:topology-id;
91                 mandatory true;
92             }
93         }
94     }
95 }
96