libraries/resource_provider.rb
# Creates the OneView resource only if it doesn't exist
# @param [Symbol] method Create or add method
# @return [TrueClass, FalseClass] Returns true if the resource was created/added
Creates the OneView resource only if it doesn't exist
Creates the OneView resource only if it doesn ' t exist
def create_if_missing(method = :create)
      ret_val = false
      if @item.exists?
        Chef::Log.info("#{@resource_name} '#{@name}' exists. Skipping")
        @item.retrieve! if @new_resource.save_resource_info
      else
        create(method)
        ret_val = true
      end
      save_res_info
      ret_val
    end
def create_if_missing ( method = :create ) ret_val = false if @item . exists? Chef :: Log . info ( "#{@resource_name} '#{@name}' exists. Skipping" ) @item . retrieve! if @new_resource . save_resource_info else create ( method ) ret_val = true end save_res_info ret_val end
Creates the OneView resource only if it doesn't exist
Creates the OneView resource only if it doesn ' t exist
Returns true if the resource was created/added
Returns true if the resource was created / added
TrueClass, FalseClass
method
method Create or add method
method Create or add method