summaryrefslogtreecommitdiffstats
path: root/samples/interfaces/models/src/main/yang/openconfig-interfaces-notification.yang
blob: 456fab4df09260f72860924ea2e9edef4c683c0a (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
module sample-interfaces {

  namespace "io:fd:honeycomb:samples:interfaces";

  prefix "hc-s-if";

  description "Sample interface model";

  revision "2016-08-10" {
    description "Initial revision";
  }

  typedef interface-id {
    type string;
  }

  grouping interface-common {
    leaf interface-id {
        type interface-id;
    }

    leaf mtu {
        type uint16;
    }
  }

  grouping interface-state {
    container counters {
        leaf total-packets {
            type uint32;
        }
        leaf dropped-packets {
            type uint32;
        }
    }
  }

  container interfaces {
    list interface {
        key "interface-id";
        uses interface-common;
    }
  }

  container interfaces-state {
    config false;

    list interface {
        key "interface-id";
        uses interface-common;
        uses interface-state;
    }
  }

  notification interface-up {
    leaf interface-id {
        type interface-id;
    }
  }
}