Example of adding parameters with config subsystem.
[groupbasedpolicy.git] / renderers / ofoverlay / src / main / yang / ofoverlay-provider-impl.yang
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 module ofoverlay-provider-impl {
10     yang-version 1;
11     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:ofoverlay-provider:impl";
12     prefix "ofoverlay-provider-impl";
13
14     import config { prefix config; revision-date 2013-04-05; }
15     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
16     import ietf-yang-types { prefix "yang"; revision-date 2010-09-24; }
17
18     description
19         "This module contains the base YANG definitions for 
20           ofoverlay-provider impl implementation.";
21
22     revision "2014-06-11" {
23         description
24             "Initial revision.";
25     }
26
27     identity ofoverlay-provider-impl {
28         base "config:module-type";
29
30         config:java-name-prefix OFOverlayProvider;
31     }
32
33     // Augments the 'configuration' choice node under modules/module.  
34     augment "/config:modules/config:module/config:configuration" {
35         case ofoverlay-provider-impl {
36             when "/config:modules/config:module/config:type = 'ofoverlay-provider-impl'";
37
38             //wires in the data-broker service 
39             container data-broker {
40                 uses config:service-ref {
41                     refine type {
42                         mandatory true;
43                         config:required-identity mdsal:binding-async-data-broker;
44                     }
45                 }
46             }
47             // RPC Registry
48             container rpc-registry {
49                 uses config:service-ref {
50                     refine type {
51                         mandatory true;
52                         config:required-identity mdsal:binding-rpc-registry;
53                     }
54                 }
55             }
56
57             leaf of-offset {
58                 type uint32;
59             }
60
61             leaf router-mac {
62                 type yang:mac-address;
63             }
64         }
65     }
66 }