From 393e00b78140a27232d961fcdae70b99af2cdbbe Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Wed, 29 Jan 2020 09:50:33 +0000 Subject: Remove content section from ToscaPolicy properties in APEX Currently APEX specific information is placed under properties|content in ToscaPolicy. Avoid keeping under "content" and keep the information directly under properties. Change-Id: Ic437271c9a2d71104013b5568af5525df4a4bb56 Issue-ID: POLICY-2332 Signed-off-by: a.sreekumar --- .../onap/policy/apex/services/onappf/comm/TestListenerUtils.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'services/services-onappf/src/test/java/org') diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestListenerUtils.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestListenerUtils.java index 78d9d769b..21d0137f3 100644 --- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestListenerUtils.java +++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestListenerUtils.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019-2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,8 +71,10 @@ public class TestListenerUtils { toscaPolicy.setVersion(policyVersion); toscaPolicy.setName(policyName); final Map propertiesMap = new LinkedHashMap<>(); - Object properties = new StandardCoder().decode(new File(policyFilePath), JsonObject.class); - propertiesMap.put("content", properties); + JsonObject properties = new StandardCoder().decode(new File(policyFilePath), JsonObject.class); + properties.entrySet().forEach(entry -> { + propertiesMap.put(entry.getKey(), entry.getValue()); + }); toscaPolicy.setProperties(propertiesMap); return toscaPolicy; } -- cgit 1.2.3-korg