ELAN FT Support for BE
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / interface-statistics.yang
1 module interface-statistics {
2     namespace "urn:opendaylight:vpnservice:interface:statistics";
3     prefix if-stats;
4
5     import ietf-interfaces {
6         prefix if;
7     }
8
9     revision "2015-08-24" {
10         description "YANG model describes rpc to retrieve the different ingress/egress statistics ie. packet/byte counts";
11     }
12
13      typedef result-code {
14         type enumeration {
15              enum not-found;
16              enum success;
17              enum incomplete;
18          }
19     }
20
21     grouping service-enitity-statistics {
22         leaf packet-tx-count {
23             type uint32;
24         }
25         leaf packet-rx-count {
26             type uint32;
27         }
28         leaf byte-tx-count {
29             type uint32;
30         }
31         leaf byte-rx-count {
32             type uint32;
33         }
34     }
35
36     grouping stat-reply {
37         leaf stat-result-code {
38             type result-code;
39         }
40         uses service-enitity-statistics;
41     }
42
43     rpc get-interface-statistics {
44         input {
45             leaf interface-name {
46                 type leafref {
47                     path "/if:interfaces/if:interface/if:name";
48                 }
49             }
50         }
51         output {
52             container stat-result {
53                 uses stat-reply;
54             }
55         }
56     }
57
58 }