From f24c07ea3934eab9f7a35f7d0d193270e4a45915 Mon Sep 17 00:00:00 2001 From: Arun Suresh Date: Mon, 22 Jun 2015 15:56:22 -0400 Subject: [PATCH] [JENKINS-26083] Fix floating ip bug on openstack Previously, setting autoAssingFloatingIp option to true threw a NullPointerException. Calling the method shouldAutoAssignFloatingIp() fixes this problem. --- .../jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java b/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java index b3c24c78..6818e044 100644 --- a/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java +++ b/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java @@ -270,6 +270,7 @@ public NodeMetadata get() { if (assignFloatingIp && options instanceof NovaTemplateOptions) { LOGGER.info("Setting autoAssignFloatingIp to true"); options.as(NovaTemplateOptions.class).autoAssignFloatingIp(true); + options.as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(); } if (!Strings.isNullOrEmpty((keyPairName)) && options instanceof NovaTemplateOptions) {