consumer/provider restructure
[packetcable.git] / packetcable-provider / src / main / yang / packetcable-provider-impl.yang
1 module packetcable-provider-impl {
2
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:packetcable-provider:impl";
5     prefix "packetcable-provider-impl";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
9     import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
10     import ietf-inet-types {prefix inet;revision-date 2010-09-24;}
11
12     description
13         "This module contains the base YANG definitions for
14         packetcable-provider impl implementation.";
15
16     revision "2014-01-31" {
17         description
18             "Initial revision.";
19     }
20
21     // This is the definition of the service implementation as a module identity.
22     identity packetcable-provider-impl {
23             base config:module-type;
24             
25             // Specifies the prefix for generated java classes.
26             config:java-name-prefix PacketcableProvider;
27     }
28
29     // Augments the 'configuration' choice node under modules/module.
30     augment "/config:modules/config:module/config:configuration" {
31         case packetcable-provider-impl {
32             when "/config:modules/config:module/config:type = 'packetcable-provider-impl'";
33
34             container rpc-registry {
35                 uses config:service-ref {
36                     refine type {
37                         mandatory true;
38                         config:required-identity mdsal:binding-rpc-registry;
39                     }
40                 }
41             }
42
43             container notification-service {
44                 uses config:service-ref {
45                     refine type {
46                         mandatory true;
47                         config:required-identity mdsal:binding-notification-service;
48                     }
49                 }
50             }
51
52             container data-broker {
53                 uses config:service-ref {
54                     refine type {
55                         mandatory false;
56                         config:required-identity mdsal:binding-async-data-broker;
57                     }
58                 }
59             }
60         }
61     }
62
63     augment "/config:modules/config:module/config:state" {
64         case packetcable-provider-impl {
65             when "/config:modules/config:module/config:type = 'packetcable-provider-impl'";
66             
67             leaf connection-state {
68                 type boolean;
69             }
70             
71             rpcx:rpc-context-instance "close-cmts-connection-rpc";
72         }
73     }
74
75     identity close-cmts-connection-rpc;
76
77     rpc close-cmts-connection  {
78         description
79           "JMX call to close the cmts connection.";
80           
81         input {
82             uses rpcx:rpc-context-ref {
83                 refine context-instance {
84                     rpcx:rpc-context-instance close-cmts-connection-rpc;
85                 }
86             }
87         }
88     }
89 }