diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-23 10:03:14 +0200 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-23 10:03:14 +0200 |
commit | b7091047a9d3607cea0141570c52da9487762303 (patch) | |
tree | 51e902bb24f40be667f664d58e0507da66e144d2 | |
parent | ab284ec6e60c48eb9550c8fae16cc34ec9c3aeae (diff) |
Remove bad test
Remove test that prevent publishing the policies
Issue-ID: CLAMP-153
Change-Id: Ib974f9432ad29651a189b978ce6aa7da976ff5e0
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
-rw-r--r-- | src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java | 34 |
1 files changed, 15 insertions, 19 deletions
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<AttributeType, Map<String, String>> formatAttributes(ClampProperties refProp, ModelProperties prop, - String modelElementId, PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException { + public static Map<AttributeType, Map<String, String>> 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<PolicyItem> addAOTSActorRecipe(ClampProperties refProp, String service, List<PolicyItem> inOrigList) { + private static List<PolicyItem> addAOTSActorRecipe(ClampProperties refProp, String service, + List<PolicyItem> inOrigList) { List<PolicyItem> outList = new ArrayList<>(); try { PolicyItem policyItem = inOrigList.get(0); |