Skip to content

Commit

Permalink
Implemented review comments related to metadata option
Browse files Browse the repository at this point in the history
  • Loading branch information
ameyavarade committed May 29, 2014
1 parent d505801 commit 10b4082
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/chef/knife/cloud/openstack_server_create_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ def self.included(includer)
:default => true,
:description => "Use first available network for bootstrapping if 'public' and 'private' are unavailable."

md = {}
option :metadata,
:short => "-M X=1",
:long => "--metadata X=1",
:description => "Metadata information for this server (may pass multiple times)",
:proc => Proc.new { |data| md.merge!({data.split('=')[0]=>data.split('=')[1]}) }
:proc => Proc.new { |data| Chef::Config[:knife][:metadata] ||= {}; Chef::Config[:knife][:metadata].merge!({data.split('=')[0]=>data.split('=')[1]})}
end
end
end
Expand Down

0 comments on commit 10b4082

Please sign in to comment.