summaryrefslogtreecommitdiffstats
path: root/infra/notification/impl/src/main/yang/notification-impl.yang
blob: 84899751c43dac1b8ff637295501775119ab747c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
module notification-impl {
    yang-version 1;
    namespace "urn:honeycomb:params:xml:ns:yang:notification:impl";
    prefix "hc-notif-i";

    import config { prefix config; revision-date 2013-04-05; }
    import netconf-northbound-notification { prefix notify-api; revision-date 2015-08-06; }
    import notification-api { prefix hc-notif-a; revision-date 2016-06-01; }
    import opendaylight-md-sal-dom { prefix dom; revision-date 2013-10-28;}
    import opendaylight-sal-binding-broker-impl { prefix binding-impl; revision-date 2013-10-28;}

    description
        "Module definition for honeycomb notification implementations";

    revision "2016-06-01" {
        description
            "Initial revision";
    }

    identity honeycomb-notification-manager {
        base config:module-type;
        config:java-name-prefix HoneycombNotificationManager;
        config:provided-service hc-notif-a:honeycomb-notification-collector;
    }

    augment "/config:modules/config:module/config:configuration" {
        case honeycomb-notification-manager {
            when "/config:modules/config:module/config:type = 'honeycomb-notification-manager'";

            container runtime-mapping-codec {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity binding-impl:binding-dom-mapping-service;
                    }
                }
            }

            container dom-notification-service {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity hc-notif-a:dom-notification-service;
                    }
                }
            }

            list notification-producers {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity hc-notif-a:honeycomb-notification-producer;
                    }
                }
            }

        }
    }

    identity honeycomb-dom-notification-service {
        base config:module-type;
        config:provided-service hc-notif-a:dom-notification-service;
    }

    augment "/config:modules/config:module/config:configuration" {
        case honeycomb-dom-notification-service {
            when "/config:modules/config:module/config:type = 'honeycomb-dom-notification-service'";

            leaf queue-depth {
                type uint16;
                description "Size of the queue for outgoing notifications";
            }
        }
    }

    identity honeycomb-notification-to-netconf-translator {
        base config:module-type;
        config:java-name-prefix HoneycombNotificationToNetconfTranslator;
    }

    augment "/config:modules/config:module/config:configuration" {
        case honeycomb-notification-to-netconf-translator {
            when "/config:modules/config:module/config:type = 'honeycomb-notification-to-netconf-translator'";

            container netconf-notification-collector {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity notify-api:netconf-notification-collector;
                    }
                }
            }
            container honeycomb-notification-collector {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity hc-notif-a:honeycomb-notification-collector;
                    }
                }
            }
            container netconf-notification-registry {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity notify-api:netconf-notification-registry;
                    }
                }
            }
            container schema-service {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity dom:schema-service;
                    }
                }
            }
            container dom-notification-service {
                uses config:service-ref {
                    refine type {
                        mandatory true;
                        config:required-identity hc-notif-a:dom-notification-service;
                    }
                }
            }

            leaf netconf-stream-name {
                type string;
                mandatory true;
                description "Name of the stream under which all the registered notifications should be emitted";
            }

            leaf netconf-stream-description {
                type string;
                mandatory true;
                description "Description for the stream under which all the registered notifications should be emitted";
            }

        }
    }

}