ELAN FT Support for BE
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / interface-statistics.yang
diff --git a/interfacemgr/interfacemgr-api/src/main/yang/interface-statistics.yang b/interfacemgr/interfacemgr-api/src/main/yang/interface-statistics.yang
new file mode 100644 (file)
index 0000000..9b4c856
--- /dev/null
@@ -0,0 +1,58 @@
+module interface-statistics {
+    namespace "urn:opendaylight:vpnservice:interface:statistics";
+    prefix if-stats;
+
+    import ietf-interfaces {
+        prefix if;
+    }
+
+    revision "2015-08-24" {
+        description "YANG model describes rpc to retrieve the different ingress/egress statistics ie. packet/byte counts";
+    }
+
+     typedef result-code {
+        type enumeration {
+             enum not-found;
+             enum success;
+             enum incomplete;
+         }
+    }
+
+    grouping service-enitity-statistics {
+        leaf packet-tx-count {
+            type uint32;
+        }
+        leaf packet-rx-count {
+            type uint32;
+        }
+        leaf byte-tx-count {
+            type uint32;
+        }
+        leaf byte-rx-count {
+            type uint32;
+        }
+    }
+
+    grouping stat-reply {
+        leaf stat-result-code {
+            type result-code;
+        }
+        uses service-enitity-statistics;
+    }
+
+    rpc get-interface-statistics {
+        input {
+            leaf interface-name {
+                type leafref {
+                    path "/if:interfaces/if:interface/if:name";
+                }
+            }
+        }
+        output {
+            container stat-result {
+                uses stat-reply;
+            }
+        }
+    }
+
+}