summaryrefslogtreecommitdiffstats
path: root/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang
blob: d5852ebebbdbd5d9c8e4874f2991d9ce0e9c16f2 (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
module ${rootArtifactId} {

    yang-version 1;
    namespace "urn:opendaylight:params:xml:ns:yang:${rootArtifactId}";
    prefix "${rootArtifactId}";

    description
        "This YANG module defines the generic configuration and
        operational data for ${rootArtifactId} in VPP";

    revision "2016-09-18" {
        description "Initial revision of ${rootArtifactId} model";
    }

    container ${rootArtifactId} {
        uses ${rootArtifactId}-params;
        description "Configuration data of ${rootArtifactId} in Honeycomb";

        // READ
        // curl -u admin:admin http://localhost:8181/restconf/config/${rootArtifactId}:${rootArtifactId}

        // WRITE
        // curl http://localhost:8181/restconf/operational/${rootArtifactId}:${rootArtifactId}

    }

    container ${rootArtifactId}-state {
        config false;
        uses ${rootArtifactId}-params;
        description "Operational data of ${rootArtifactId} persisted in VPP";

        // READ
        // curl -u admin:admin  http://localhost:8181/restconf/operational/${rootArtifactId}:${rootArtifactId}-state
    }

    grouping ${rootArtifactId}-params {
        list element {

            key id;
            leaf id {
                type uint32;
            }

            leaf description {
                type string;
            }
        }
    }
}