mirror of
https://github.com/apache/jclouds.git
synced 2025-02-17 15:35:44 +00:00
Issue 191: gae doesn't have os.version
This commit is contained in:
parent
b1b0e062e4
commit
ee2679346f
@ -70,18 +70,20 @@ public class WhiteListCompliantJVM implements Supplier<Map<String, JsonBall>> {
|
|||||||
while (nowBuilder.lastIndexOf("0") != -1 && nowBuilder.lastIndexOf("0") == nowBuilder.length() - 1)
|
while (nowBuilder.lastIndexOf("0") != -1 && nowBuilder.lastIndexOf("0") == nowBuilder.length() - 1)
|
||||||
nowBuilder.deleteCharAt(nowBuilder.length() - 1);
|
nowBuilder.deleteCharAt(nowBuilder.length() - 1);
|
||||||
now = nowBuilder.toString();
|
now = nowBuilder.toString();
|
||||||
|
|
||||||
returnVal.put("ohai_time", new JsonBall(now));
|
returnVal.put("ohai_time", new JsonBall(now));
|
||||||
|
|
||||||
returnVal.put("java", new JsonBall(json.toJson(systemProperties)));
|
returnVal.put("java", new JsonBall(json.toJson(systemProperties)));
|
||||||
|
|
||||||
String platform = systemProperties.getProperty("os.name");
|
String platform = systemProperties.getProperty("os.name");
|
||||||
platform = platform.replaceAll("[ -]", "").toLowerCase();
|
platform = platform.replaceAll("[ -]", "").toLowerCase();
|
||||||
|
|
||||||
returnVal.put("platform", new JsonBall(platform));
|
returnVal.put("platform", new JsonBall(platform));
|
||||||
returnVal.put("platform_version", new JsonBall(systemProperties.getProperty("os.version")));
|
|
||||||
|
|
||||||
returnVal.put("ohai_time", new JsonBall(now));
|
if (systemProperties.getProperty("os.version") != null)
|
||||||
returnVal.put("current_user", new JsonBall(systemProperties.getProperty("user.name")));
|
returnVal.put("platform_version", new JsonBall(systemProperties.getProperty("os.version")));
|
||||||
|
|
||||||
|
if (systemProperties.getProperty("user.name") != null)
|
||||||
|
returnVal.put("current_user", new JsonBall(systemProperties.getProperty("user.name")));
|
||||||
return returnVal;
|
return returnVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user