solved error on invalid cpu information

This commit is contained in:
lucio 2024-02-22 15:52:39 +01:00
parent 3c3ceb767e
commit d5af77590c
5 changed files with 24 additions and 13 deletions

View File

@ -13,7 +13,7 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

View File

@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=11

View File

@ -4,13 +4,17 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common.core</groupId>
<artifactId>legacy-is-publisher-connector</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>Legacy is publisher</name>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</developerConnection>
<url>https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</url>
</scm>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>

View File

@ -27,7 +27,7 @@ public class Registry {
public List<URI> getEndPoints(){
String scope=SecretManagerProvider.instance.get().getContext();
String scope=SecretManagerProvider.get().getContext();
endpoints=(List<URI>)cache.get(scope);
if(endpoints==null){

View File

@ -79,13 +79,17 @@ public class ContainerProfileBuilder {
Group<Processor> processors = node.profile().description().processors();
for (HashMap<String, String> map : info)
processors.add().bogomips(new BigDecimal(map.get("bogomips")))
.clockSpeedMhz(new BigDecimal(map.get("cpu_MHz"))).family(map.get("cpu_family"))
.modelName(map.get("model_name")).model(map.get("model")).vendor(map.get("vendor_id"))
.cacheL1(Integer.parseInt(map.get("cache_size"))).cacheL1D(0).cacheL1I(0).cacheL2(0);
for (HashMap<String, String> map : info) {
Processor processor = processors.add();
if (map.get("bogomips") != null) processor.bogomips(new BigDecimal(map.get("bogomips")));
if (map.get("cpu_MHz") != null) processor.clockSpeedMhz(new BigDecimal(map.get("cpu_MHz")));
processor.family(map.get("cpu_family")).modelName(map.get("model_name")).model(map.get("model")).vendor(map.get("vendor_id"));
if(map.get("cache_size") != null) processor.cacheL1(Integer.parseInt(map.get("cache_size")));
else processor.cacheL1(0);
processor.cacheL1D(0).cacheL1I(0).cacheL2(0);
}
addVariablesTo(node);
update(node);