use of org.jenkinsci.plugins.vsphere.VSphereGuestInfoProperty in project vsphere-cloud-plugin by jenkinsci.
the class vSphereCloudSlaveTemplate method calculateExtraConfigParameters.
private Map<String, String> calculateExtraConfigParameters(final String cloneName, final TaskListener listener) throws IOException, InterruptedException {
final EnvVars knownVariables = calculateVariablesForGuestInfo(cloneName, listener);
final Map<String, String> result = new LinkedHashMap<String, String>();
final String jenkinsUrl = Jenkins.getActiveInstance().getRootUrl();
if (jenkinsUrl != null) {
result.put(VSPHERE_ATTR_FOR_JENKINSURL, jenkinsUrl);
}
List<? extends VSphereGuestInfoProperty> guestInfoConfig = this.guestInfoProperties;
if (guestInfoConfig == null) {
guestInfoConfig = Collections.emptyList();
}
for (final VSphereGuestInfoProperty property : guestInfoConfig) {
final String name = property.getName();
final String configuredValue = property.getValue();
final String resolvedValue = Util.replaceMacro(configuredValue, knownVariables);
result.put("guestinfo." + name, resolvedValue);
}
return result;
}
Aggregations