Skip to content

Commit

Permalink
Machine allocation to a specific :private_vlan and :vlan. (#218)
Browse files Browse the repository at this point in the history
Using :private_vlan and :vlan are allowed even though those are not part of ::Fog::Compute::Softlayer::Server.attributes

Signed-off-by: Denis C. <dcorol@gmail.com>
  • Loading branch information
deniskin82 authored and JJ Asghar committed Aug 24, 2017
1 parent 19bf727 commit 31324be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/chef/provisioning/fog_driver/providers/softlayer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def create_many_servers(num_servers, bootstrap_options, parallelizer)
# options are passed directly to SoftLayer API and
# SoftLayer_Hardware_Server rejects requests with unrecognized
# options
opts.delete(:vlan) if opts[:vlan] && opts[:private_network_only]

opts.keep_if do |opt, val|
::Fog::Compute::Softlayer::Server.attributes.include?(opt)
::Fog::Compute::Softlayer::Server.attributes.include?(opt) || opt =~ /private_vlan|vlan/
end
# fog-softlayer defines :tags but SoftLayer_Hardware_Server rejects it...
#opts.delete :tags
Expand Down

0 comments on commit 31324be

Please sign in to comment.