* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
- * * ================================================================================
- * * Modifications Copyright (c) 2021 Nokia
+ * * Copyright (c) 2021 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.
public static final String EMPTY_VALUE = "";
public static final String DCAE_NODES_CONTAINERIZED_SERVICE_COMPONENT_USING_DMAAP =
"dcae.nodes.ContainerizedServiceComponentUsingDmaap";
- public static final String MEMORY_LIMIT_128Mi = "128Mi";
- public static final String CPU_LIMIT_250m = "250m";
public static final String CPU_LIMIT = "cpu_limit";
public static final String MEMORY_LIMIT = "memory_limit";
public static final String CPU_REQUEST = "cpu_request";
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 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.
import org.onap.blueprintgenerator.model.common.ResourceConfig;
import org.onap.blueprintgenerator.service.base.BlueprintHelperService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@Autowired
private BlueprintHelperService blueprintHelperService;
+ @Value("${resources.cpuLimit}")
+ private String defaultCpuLimit;
+
+ @Value("${resources.memoryLimit}")
+ private String defaultMemoryLimit;
+
/**
* Creates Resouce Config for properties
*
ResourceConfig resourceConfig = new ResourceConfig();
LinkedHashMap<String, Object> memoryLimit =
- blueprintHelperService.createStringInput(Constants.MEMORY_LIMIT_128Mi);
+ blueprintHelperService.createStringInput(defaultMemoryLimit);
LinkedHashMap<String, Object> cpuLimit =
- blueprintHelperService.createStringInput(Constants.CPU_LIMIT_250m);
+ blueprintHelperService.createStringInput(defaultCpuLimit);
name = blueprintHelperService.getNamePrefix(name);