summaryrefslogtreecommitdiffstats
path: root/tools/lint/examples/sm-extension.yang
blob: 2214cf609c1cfbfd61a6e0d8054d033982ecdb4c (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
module sm-extension {
    yang-version 1.1;
    namespace "urn:sm-ext";
    prefix "sm-ext";

    import ietf-interfaces {
        prefix if;
    }
    import sm-mod {
        prefix sm-mod;
    }

    revision 2022-09-15 {
      description
        "initial";
      reference
        "";
    }

    list things {
        key "name";
        leaf name {
            type leafref {
              path "/if:interfaces/if:interface/if:name";
            }
        }
        leaf attribute {
            type uint32;
        }
    }

    augment "/if:interfaces/if:interface" {
        leaf thing-attribute {
            type leafref {
              path "/things/attribute";
            }
        }
    }
}