lib/chef/knife/openstack_server_create.rb in knife-openstack-2.1.1 vs lib/chef/knife/openstack_server_create.rb in knife-openstack-2.1.7
- old
+ new
@@ -17,14 +17,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require "chef/knife/cloud/server/create_command"
-require "chef/knife/openstack_helpers"
-require "chef/knife/cloud/openstack_server_create_options"
-require "chef/knife/cloud/openstack_service"
-require "chef/knife/cloud/openstack_service_options"
+require_relative "openstack_helpers"
+require_relative "cloud/openstack_server_create_options"
+require_relative "cloud/openstack_service"
+require_relative "cloud/openstack_service_options"
require "chef/knife/cloud/exceptions"
class Chef
class Knife
class Cloud
@@ -201,9 +201,10 @@
return true if address == "-1" # no floating IP requested
addresses = service.connection.addresses
return false if addresses.empty? # no floating IPs
+
# floating requested without value
if address.nil?
if addresses.find_index { |a| a.fixed_ip.nil? }
return true
else