From b7091047a9d3607cea0141570c52da9487762303 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Mon, 23 Apr 2018 10:03:14 +0200 Subject: Remove bad test Remove test that prevent publishing the policies Issue-ID: CLAMP-153 Change-Id: Ib974f9432ad29651a189b978ce6aa7da976ff5e0 Signed-off-by: Determe, Sebastien (sd378r) --- .../client/req/policy/OperationalPolicyReq.java | 34 ++++++++++------------ 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java index d3e8a541..891c7f84 100644 --- a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java +++ b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java @@ -80,8 +80,9 @@ public class OperationalPolicyReq { * @throws BuilderException * @throws UnsupportedEncodingException */ - public static Map> formatAttributes(ClampProperties refProp, ModelProperties prop, - String modelElementId, PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException { + public static Map> formatAttributes(ClampProperties refProp, + ModelProperties prop, String modelElementId, PolicyChain policyChain) + throws BuilderException, UnsupportedEncodingException { Global global = prop.getGlobal(); prop.setCurrentModelElementId(modelElementId); prop.setPolicyUniqueId(policyChain.getPolicyId()); @@ -91,23 +92,17 @@ public class OperationalPolicyReq { String controller = ""; Tca tca = prop.getType(Tca.class); if (tca != null && tca.isFound()) { - if (!global.getActionSet().equalsIgnoreCase("enbRecipe")) { - throw new BadRequestException( - "Operation Policy validation problem: action set is not selected properly."); - } - templateName = refProp.getStringValue("op.eNodeB.templateName", global.getService()); - operationTopic = refProp.getStringValue("op.eNodeB.operationTopic", global.getService()); - notificationTopic = refProp.getStringValue("op.eNodeB.notificationTopic", global.getService()); - controller = refProp.getStringValue("op.eNodeB.controller", global.getService()); - } else { - if (!global.getActionSet().equalsIgnoreCase("vnfRecipe")) { - throw new BadRequestException( - "Operation Policy validation problem: Action set is not selected properly."); + if (global.getActionSet().equalsIgnoreCase("enbRecipe")) { + templateName = refProp.getStringValue("op.eNodeB.templateName", global.getService()); + operationTopic = refProp.getStringValue("op.eNodeB.operationTopic", global.getService()); + notificationTopic = refProp.getStringValue("op.eNodeB.notificationTopic", global.getService()); + controller = refProp.getStringValue("op.eNodeB.controller", global.getService()); + } else { + templateName = refProp.getStringValue("op.templateName", global.getService()); + operationTopic = refProp.getStringValue("op.operationTopic", global.getService()); + notificationTopic = refProp.getStringValue("op.notificationTopic", global.getService()); + controller = refProp.getStringValue("op.controller", global.getService()); } - templateName = refProp.getStringValue("op.templateName", global.getService()); - operationTopic = refProp.getStringValue("op.operationTopic", global.getService()); - notificationTopic = refProp.getStringValue("op.notificationTopic", global.getService()); - controller = refProp.getStringValue("op.controller", global.getService()); } String recipeTopic = refProp.getStringValue("op.recipeTopic", global.getService()); // ruleAttributes @@ -329,7 +324,8 @@ public class OperationalPolicyReq { * @param inOrigList * @return */ - private static List addAOTSActorRecipe(ClampProperties refProp, String service, List inOrigList) { + private static List addAOTSActorRecipe(ClampProperties refProp, String service, + List inOrigList) { List outList = new ArrayList<>(); try { PolicyItem policyItem = inOrigList.get(0); -- cgit 1.2.3-korg