libraries/resource_providers/api200/server_profile_provider.rb
# Override create method to allow creation from a template
Override create method to allow creation from a template
Override create method to allow creation from a template
def create(method)
        if @new_resource.server_profile_template
          template = load_resource(:ServerProfileTemplate, @new_resource.server_profile_template)
          Chef::Log.info "Using template '#{@new_resource.server_profile_template}' to #{method} #{@resource_name} '#{@name}'"
          new_profile_data = template.new_profile(@item['name']).data
          @item.data = new_profile_data.merge(@item.data)
        end
        super
      end
def create ( method ) if @new_resource . server_profile_template template = load_resource ( :ServerProfileTemplate , @new_resource . server_profile_template ) Chef :: Log . info "Using template '#{@new_resource.server_profile_template}' to #{method} #{@resource_name} '#{@name}'" new_profile_data = template . new_profile ( @item [ 'name' ] ) . data @item . data = new_profile_data . merge ( @item . data ) end super end
Override create method to allow creation from a template
Override create method to allow creation from a template
method