From f144c7386aff063dc9f696cc2e1bbb393e9e3f93 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 18 Jun 2021 16:03:04 -0400 Subject: Add timestamp to Pdp records To support the case where multiple PAPs are running, added a timestamp to the PDP records so the PAPs can all be kept in sync as far as when a PDP was last responsive. Issue-ID: POLICY-2898 Change-Id: Ia7e0fd17363ff5827564cbc1537e516156b7f53a Signed-off-by: Jim Hahn --- .../src/test/resources/testdata/PdpGroups0.json | 5 ++-- .../test/resources/testdata/PdpGroups0Update.json | 14 +++++---- .../resources/testdata/PdpGroupsForFiltering.json | 33 ++++++++++++++-------- .../test/resources/testdata/PdpGroupsNoPDPs.json | 2 +- 4 files changed, 35 insertions(+), 19 deletions(-) (limited to 'models-pdp/src/test/resources') diff --git a/models-pdp/src/test/resources/testdata/PdpGroups0.json b/models-pdp/src/test/resources/testdata/PdpGroups0.json index 01e140cd8..be3d80086 100644 --- a/models-pdp/src/test/resources/testdata/PdpGroups0.json +++ b/models-pdp/src/test/resources/testdata/PdpGroups0.json @@ -32,11 +32,12 @@ "instanceId": "apex-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } ] } ] -} \ No newline at end of file +} diff --git a/models-pdp/src/test/resources/testdata/PdpGroups0Update.json b/models-pdp/src/test/resources/testdata/PdpGroups0Update.json index 05594fa47..06d0aeff0 100644 --- a/models-pdp/src/test/resources/testdata/PdpGroups0Update.json +++ b/models-pdp/src/test/resources/testdata/PdpGroups0Update.json @@ -32,19 +32,22 @@ "instanceId": "apex-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" }, { "instanceId": "apex-1", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" }, { "instanceId": "apex-2", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] }, @@ -72,11 +75,12 @@ "instanceId": "drools-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } ] } ] -} \ No newline at end of file +} diff --git a/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json b/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json index f1d4378fd..dfc8308b3 100644 --- a/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json +++ b/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json @@ -44,25 +44,29 @@ "instanceId": "apex-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" }, { "instanceId": "apex-1", "pdpState": "PASSIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" }, { "instanceId": "apex-2", "pdpState": "SAFE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" }, { "instanceId": "apex-3", "pdpState": "TEST", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } @@ -108,7 +112,8 @@ "instanceId": "apex-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } @@ -154,7 +159,8 @@ "instanceId": "apex-0", "pdpState": "SAFE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] }, @@ -182,7 +188,8 @@ "instanceId": "apex-0", "pdpState": "SAFE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } @@ -224,7 +231,8 @@ "instanceId": "apex-0", "pdpState": "PASSIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } @@ -262,7 +270,8 @@ "instanceId": "apex-0", "pdpState": "TEST", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] }, @@ -290,7 +299,8 @@ "instanceId": "apex-0", "pdpState": "PASSIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] }, @@ -318,7 +328,8 @@ "instanceId": "apex-0", "pdpState": "ACTIVE", "healthy": "NOT_HEALTHY", - "message": "message from PDP" + "message": "message from PDP", + "lastUpdate": "1970-01-01T00:00:00Z" } ] } diff --git a/models-pdp/src/test/resources/testdata/PdpGroupsNoPDPs.json b/models-pdp/src/test/resources/testdata/PdpGroupsNoPDPs.json index e37b6c5a6..eaeb30145 100644 --- a/models-pdp/src/test/resources/testdata/PdpGroupsNoPDPs.json +++ b/models-pdp/src/test/resources/testdata/PdpGroupsNoPDPs.json @@ -32,4 +32,4 @@ ] } ] -} \ No newline at end of file +} -- cgit 1.2.3-korg