summaryrefslogtreecommitdiffstats
path: root/v3po/translate-utils/src/main/yang/translate-utils.yang
blob: 238528d56b159ccdca018df7b59356a53bb045c4 (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
module translate-utils {
    yang-version 1;
    namespace "urn:honeycomb:params:xml:ns:yang:translate:utils";
    prefix "tutils";

    import config { prefix config; revision-date 2013-04-05; }
    import translate-api { prefix tapi; revision-date 2016-04-06; }

    description
        "This module contains translation layer utilities";

    revision "2016-04-06" {
        description
            "Initial revision.";
    }

    identity delegating-reader-registry {
        base config:module-type;
        config:provided-service tapi:honeycomb-reader-registry;
        config:java-name-prefix DelegatingReaderRegistry;
    }

    augment "/config:modules/config:module/config:configuration" {
        case delegating-reader-registry {
            when "/config:modules/config:module/config:type = 'delegating-reader-registry'";

                list root-readers {
                    uses config:service-ref {
                        refine type {
                            mandatory true;
                            config:required-identity tapi:honeycomb-reader;
                        }
                    }
                }

        }
    }

    identity delegating-writer-registry {
        base config:module-type;
        config:provided-service tapi:honeycomb-writer-registry;
        config:java-name-prefix DelegatingWriterRegistry;
    }

    augment "/config:modules/config:module/config:configuration" {
        case delegating-writer-registry {
            when "/config:modules/config:module/config:type = 'delegating-writer-registry'";

                list root-writers {
                    uses config:service-ref {
                        refine type {
                            mandatory true;
                            config:required-identity tapi:honeycomb-writer;
                        }
                    }
                }

        }
    }

    identity noop-writer-registry {
        base config:module-type;
        config:provided-service tapi:honeycomb-writer-registry;
        config:java-name-prefix NoopWriterRegistry;
    }

    augment "/config:modules/config:module/config:configuration" {
        case noop-writer-registry {
            when "/config:modules/config:module/config:type = 'noop-writer-registry'";
        }
    }
}