lib/chef/data_bag.rb
def save
      begin
        if Chef::Config[:why_run]
          Chef::Log.warn("In why-run mode, so NOT performing data bag save.")
        else
          create
        end
      rescue Net::HTTPServerException => e
        raise e unless e.response.code == "409"
      end
      self
    end
# Save the Data Bag via RESTful API
Save the Data Bag via RESTful API
Save the Data Bag via RESTful API
def save
      begin
        if Chef::Config[:why_run]
          Chef::Log.warn("In why-run mode, so NOT performing data bag save.")
        else
          create
        end
      rescue Net::HTTPServerException => e
        raise e unless e.response.code == "409"
      end
      self
    end
def save begin if Chef :: Config [ :why_run ] Chef :: Log . warn ( "In why-run mode, so NOT performing data bag save." ) else create end rescue Net :: HTTPServerException => e raise e unless e . response . code == "409" end self end
Save the Data Bag via RESTful API
Save the Data Bag via RESTful API