From 5d3affcceb1ddc231764c4a3769a9911f4f4746c Mon Sep 17 00:00:00 2001 From: Alex Shatov Date: Thu, 1 Feb 2018 14:07:44 -0500 Subject: improved message structure for latest policies * unit test coverage 77% Change-Id: Iebe582bb20173a3f4689239f3a2d822edb48ccc1 Issue-ID: DCAEGEN2-249 Signed-off-by: Alex Shatov --- dcae-policy/dcaepolicyplugin/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dcae-policy/dcaepolicyplugin/tasks.py') diff --git a/dcae-policy/dcaepolicyplugin/tasks.py b/dcae-policy/dcaepolicyplugin/tasks.py index fef0850..6d383ce 100644 --- a/dcae-policy/dcaepolicyplugin/tasks.py +++ b/dcae-policy/dcaepolicyplugin/tasks.py @@ -38,6 +38,7 @@ POLICY_REQUIRED = 'policy_required' POLICY_BODY = 'policy_body' POLICIES_FILTERED = 'policies_filtered' POLICY_FILTER = 'policy_filter' +LATEST_POLICIES = "latest_policies" REQUEST_ID = "requestID" @@ -101,7 +102,7 @@ class PolicyHandler(object): return res.raise_for_status() - return res.json() + return res.json().get(LATEST_POLICIES) def _policy_get(): """ -- cgit 1.2.3-korg