From bc2e6287569ed6a848acf31b26097f54934baf9b Mon Sep 17 00:00:00 2001 From: kjaniak Date: Fri, 26 Jun 2020 12:56:51 +0200 Subject: Add factories for Ext tls parameters Code cleanup, renames Issue-ID: DCAEGEN2-2251 Change-Id: Ibf36780473480210bea1c76d117b28c71831487a Signed-off-by: kjaniak Signed-off-by: Tomasz Wrobel --- .../onap/blueprintgenerator/core/PolicyNodeBuilder.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/PolicyNodeBuilder.java') diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/PolicyNodeBuilder.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/PolicyNodeBuilder.java index a947ab7..1c3713b 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/PolicyNodeBuilder.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/core/PolicyNodeBuilder.java @@ -1,7 +1,8 @@ -/**============LICENSE_START======================================================= +/*============LICENSE_START======================================================= org.onap.dcae ================================================================================ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. + Copyright (c) 2020 Nokia. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -36,9 +37,10 @@ public class PolicyNodeBuilder { private static final String POLICY_NODE_TYPE = "clamp.nodes.policy"; private static final String POLICY_RELATIONSHIP_TYPE = "cloudify.relationships.depends_on"; - public static void addPolicyNodesAndInputs(ComponentSpec cs, TreeMap nodeTemplate, TreeMap> inps) { + public static void addPolicyNodesAndInputs(ComponentSpec cs, TreeMap nodeTemplate, + TreeMap> inps) { List policyList = cs.getPolicyInfo().getTypePolicyList(); - for(TypePolicy policy: policyList){ + for (TypePolicy policy : policyList) { addPolicyNodesToNodeTemplate(policy, nodeTemplate); addPolicyInputs(policy, inps); } @@ -54,7 +56,7 @@ public class PolicyNodeBuilder { inputValueMap.put("type", type); inputValueMap.put("description", description); inputValueMap.put("default", defaultValue); - return inputValueMap; + return inputValueMap; } private static void addPolicyNodesToNodeTemplate(TypePolicy policy, TreeMap nodeTemplate) { @@ -68,7 +70,7 @@ public class PolicyNodeBuilder { PolicyNodeProperties policyNodeProperties = new PolicyNodeProperties(); GetInput policyIdGetInput = new GetInput(); - policyIdGetInput.setGet_input(policy.getNode_label() + "_policy_id"); + policyIdGetInput.setBpInputName(policy.getNode_label() + "_policy_id"); policyNodeProperties.setPolicyId(policyIdGetInput); policyNodeProperties.setPolicyModelId(policy.getPolicy_model_id()); @@ -79,7 +81,7 @@ public class PolicyNodeBuilder { public static ArrayList> getPolicyRelationships(ComponentSpec cs) { ArrayList> relationships = new ArrayList<>(); List policyList = cs.getPolicyInfo().getTypePolicyList(); - for(TypePolicy policy: policyList){ + for (TypePolicy policy : policyList) { LinkedHashMap relationship = new LinkedHashMap<>(); relationship.put("type", POLICY_RELATIONSHIP_TYPE); relationship.put("target", policy.getNode_label()); -- cgit 1.2.3-korg