added timestamp for statistics storage 77/32577/5
authorMatej Perina <matej.perina@pantheon.sk>
Thu, 14 Jan 2016 16:25:03 +0000 (17:25 +0100)
committerMatej Perina <matej.perina@pantheon.sk>
Thu, 14 Jan 2016 16:36:56 +0000 (16:36 +0000)
Change-Id: I4bf3e2e7ce4e1670f75dcecae7d7fd7a9dfebaa4
Signed-off-by: Matej Perina <matej.perina@pantheon.sk>
groupbasedpolicy/src/main/java/org/opendaylight/groupbasedpolicy/statistics/StatisticsManagerImpl.java
groupbasedpolicy/src/main/yang/model/statistics-store.yang
groupbasedpolicy/src/main/yang/model/statistics.yang

index 5e268fb074109ee45ce64c95bb5a6f118faa07ea..b89a76ceb1be6e3dc7a37c0b0198d0ab9e74713d 100644 (file)
@@ -103,6 +103,7 @@ public class StatisticsManagerImpl implements StatisticsManager, AutoCloseable {
                 }
                 statRecord = new StatisticRecordBuilder().setKey(key)
                     .setRecordId(new RecordId(recordKey))
+                    .setTimestamp(epStats.getTimestamp())
                     .setSrcEndpoint(srcBuilder.build())
                     .setDstEndpoint(dstBuilder.build())
                     .setStatistic(statisticList)
index e6690954813c954b96aa2bb4ed3d5fb876e6b01b..c243d693d9696c0b2328d08d5aaa13bb8f488dd5 100644 (file)
@@ -89,6 +89,12 @@ module statistics-store {
             leaf record-id {
                 type record-id;
             }
+            leaf timestamp {
+                type int64;
+                description
+                    "Date and time of record creation in milliseconds
+                        counting from 1.1.1970 00:00:00 UTC (= 0)";
+            }
             uses source-ep-fields;
             uses dst-ep-fields;
             list statistic {
index fbc804853c6dac4ef9803a8d4d1db82ebfa9bfd7..3882e19ca3070cb2485b194029171072dce8a04c 100644 (file)
@@ -57,6 +57,12 @@ module statistics {
                 leaf src-tenant {
                     type gbp-common:tenant-id;
                 }
+                leaf timestamp {
+                    type int64;
+                    description
+                        "Date and time of record creation in milliseconds
+                        counting from 1.1.1970 00:00:00 UTC (= 0)";
+                }
                 //////////////////
                 //Destination EP//
                 //////////////////