diff options
author | Ravi Mantena <rx908f@att.com> | 2020-12-21 11:31:55 -0500 |
---|---|---|
committer | Ravi Mantena <rx908f@att.com> | 2020-12-21 11:32:34 -0500 |
commit | a520d00e005db1b232b9dae0c70d4dc5d73b33e1 (patch) | |
tree | 9c0e16ce5fab9bc12da138c4d8c613bcff54516b /mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java | |
parent | 2f551ba584dbb70568a69144b39e6da7c55c517f (diff) |
BpGen refactor Code Quality Issue-ID: DCAEGEN2-2502
Issue-ID: DCAEGEN2-2502
Change-Id: If6e08f0bb88c9039fb27898d50d2645f79175ba4
Signed-off-by: Ravi Mantena <rx908f@att.com>
Diffstat (limited to 'mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java')
-rw-r--r-- | mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java b/mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java index 7b03372..a3a9c97 100644 --- a/mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java +++ b/mod/bpgenerator/onap/src/main/java/org/onap/blueprintgenerator/service/common/ResourceConfigService.java @@ -37,26 +37,32 @@ import java.util.TreeMap; /** * @author : Ravi Mantena - * @date 10/16/2020 - * Application: ONAP - Blueprint Generator - * Common ONAP Service used by ONAP and DMAAP Blueprint to add ResourceConfig + * @date 10/16/2020 Application: ONAP - Blueprint Generator Common ONAP Service to add + * ResourceConfig */ - - @Service("onapResourceConfigService") public class ResourceConfigService { @Autowired private BlueprintHelperService blueprintHelperService; - //Method to create Resouce Config for properties - public Map<String,Object> createResourceConfig(Map<String, LinkedHashMap<String, Object>> inputs, String name){ - Map<String,Object> response = new HashMap<>(); + /** + * Creates Resouce Config for properties + * + * @param inputs Inputs + * @param name Name + * @return + */ + public Map<String, Object> createResourceConfig( + Map<String, LinkedHashMap<String, Object>> inputs, String name) { + Map<String, Object> response = new HashMap<>(); ResourceConfig resourceConfig = new ResourceConfig(); - LinkedHashMap<String, Object> memoryLimit = blueprintHelperService.createStringInput(Constants.MEMORY_LIMIT_128Mi); + LinkedHashMap<String, Object> memoryLimit = + blueprintHelperService.createStringInput(Constants.MEMORY_LIMIT_128Mi); - LinkedHashMap<String, Object> cpuLimit = blueprintHelperService.createStringInput( Constants.CPU_LIMIT_250m); + LinkedHashMap<String, Object> cpuLimit = + blueprintHelperService.createStringInput(Constants.CPU_LIMIT_250m); name = blueprintHelperService.getNamePrefix(name); @@ -94,5 +100,4 @@ public class ResourceConfigService { response.put("inputs", inputs); return response; } - } |